[ Previous | Next | Contents | Glossary | Home | Search ]
Ultimedia Services Version 2 for AIX: Programmer's Guide and Reference

Chapter 9. Programming with Audio Device Objects

UMSAudioDevice is the programming interface to the physical audio device hiding the differences between different audio devices and easing porting and programming. Each instantiation of UMSAudioDevice provides only one audio track. If the underlying audio device supports multiple audio tracks, multiple instantiations of UMSAudioDevice need to be created.

To use this object, an application must first create the object and open the audio track with either play or record mode. The UMSAudioDevice methods interface is similar to analog audio players (cassette recorders and compact disc players). You can start, stop, pause, and resume the device. More sophisticated operations like forward and rewind are provided through UMSAudioPlayer object.

Audio attributes, such as sample rates and byte order, must be established before you can play (through the write method) and record (through the read method). There are two buffers associated with each UMSAudioDevice object, one for read and one for write. Audio data-stream position and buffer size can be queried to provide better control of recording and playing functions. Note that if you close the device, UMSAudioDevice maintains all audio attribute settings until the object is destroyed or the attributes are modified.

To learn more about UMSAudioDevice, see:

[ Previous | Next | Contents | Glossary | Home | Search ]