Specify the file file containing the audio data. This parameter MUST be given. Datatypes are used to generate the sound object.
Volume=NUM
The volume to play the sound at 0-64. Defaults to 64.
Period=NUM
The period for playback of the sound. Defaults to natural period for the sample.
Cycles=NUM
The amount of cycles of the sound to play. Defaults to 1.
Definition Reply
-----------------
When the object creation is successful the pipe replies with
'ok GID'
Sound object modify parameters.
-------------------------
Period=NUM
The period for playback of the sound.
Volume=NUM
The volume to play the sound at 0-64. Defaults to 64.
NOTE: To work around a pre-ADOS 3.5 sound.dataype bug you can change the volume or frequency at the same time playback is triggered.
topipe('ID soundGID Volume new_volume Period new_period S 2')
Under OS3.5 volume and frequency can be changed any time, but period may not work as expected.
Selected=TriggerMethod (s=)
Cause the sound object to react. Most sound objects only support the trigger method Play (2) and method Stop (14).
Some other trigger methods for future compatability.
PAUSE 1
PLAY 2
REWIND 12
FASTFORWARD 13
STOP 14
RESUME 15
Select is replied to with 'ok RESULT' where result =1 when the trigger method was supported and result=0 when it is not supported.
NOTE: Trigger method 14 (stop) appears to be broken under ADOS 3.x and can hang the system. It should not use it at present.
FreeSound
FreeSound will dispose of the sound object. Under ADOS 3.1 the command may wait until the sound finishes playing. Under ADOS 3.5 the sound is stopped immedaitly and the object freed.
Sound objects are disposed of automaticaly when the GUI host is closed. Uses this function when it is better to free the sound object sooner.