Dremora
Apr 14 2008, 10:48
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.
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.
Dremora
Apr 14 2008, 12:59
Thanks for the fast reply, I am looking forward to the release of this plugin! And I'm certainly going to install SP1.
sanyigz
Jun 11 2008, 12:31
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
boomtopper
Jun 13 2008, 12:43
Awesome can't wait till this is implemented!
Thanx, Peter
Here it is:
http://www.foobar2000.org/componentsI'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.
Son Gohan
Jun 19 2008, 13:57
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").
boomtopper
Jun 19 2008, 14:30
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
Hengest
Jun 19 2008, 20:42
QUOTE(Son Gohan @ Jun 20 2008, 03:57)

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.
QUOTE(boomtopper @ Jun 20 2008, 04:30)

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.
Dremora
Jun 20 2008, 03:35
Peter, thank you very much!
QUOTE(Son Gohan @ Jun 19 2008, 21:57)

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.
Thanks! It works fine in 16bit mode. However, the volume control reacts a bit slow. Is that normal?
pyr0rrzzz
Jun 20 2008, 08:12
I wonder if this plugin offers anything new to n00bs like me
Explain, please
sanyigz
Jun 20 2008, 08:35
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
vigylant
Jun 20 2008, 08:44
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
The Link
Jun 20 2008, 11:23
QUOTE(sanyigz @ Jun 20 2008, 16:35)

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.
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.
Thanks, beta version works great in 24bit with my onboard Realtek ALC888 and latest drivers (R1.96)
sanyigz
Jun 20 2008, 14:19
now it's working for me. ALC883
"24-bit padded to 32-bit is used when possible." What does this mean?
jarsonic
Jun 20 2008, 15:57
@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.
vigylant
Jun 21 2008, 04:36
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
Son Gohan
Jun 21 2008, 08:05
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"
ffbadkill
Jun 25 2008, 05:21
Thank you very much and it works great with my Onkyo SE-200PCI
McMusic
Jun 26 2008, 03:06
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?
sanyigz
Jun 26 2008, 10:13
QUOTE(McMusic @ Jun 26 2008, 11:06)

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?
There is no kernel streaming on vista.
McMusic
Jun 26 2008, 10:46
QUOTE(sanyigz @ Jun 26 2008, 18:13)

There is no kernel streaming on vista.
But the KS plugin works under Vista. If it does not work as real kernel streaming, what does it deliver then?
Edit: Also mentioned in
this thread.
Kernel Streaming does not work with with some of cards having native Vista drivers.
More info about WASAPI vs ASIO vs KS:
http://wiki.hydrogenaudio.org/index.php?ti...foo_out_wasapi)
McMusic
Jun 26 2008, 11:29
Thanks for the explanation, Peter!
Although I did not have problems with my soundcard using kernel streaming under Vista, I switched to the WASAPI-plugin. It also works perfect with my soundcard. Most important thing for me is to keep the output bit-exact without resampling in the audio stream.
MinJae
Jun 26 2008, 22:43
Awesome~! Thanx Peter!
Works great most of the time, but I get an error sometimes when it opens the next track in the playlist.
CODE
Opening track for playback: "P:\V.A\[2008.01.30] SUMMIT 04\01 - Venom.mp3"
WASAPI: 48000 Hz / 16-bit / 2 channels
Opening track for playback: "P:\V.A\fool's mate select omnibus seduction#1\04.exist+trace - SACRIFICE BABY.mp3"
Unrecoverable playback error: Could not open device (88890002)
Bug fixed in 1.2, thanks for reporting.
No problem, thanks for fixing it!

EDIT: Also have an issue with mono files:
CODE
Opening track for playback: "C:\Users\bb10\AppData\Local\Temp\En-uk-daylight-savings-time.ogg"
Unrecoverable playback error: Could not open device: unsupported data format: 44100 Hz / 16-bit / 1 channels
Son Gohan
Jun 30 2008, 08:32
For mono files, the fix is pretty simple: use the "convert mono to stereo". DSP
Wasapi seems to be limited in a way not to support anything below 44100 hz, 16 bit stereo. I can't play 22khz and 32 khz mp3 files.The solution: resample to 44100 or higher with secret rabit or PPHS.
pyr0rrzzz
Jun 30 2008, 08:46
If I play music using this plugin I have to close foobar2000 and restart any other applications afterwards to unmute them. Isn't there another way to disable the exlclusive mode when I stop/pause playback?
GeSomeone
Jul 1 2008, 14:54
I tried the WASAPI output 1.2, Vista SP1, Realtek ALC662 (driver 6.0.1.5391), fb2k 0.9.5.4b3.
with 2 files both FLAC 5.1 channels, 24bit. A) 48k, B) 96k sample rate.
with foobar2000 set to output 24 bits
I could play A) but got the "Could not open device (8007001F)" with B)
with foobar2000 set to 16 bit output, they played both.
Also when resampled to 48k they played both at 24 bit output.
As both did with the "Convert 5.1 to stereo" dsp and no resampling.
(4.0 at 24 bit/96kHz did raise the error again)
So I pinned my problem down to >2 channels, 24bit, 96000Hz output. Hope this helps to find something.
sanyigz
Jul 4 2008, 09:36
QUOTE(pyr0rrzzz @ Jun 30 2008, 16:46)

If I play music using this plugin I have to close foobar2000 and restart any other applications afterwards to unmute them. Isn't there another way to disable the exlclusive mode when I stop/pause playback?

In foobar plugin i didn't saw non exclusive switch, but its better to turn on directsound then, cuz if wasapi isnt in exclusive mode, so in shared mode, then it's no more bit exact.
First of all...THANK YOU!!!!

Now here is my setup:
Vista Ultimate 64 SP1 (using Default Format of 16bit, 44100Hz and both Exclusive Mode check boxes checked)
Auzen Prelude (using Audio Creation Mode - Bit Matched Playback) & latest driver
Foobar2000 v 0.9.5.4
WASAPI output v 1.2
My question is this...
Will WASAPI always play the source bit perfect and untouched???
Say I play a 16bit 44.1 wav source...will the end result be 16bit 44.1?
Then say I play a 24bit 96 wav source...do I have to change the default format in Windows sound properties and then change the Foobar output to 24bit???? ...or does WASAPI just play the raw source and the other settings have no effect (this would be the best method).
Again, thank you and hopefully I am not being too confusing. Just want this to be user friendly.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.