Multimedia Audio-Destination Object

Most applications need to play audio using a multimedia wave-out driver. Microsoft supplies a component object called the multimedia audio-destination object that provides access to the multimedia wave-out driver. To use the multimedia audio-destination object, an application calls the CoCreateInstance function with the CLSID_MMAudioDest class identifier. The function returns the address of the IUnknown interface supported by the audio-destination object. The application needs to specify this address when creating an engine object (described later in this section).

By default, the multimedia audio-destination object uses WAVE_MAPPER as the audio device. To use a different device, the application can call the IUnknown::QueryInterface member function with the IID_IAudioMultiMediaDevice interface identifier. QueryInterface returns the address of the IAudioMultimediaDevice interface. The application can then call the IAudioMultimediaDevice::DeviceNumSet member function to set the identifier of the multimedia device to use as the audio destination.

An application can retrieve a list of wave-out audio devices available in the system by using the WaveOutGetNumDevs and WaveOutGetDevCaps multimedia functions. For more information about these functions, see the Microsoft Win32 Software Development Kit (SDK).

Before an application closes, it must call the IAudioMultimediaDevice interface's Release function to release the audio-destination object.