About Device Handles
Each function that opens an audio device takes as parameters a device
identifier, a pointer to a memory location, and some parameters unique to each type of
device. The memory location is filled with a device handle. Use this device
handle of identify the open audio device when calling other audio functions.
The distinction between audio-device identifiers and audio-device handles is
subtle, but very important. Don't confuse the two in your application. The
following are differences between device identifiers and device handles.
- Device identifiers are determined implicitly from the number of devices
present in a system, which is obtained by using the device-numbering functions: auxGetNumDevs, joyGetNumDevs, midiInGetNumDevs, midiOutGetNumDevs, mixerGetNumDevs, waveInGetNumDevs, and waveOutGetNumDevs. There is a one-to-one correspondence between a device identifier and the
physical device it represents.
- Device handles are returned when device drivers are opened by using the
device-opening functions: midiInOpen, midiOutOpen, mixerOpen, waveInOpen, and waveOutOpen. There may be more than one for a device. You can think of a device instance
as a logical copy of the physical device.
- The device-capabilities and volume functions can take either a device
identifier or a device handle. These functions are midiInGetDevCaps, midiOutGetDevCaps, midiOutGetVolume, midiOutSetVolume, waveInGetDevCaps, waveOutGetDevCaps, waveOutGetVolume, waveOutSetVolume. All other functions take device handles.
There are no functions for opening and closing auxiliary audio devices.
Auxiliary audio devices don't need to be opened and closed like MIDI and waveform
devices because there is no continuous data transfer associated with them. All
auxiliary audio functions take device identifiers to identify devices.
- Software for developers
Software for Android Developers
- More information resources
Unix Manual Pages
- Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database