Usually, with a binary device object you have a set of associated attributes available. A typical example is the camera device which provides the following attributes on Aibo:
camera.shutter : the camera shutter speed: 1=SLOW (default), 2=MID, 3=FAST
camera.gain : the camera gain: 1=LOW, 2=MID, 3=HIGH (default)
camera.wb : the camera white balance: 1=INDOOR (default), 2=OUTDOOR, 3=FLUO
camera.format : the camera image format: 0=YCbCr 1=jpeg (default)
camera.jpegfactor : the jpeg compression factor (0 to 100). Default=80
camera.resolution : the image resolution: 0:208x160 (default) 1:104x80 2:52x40
camera.reconstruct : reconstruction of the high resolution image(slow): 0:no (default) 1:yes
camera.width : image width
camera.height : image height
camera.xfov : camera x Field Of View (degrees)
camera.yfov : camera y Field Of View (degrees)
In the case of the speaker device, in charge of the speaker producing sound in the Aibo, you have:
speaker.playing : equal 1 when there is a sound playing, 0 otherwise
speaker.remain : number of milliseconds of sound to play, 0 when the buffer is empty.
With the speaker object, there is also a method that can be used to play a sound directly from a file stored on the memorystick:
speaker.play("mysound.wav");
Alternatively, to avoid having a disk access which might be slow, you can decide to store the content of the "mysound.wav" file in a binary variable kept in memory for frequent use, and then do a simple assignment. For this, use the loadwav function:
mybin = loadwav("mysound.wav");
speaker = mybin;