[wdmaudiodev] Re: Programmatically changing a default play back device
- From: "Gary Daniels" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Gary.Daniels" for DMARC)
- To: Gary Daniels <wdmaudiodev@xxxxxxxxxxxxx>
- Date: Fri, 8 Feb 2019 17:45:18 +0000
Yes, the algorithm isn't infallible. For this case, once you select a
preference of speaker over USB then that preference will be retained for the
next time you plug in the USB. Ideally, you'd only encounter this problem once,
if it's something you do often.
There was a bug with some of the code parsing the never set as default flag
that caused inconsistent behavior, it was fixed a few releases back. It should
now work as expected.
I'll have to look into the MME issue, but it's unlikely that it will be changed
from what it does today.
Sent from Outlook<http://aka.ms/weboutlook>
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on
behalf of Eugene Muzychenko <reg.wad@xxxxxxxxxxxxxx>
Sent: Friday, February 8, 2019 2:40:46 AM
To: Gary Daniels
Subject: [wdmaudiodev] Re: Programmatically changing a default play back device
In what situation would you like to prevent the endpoint from
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
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
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.
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
URL to WDMAUDIODEV page:
Other related posts: