function opens the given waveform-audio output device for playback.
| LPHWAVEOUT phwo,
| UINT uDeviceID,
| LPWAVEFORMATEX pwfx,
| DWORD dwCallback,
| DWORD dwCallbackInstance,
| DWORD fdwOpen
Address filled with a handle identifying the open waveform-audio output
device. Use the handle to identify the device when calling other waveform-audio
output functions. This parameter might be NULL if the WAVE_FORMAT_QUERY flag is
specified for fdwOpen
Identifier of the waveform-audio output device to open. It can be either a
device identifier or a handle of an open waveform-audio input device.You can use
the following flag instead of a device identifier:
The function selects a waveform-audio output device capable of playing the
Address of a WAVEFORMATEX
structure that identifies the format of the waveform-audio data to be sent to
the device. You can free this structure immediately after passing it to waveOutOpen
Address of a fixed callback function, an event handle, a handle to a window,
or the identifier of a thread to be called during waveform-audio playback to
process messages related to the progress of the playback. If no callback function
is required, this value can be zero. For more information on the callback
function, see waveOutProc
User-instance data passed to the callback mechanism. This parameter is not
used with the window callback mechanism.
Flags for opening the device. The following values are defined:
parameter is an event handle.
parameter is a callback procedure address.
No callback mechanism. This is the default setting.
parameter is a thread identifier.
parameter is a window handle.
If this flag is specified, a synchronous waveform-audio device can be opened.
If this flag is not specified while opening a synchronous driver, the device
will fail to open.
If this flag is specified, the ACM driver does not perform conversions on the
If this flag is specified, waveOutOpen
queries the device to determine if it supports the given format, but the
device is not actually opened.
If this flag is specified, the uDeviceID
parameter specifies a waveform-audio device to be mapped to by the wave
Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error
values include the following:
||Specified resource is already allocated.
||Specified device identifier is out of range.
||No device driver is present.
||Unable to allocate or lock memory.
||Attempted to open with an unsupported waveform-audio format.
||The device is synchronous but waveOutOpen was called without using the WAVE_ALLOWSYNC flag.
Use the waveOutGetNumDevs
function to determine the number of waveform-audio output devices present in
the system. If the value specified by the uDeviceID
parameter is a device identifier, it can vary from zero to one less than the
number of devices present. The WAVE_MAPPER constant can also be used as a
The structure pointed to by pwfx
can be extended to include type-specific information for certain data
formats. For example, for PCM data, an extra UINT
is added to specify the number of bits per sample. Use the PCMWAVEFORMAT
structure in this case. For all other waveform-audio formats, use the WAVEFORMATEX
structure to specify the length of the additional data.
If you choose to have a window or thread receive callback information, the
following messages are sent to the window procedure function to indicate the
progress of waveform-audio output: MM_WOM_OPEN, MM_WOM_CLOSE, and MM_WOM_DONE.
If you choose to have a function receive callback information, the following
messages are sent to the function to indicate the progress of waveform-audio
output: WOM_OPEN, WOM_CLOSE, and WOM_DONE.
- Software for developers
Software for Android Developers
- More information resources
Unix Manual Pages
- Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database