The following lines store the data from an audio file in the Array, R:
>
|
audiofile := cat(kernelopts(datadir), "/audio/ViolinThreePosVibrato.wav");
|
>
|
R := AudioTools:-Read(audiofile);
|
Certain properties of the speaker can be set or retrieved from the speaker component:
>
|
SetProperty("Speaker0", stereo, true);
|
>
|
srate := attributes(R)[1];
|
>
|
SetProperty("Speaker0", samplerate, srate);
|
The speaker can start playing using either a programmatic command, or by using the AudioTools:-Play command:
>
|
SetProperty("Speaker0", value, R);
|