Microsoft Windows CE 3.0  

Opening Waveform Audio Output Devices

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

In addition to using the waveOutOpenand waveInOpenfunctions to determine if a waveform audio device supports a specified format, you can use these functions to open a waveform audio I/O device for recording or playback. These functions open the device that is associated with the specified device identifier and return a pointer to an open device handle.

Both waveOutOpenand waveInOpenchoose the device that is best able to play the specified data format. The Windows CE operating system (OS) identifies waveform audio I/O devices by using a device identifier. The OS determines the device identifier implicitly from the number of devices that are present in a system. Device identifiers range from zero through the number of devices that are present, minus one. For example, the valid device identifiers for a system with two waveform audio output devices are 0 and 1.

In addition to the device number, the waveOutOpenand waveInOpenfunctions require a pointer to a memory location. The functions fill the memory location with a device handle. Use this device handle to identify the open waveform audio I/O device when calling other audio functions. The following list describes the differences between a device identifier and a device handle: