MM_WOM_FORCESPEAKER (Compact 2013)

3/26/2014

This message is used to make sure that an audio stream is routed to the external speaker.

Syntax

MM_WOM_FORCESPEAKER
    wParam = (BOOL) bForce
    lParam = reserved

Parameters

  • bForce
    A BOOL value that determines whether an audio stream should be routed to the speaker. Set to TRUE to route the stream to the speaker, and FALSE otherwise.
  • lParam
    Reserved; set to 0 (zero).

Return Value

None.

Remarks

In general, when the headset is plugged into a device, all audio should be routed to the headset by default. There are, however, certain sounds, such as the phone ring, that are always most appropriately played through the external speaker so it can always be heard.

Support for the MM_WOM_FORCESPEAKER message is driver dependent. The F-Sample platform code in the SDK implements this message. Hardware that supports selectively routing individual streams to the speaker is rare. So in practice, audio drivers typically keep a reference count of how many streams are to be routed to the speaker. If the number of streams is non-zero then all audio is routed to the speaker.

Requirements

Header

audiosys.h

See Also

Reference

Waveform Audio Messages
waveOutMessage