[wdmaudiodev] Re: Programmatically changing a default play back device

  • From: Eugene Muzychenko <reg.wad@xxxxxxxxxxxxxx>
  • To: Gary Daniels <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 8 Feb 2019 11:40:46 +0100

Hello Gary,

In what situation would you like to prevent the endpoint from
becoming default?

For example, I'm listening to the audio played by the browser for a
long time. You know that there is no browser that allows to specify
playback/recording endpoints explicitly - all of them always use
default ones. So I need to set a speakers endpoint as a default one.

Sometimes, I need to listen something in USB headset (for example, a
private audio message, an audio example provided by a user etc.). For
that, I can use a separate audio player that allows to specify a
playback endpoint explicitly. But as I connect the USB headset,
Windows immediately sets it as the default, and all sounds from the
browser are switched to the headset.

Additionally, on each changing of audio audio endpoint, Windows
(starting from XP) renumbers MME devices to have the default device
number 0. I think this is an ugly workaround added for much more ugly
audio applications that always specify DevID 0 in waveIn/waveOut
instead of -1. Many applications still use MME interface as the most
compatible one. While such application is running, establishing MME
endpoint name-to-ID correspondence on the startup, and Windows then
changes default endpoint assignment upon device
connection/disconnection, MME endpoint name-to-ID correspondence is
corrupted.

There is already a mechanism for the driver to tag an endpoint such
that it does not ever become the default.

I tried to add NeverSetAsDefaultEndpointMaskValue to my INFs but it
didn't work reliably. Additionally, it does not allow a particular
user to control Windows default device selection policy for every
audio device.

I have contemplated whether it may be helpful to have an option to
tag an endpoint to never become an automatic default but still
permit manual selection by the user. Would that be helpful?

Definitely, it will be helpful. As you can see, the "never" (p=0) and
"always" (p=100) obviously don't cover all possible cases, and there
is the "sometimes" (0 < p < 100). So the user should have an
opportunity to disable automatic default endpoint manipulation -
both for a particular device, and globally. At least, there should be a
registry setting that could be used by advanced users who have
several audio devices used simultaneously for different purposes.

Regards,
Eugene

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: