Opening Waveform Audio Output Devices (Windows CE 5.0)

Send Feedback

In addition to using the waveOutOpen and waveInOpen functions 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 waveOutOpen and waveInOpen choose 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 waveOutOpen and waveInOpen functions 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:

  • The OS determines a device identifier implicitly from the number of devices that are present on a system. The system obtains this number by using the waveInGetNumDevs or waveOutGetNumDevs function.
  • The OS returns a device handle after the OS opens a device driver by using the waveInOpen or waveOutOpen function.

See Also

Querying and Opening Waveform Audio I/O Devices

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.