26 May '13 - 04:17 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Confused by WASAPI  (Read 1285 times)
wrkq
Posts: 78


« on: 25 Feb '12 - 17:05 »
Reply with quoteQuote

I've searched the forum for "wasapi", but didn't find any place that'd had all the answers, thus this post.
If it is explained somewhere, sorry... "RTFThread" answers welcome if accompanied with link.

So I've recently got a Win7 machine, which's my first contact with the NT6.x audio stack.

XMPlay 3.6.0.53, WASAPI plugin rev.3, Realtek ALC269 (Yeah, yeah, I know, but this is a laptop.)

So, first of all - when I'm using the default sound driver (DirectSound?) in XMPlay,  i.e set Options -> Output -> Device to "Speakers", XMPlay's volume slider moves its per-application slider in Windows mixer. When I set Device to "WASAPI - Speakers", XMPlay's volume control doesn't move any of Windows mixer sliders (but still alters XMPlay's internal volume). Is that intended?

Next, one thing I'd like to clarify - when General Track Info -> Output has two lines, the one in parentheses is what XMPlay decodes the file as, and the one without is what gets sent to the driver?

And well, the main confusion...
Playing a typical 44.1 kHz/16bit file.
In exclusive mode, the Windows' mixer signal bars turn off, no other app can play sounds, and XMPlay's General info shows only one line as Output.
Output -> Resolution = "16 bit" , Output -> WASAPI -> "Use highest available resolution" = off gives "44100 hz - stereo - 16 bit"
Output -> Resolution = "16 bit" , Output -> WASAPI -> "Use highest available resolution" = on gives "44100 hz - stereo - 24 bit"
Output -> Resolution = "24 bit" or "32 bit" gives "44100 hz - stereo - 24 bit" no matter what is the setting of the "Use highest available resolution" checkbox.
In non-exclusive mode, I get one of
"44100 hz - stereo - 32 bit", if I set Control Panel -> Sound -> Speakers -> Advanced  -> Default Format to any 44100 Hz one (no matter if 16 or 24 bit), or
"<xxx> hz - stereo - 32 bit (44100 hz - stereo)", if I set Default Format to any other sample rate (no matter if 16 or 24 bit), with this set rate displaying in place of <xxx>.

So, do I understand right that in shared mode, all audio is resampled to the Default Format value at 32bit precision, and then downscaled to the output resolution? And if so, should I set it down to 44100 as majority of my music collection is 44100?

Regards,
wrkq

EDIT/PS: Would it be better to downmix 5.1 to 2.0 in WinampAC3 plugin's panel, as I did on XP, or better to let it emit all 6 channels and let Windows downmix it?
« Last Edit: 25 Feb '12 - 17:18 by wrkq » Logged
Dotpitch
Posts: 2479


« Reply #1 on: 25 Feb '12 - 17:29 »
Reply with quoteQuote

Next, one thing I'd like to clarify - when General Track Info -> Output has two lines, the one in parentheses is what XMPlay decodes the file as, and the one without is what gets sent to the driver?
Correct.

And well, the main confusion...
Your card supports up to 24-bit audio. In exclusive mode, XMPlay directly controls the audio card. If the file is 16-bit, XMPlay will output it as 16-bit. If you tell the WASAPI plugin to "Use highest available resolution", XMPlay uses the 24-bit of your card, regardless of the output resolution you chose on the output tab. Your card does not support 32-bit, so XMPlay automatically falls back to 24-bit if you request 32-bit.

So, do I understand right that in shared mode, all audio is resampled to the Default Format value at 32bit precision, and then downscaled to the output resolution?
Yes. In shared mode, Windows handles the audio mixing of different applications, so XMPlay feeds it with the highest quality audio data.
And if so, should I set it down to 44100 as majority of my music collection is 44100?
That's what I did as well. Works like a charm (though I don't hear the difference between 44.1 and 48 kHz Tongue).

Would it be better to downmix 5.1 to 2.0 in WinampAC3 plugin's panel, as I did on XP, or better to let it emit all 6 channels and let Windows downmix it?
That doesn't really matter, unless you want some specific downmixing matrices, in that case you should use WinampAC3's config.
Logged
wrkq
Posts: 78


« Reply #2 on: 28 Feb '12 - 20:08 »
Reply with quoteQuote

I didn't want to bump the topic just with thanks, but as I'm resurrecting it now... thank you very much for your answers, Dotpitch, they do clear things out. Smiley

Alas, your large answer probably seemed exhaustive to everyone who skimmed, and I'm still confused about this part...

So, first of all - when I'm using the default sound driver (DirectSound?) in XMPlay,  i.e set Options -> Output -> Device to "Speakers", XMPlay's volume slider moves its per-application slider in Windows mixer. When I set Device to "WASAPI - Speakers", XMPlay's volume control doesn't move any of Windows mixer sliders (but still alters XMPlay's internal volume). Is that intended?

I've updated the plugin to stuff revision 3d (1.0.3.4) in the meantime. That added a checkbox to control the device's volume slider in exclusive mode. But I still can't make the "per-application" slider in shared mode to move. With default audio output driver ("Device: Speakers"), XMPlay's volume slider moves its per-application volume slider in mixer. With WASAPI, it doesn't.

Regards,
wrkq
Logged
Dotpitch
Posts: 2479


« Reply #3 on: 28 Feb '12 - 21:20 »
Reply with quoteQuote

thank you very much for your answers, Dotpitch, they do clear things out. Smiley
You're welcome Smiley.

So, first of all - when I'm using the default sound driver (DirectSound?) in XMPlay,  i.e set Options -> Output -> Device to "Speakers", XMPlay's volume slider moves its per-application slider in Windows mixer. When I set Device to "WASAPI - Speakers", XMPlay's volume control doesn't move any of Windows mixer sliders (but still alters XMPlay's internal volume). Is that intended?
I've updated the plugin to stuff revision 3d (1.0.3.4) in the meantime. That added a checkbox to control the device's volume slider in exclusive mode. But I still can't make the "per-application" slider in shared mode to move. With default audio output driver ("Device: Speakers"), XMPlay's volume slider moves its per-application volume slider in mixer. With WASAPI, it doesn't.
It shows the same behaviour on my system, and I don't know why. Note that the default audio device on Windows 7 is not DirectSound, and if you use xmp-ds, the per-application volume slider doesn't move either. The default audio device lets Windows handle the volume control (link), but I don't see why WASAPI shared shouldn't allow that too. Ian, what's your idea on this?
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines