[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.


Thanks,

-Gary


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

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:
https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.wdmaudiodev.com%2F&amp;data=02%7C01%7CGary.Daniels%40microsoft.com%7C194615107f0b450874e508d68db1f85a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636852192863036982&amp;sdata=9J0L0tcU8TKBbWylWFfUXKm67DyzxpjRZGal8EnFMx0%3D&amp;reserved=0

Other related posts: