Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: WASAPI output plugin (Read 145928 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WASAPI output plugin

Windows Vista has a new audio output method called WASAPI which allows to bypass unnecessary processing levels, reducing latency. It would be very nice if someone could write a WASAPI output plugin for foobar2000. It could serve as a safe kernel streaming replacement for Vista.

WASAPI output plugin

Reply #1
It's been done but there are somewhat annoying bugs that I don't know how to workaround yet and the whole thing is unusable on large percentage of pre-SP1 machines because of documented Vista mixer bugs. This plug-in will definitely be released at some point.
Microsoft Windows: We can't script here, this is bat country.

WASAPI output plugin

Reply #2
Thanks for the fast reply, I am looking forward to the release of this plugin! And I'm certainly going to install SP1.

WASAPI output plugin

Reply #3
Oh i can't stand this stupid vista mixer, i want bit exact solution

When wasapi plugin will be released? Or i need to buy an asio soundcard?

"whole thing is unusable on large percentage of pre-SP1"

So it's working on sp1 vista? Then why haven't been released yet? Who don't have sp1 don't use it, it's simple

WASAPI output plugin

Reply #4
Awesome can't wait till this is implemented!
Thanx, Peter

WASAPI output plugin

Reply #5
Here it is: http://www.foobar2000.org/components

I've done what I could to make this usable and the results are quite decent on all of my machines by now.

Unfortunately, some of the issues I've noticed still persist and I have no power over them as they're clear bugs in Microsoft's code still present as for Vista SP1 with latest updates. For an example, if you uncheck the Allow applications to take exclusive control of this device option in your device's properties, any apps currently playing audio in exclusive mode may crash.

This component has been in development since late 2007. First it got stalled because exclusive mode was completely broken on my workstation with pre-SP1 Vista x64. Then it got stalled because of weird behaviors occuring with various soundcards not using Microsoft's own audio drivers (the released version contains a workaround for these). I wouldn't recommend this component for regular use, it seems nobody else seriously used WASAPI before and Microsoft's QA decided to skip verifying whether it works properly.
Microsoft Windows: We can't script here, this is bat country.

WASAPI output plugin

Reply #6
I tried the plugin with the lastest foobar2000 release (0.9.5.3) under vista x64 SP1 and onboard HD audio codec (realtek alc660 with the lastest drivers, 1.91). So far it seems that...

a)8 bit audio "works" (lots of buzzing and distortion).
b)16 bit audio output works fine.
c)24bit audio output does not work (Unrecoverable playback error: Could not open device (8889000F)
d)32 bit audio output does not work either."Unrecoverable playback error: Could not open device: unsupported data format".

I don't know if this might be related to this behaviour, but in Xmplay there is a extra option in the WASAPI output plugin ("use native 32 bit resolution in shared mode").

WASAPI output plugin

Reply #7
Thanx for the plugin Peter but i'm having a problem with it.
I use a Edirol UA25 which is connected via usb. I have set it to output using WSAPI Edirol UA25. But when I try and play a track I get a "Unrecoverable Playback error: Could not open device (Device in use)".
If I set WASAPI to use the onboard soundcard it seems to playback.
I do not have any other audio programs open?
Cheers

WASAPI output plugin

Reply #8
a)8 bit audio "works" (lots of buzzing and distortion).
b)16 bit audio output works fine.
c)24bit audio output does not work (Unrecoverable playback error: Could not open device (8889000F)
d)32 bit audio output does not work either."Unrecoverable playback error: Could not open device: unsupported data format".


Similar problem here under Vista 32 bit using an m-audio transit usb soundcard. 8 bit audio, however, doesn't work either.

Thanx for the plugin Peter but i'm having a problem with it.
I use a Edirol UA25 which is connected via usb. I have set it to output using WSAPI Edirol UA25. But when I try and play a track I get a "Unrecoverable Playback error: Could not open device (Device in use)".
If I set WASAPI to use the onboard soundcard it seems to playback.
I do not have any other audio programs open?
Cheers


Look in Vista's mixer panel (the one that shows the volume levels of individual programs), and check to make sure that no other programs are showing-up there.

Edit: forgot to mention that there also seems to be a noticeable lag between moving the volume slider, and the volume actually changing.
"Lifting Shadows Off a Dream"

WASAPI output plugin

Reply #9
Peter, thank you very much!

WASAPI output plugin

Reply #10
a)8 bit audio "works" (lots of buzzing and distortion).
b)16 bit audio output works fine.
c)24bit audio output does not work (Unrecoverable playback error: Could not open device (8889000F)
d)32 bit audio output does not work either."Unrecoverable playback error: Could not open device: unsupported data format".
For reference, I'm getting b/c/d too, and the "8889000F" error with 8-bit, on two different onboard audio chips with Microsoft audio drivers. MSDN doesn't mention what this error code (AUDCLNT_E_ENDPOINT_CREATE_FAILED) means in this context, it's probably a driver or OS bug.
Quote
I don't know if this might be related to this behaviour, but in Xmplay there is a extra option in the WASAPI output plugin ("use native 32 bit resolution in shared mode").
Shared mode is not really interesting for us - it still lets Vista's audio mixer mix our stream with other sounds but as far as I can tell it requires us to produce an audio stream in the exact format that the mixer works with (32-bit floating-point, sample rate matching Windows mixer settings and channel count matching soundcard specifications), so it's pretty much the same as DirectSound but more painful to use because Windows no longer does resampling or channel mixing behind the scenes for you when necessary.
Microsoft Windows: We can't script here, this is bat country.

WASAPI output plugin

Reply #11
Thanks! It works fine in 16bit mode. However, the volume control reacts a bit slow. Is that normal?

WASAPI output plugin

Reply #12
I wonder if this plugin offers anything new to n00bs like me 
Explain, please 

WASAPI output plugin

Reply #13
OHHHHHH yesss thank you!

Its working working on 16bit, but i have that unrecoverable playback error too @24/32bit.

Vista 64 SP1, Realtek ALC883 audio, R1.94 driver

But now i can put the bass to high level without distortion  Now the "wall" are my ears, and my headphone

BTW 24bit mode in wasapi exclusive is working in xmplayer for me, just its doing random ctd-s, with unhandled exeption errormessage, and it have winamp like ui, and i hate that

WASAPI output plugin

Reply #14
Tried it in Vista SP1, but it says that it cannot open the device or something...
Using an Onkyo SE90-PCI card with the newest drivers...

edit: And, it works in XMPlay
Foobar2000 @ Onkyo SE-90PCI @ Sennheiser HD595 :)

WASAPI output plugin

Reply #15
BTW 24bit mode in wasapi exclusive is working in xmplayer for me, just its doing random ctd-s, with unhandled exeption errormessage, and it have winamp like ui, and i hate that
Perhaps I'm missing sth. but playing back an original 24 bit flac file in xmplay using wasapi exclusive mode shows "Output   96000 hz - stereo - 16 bit" in the console. It seems that the output resolution gets changed to 16 bit which also works just fine in foobar.

 

WASAPI output plugin

Reply #16
Here's a beta version of the component for you to test: [link removed, use the latest stable version instead]

Changes:
  • Somewhat more informative error messages.
  • 24-bit mode now works on more soundcards - 24-bit padded to 32-bit is used when possible.
Microsoft Windows: We can't script here, this is bat country.

WASAPI output plugin

Reply #17
Thanks, beta version works great in 24bit with my onboard Realtek ALC888 and latest drivers (R1.96) 

WASAPI output plugin

Reply #18
now it's working for me. ALC883

"24-bit padded to 32-bit is used when possible." What does this mean?

WASAPI output plugin

Reply #19
@sanyigz:  The eight extra bits utilized in 32-bit are padded as zeros.  This allows you to have a 24-bit stream within a 32-bit container.

WASAPI output plugin

Reply #20
Still doesnt work for me...
Says the 44100hz @ 24bit @ 2CH is unsupported, although my soundcard can output 192khz @ 24bit @ 2CH, so i dont see the prob
Foobar2000 @ Onkyo SE-90PCI @ Sennheiser HD595 :)

WASAPI output plugin

Reply #21
yes! WASAPI now works fine with my setup (vista x64 SP1, realtek ALC660, 1.96 drivers).

As a side effect,  8 bit audio output is now broken:
"Unrecoverable playback error: Could not open device: unsupported data format: 44100 Hz / 8-bit / 2 channels"

WASAPI output plugin

Reply #22
New version (1.1) up.
Microsoft Windows: We can't script here, this is bat country.

WASAPI output plugin

Reply #23
Thank you very much and it works great with my Onkyo SE-200PCI

WASAPI output plugin

Reply #24
Can anyone explain me the differences between the WASAPI plugin and kernel streaming? They both should be bit-exact, or is kernel streaming not bit-exact on Vista?

Which of the two plugins is to favor, when I want bit-exact playback on a Vista SP1-machine?