The "Yet Another (WA)SAPI Output Plugin for Winamp" (YASAPI) utilizes the "Windows Audio Session API" (WASAPI). WASAPI's exclusive mode for rendering audio is a native way on Windows to render audio undisturbed, similar to Steinberg's "Audio Stream Input/Output" (ASIO). The YASAPI output plugin may serve as a replacement for any other Winamp output plugin.

Both versions of your plug-in fail to work in my configuration. When starting playback, I get a YASAPI error message that says "AUDCLNT_E_UNSUPPORTED_FORMAT". Then when I click ok, to acknowledge the error message, Winamp crashes leaving "winamp.exe" running in the background.

If I'm right, which part or parts of the input signal is/are not compatible with your plug-in?

I can let Windows do the up-sampling and up-mixing (to match my soundcard driver settings), but it didn't sound as good as when doing the processing in Winamp. Of course I can change my soundcard driver settings to match the source material, but I'd rather use the full capabilities of my soundcard and speakers. The only WASAPI plug-in I've found that worked for me (and provided the up-sampling and up-mixing that I want) is the abandoned "Maiko" output plug-in. I had to stop using Maiko because the last version released causes problems with the "Jump to File Extra" plug-in.

So I'm back to using Matrix Mixer and the official DirectSound output plug-in to get the processing that I want (what I was using before finding Maiko), but this combo only supports shared mode. Maiko's exclusive mode sounded noticeably better and I was hoping your plug-in would too.

Got up to 4.9x buffer and Bjork stopped popping during playback. Even though I use FLAC, I'm not really an audiophile. So I am assuming the audio is not defected in any other obvious manner.

EDIT: Are there any plans to have the volume slider in Winamp work with YASAPI? I noticed that the out_asio plugin also does not have volume control. Is this just a limitation with these sorts of plugins?

Got up to 4.9x buffer and Bjork stopped popping during playback. Even though I use FLAC, I'm not really an audiophile. So I am assuming the audio is not defected in any other obvious manner.

EDIT: Are there any plans to have the volume slider in Winamp work with YASAPI? I noticed that the out_asio plugin also does not have volume control. Is this just a limitation with these sorts of plugins?

I increased my buffer to 5x as it was not playing at the default buffer size. It is working now - ploughing through my mp3 collections. No issues to report yet and using the sse2 version

Most likely the distortion and popping results from ring buffer underflow. That's why you could resolve this by simply enlarging the buffer. But there is not only the size which may lead to to the buffer drying out. The new version lets you configure some of the possiblities:

You have the following relation between the parameters regarding buffer sizes:

minimum size of the buffer shared with the device (provided by WASAPI) <= size of buffer shared with the device <= number of samples in the ring buffer before start playing <= size of ring buffer

Quote:

Originally Posted by A11ectis

Are there any plans to have the volume slider in Winamp work with YASAPI? I noticed that the out_asio plugin also does not have volume control. Is this just a limitation with these sorts of plugins?

I think it is possible. The respective checkbox is already there

Quote:

Originally Posted by Aminifu

Both versions of your plug-in fail to work in my configuration. When starting playback, I get a YASAPI error message that says "AUDCLNT_E_UNSUPPORTED_FORMAT".

This is just a 1:1 report of an error resulting from a call to the IsFormatSupported method of the IAudioClient interface. It means that your audio device doesn't support the format (number of channels, sample frequency, bits per sample) you're going to play.

Both versions of your plug-in fail to work in my configuration. When starting playback, I get a YASAPI error message that says "AUDCLNT_E_UNSUPPORTED_FORMAT".

This is just a 1:1 report of an error resulting from a call to the IsFormatSupported method of the IAudioClient interface. It means that your audio device doesn't support the format (number of channels, sample frequency, bits per sample) you're going to play.

I get exactly the Same error Message, and the Maiko Wasapi plugin plays just fine. (using your in_ffsox too)

My Soundcard is configured as 5.1 and my MP3's of course are Stereo,
so in some way the error message would make sense,
but for the stereo upmixing there is a function from Creative called CMSS3D http://en.wikipedia.org/wiki/Sound_Blaster_X-Fi#CMSS-3D
and even from Dolby called Dolby Digital Live or Dolby DTS.
and even the maiko wasapi plugin provides such a functionality (I personly Like this one the most)

I really like your in_ffsox plugin, it is working like a charm (except MP3 ID3 support )
but this plugin does not work for me

I get exactly the Same error Message, and the Maiko Wasapi plugin plays just fine.(

Could you please try the new version? It not only provides the bare Component Object Model (COM) error but also the file and the line number where it occurs. Could you please let me know file and line number?

This is just a 1:1 report of an error resulting from a call to the IsFormatSupported method of the IAudioClient interface. It means that your audio device doesn't support the format (number of channels, sample frequency, bits per sample) you're going to play.

How does your plug-in determine the audio device to use? I have more than one installed, but the one selected for Windows and in Winamp's DirectSound output plug-in (i.e. my soundcard) plays the up-sampled and up-mixed mp3 files just fine. I'm running Windows 7 and those links you provided are a bit over my head. Maybe I should try shared mode, but that would defeat my purpose.

I will wait for ravermeister's results before trying your latest version. Cleaning up after crashes is a bit of a hassle.

I was under the impression that the Windows control panel sound utility displays the formats (bit depth & sampling rate) that the audio device's driver supports and that WASAPI would up-sample or down-sample the source to match the format selected. If it doesn't that would explain why the sound quality was different from the up/down sampling done by the various Winamp plug-ins that provide it.

Windows also has a channel up-mixing feature (called speaker-fill, I think) if the audio driver supports it, but all this does is mirror the stereo channels to the other channels.

Matrix mixer (and Maiko) allows true automatic or manual matrix mixing of the stereo channels to the output channels (6 in 5.1 or 8 in 7.1 speaker setups). The stereo channels can be combined (in phase or either channel inverted to enhance or remove the identical sounds in each channel) at equal or various output levels and each combination directed to a particular output channel. Delays can be added to each channel as well. Bottom line, the stereo source can be morphed into a semblance of true multichannel surround sound where each output channel can provide something different. The effect can be extended by adding frequency equalizing or other DPS effects (with other plug-ins or soundcard utilities) before or after the mixing.

Movie soundtracks provide all this on their own, but it's fun playing sound engineer with stereo sources (making subtle or dramatic changes).

In shared mode it's not just an error but an alternate format is proposed (you can see it when you use the debug version). There are interfaces to transform the audio accordingly. But all that has to be done, it's not coming out of the box.

Are you saying that your plug-in only accepts audio that is a PCM, 2 channel, 16bit, 44.1KHz signal? If not, how are the audio transforms to be accomplished? I don't understand what I'm supposed to do to have your plug-in work for me. Am I supposed to remove everything in the processing chain except for the input decoders and your output plug-in?

I'm looking for more than a bit perfect reproduction of the source file. If that is what your plug-in is designed to do, then that is prefectly fine for those who only want that. I guess I misunderstood the intent and it's just not suitable for me. So I'll stay with what I have and keep looking for another way to achive WASAPI exclusive mode support for up-sampled and up-mixed source files.

One other thing I've noticed is that, while Winamp is using YASAPI, other audio sources stop playing. This is a bit of a let down since most of my time using Winamp is also while playing a game on my PC, which I'd still like to be able to hear things in.

YASAPI 0.30 sse2 working fine for me. I have Winamp and a dsp plugin "Enhancer" and they are working fine for the time being. My buffer is 5.11x. I have occasional glitches in the audio but nothing which will stop the world. Keep you posted.

YASAPI 0.30 sse2 working fine for me. I have Winamp and a dsp plugin "Enhancer" and they are working fine for the time being. My buffer is 5.11x. I have occasional glitches in the audio but nothing which will stop the world. Keep you posted.

Edit: Got some glitches on flac files. These got fixed when I increased the buffer to 6.11x. Do we have to increase the size of the other buffers in line too (ring buffer, etc)?

Do we have to increase the size of the other buffers in line too (ring buffer, etc)?

I dont't know because I have one PC to test and it works.

However, we should imagine what's going on there:

On one side there is WA delivering packets of sound at a rate which in mean represents the sample rate.

The same is true for the WASAP side: it reads packets of another size and at another rate which also represents in mean the sample rate.

We can conclude that in mean the ring buffer is empty. It just compensates for the different packet sizes. But there is still some probability that the buffer becomes empty, and we here glitches or pops.

The mean number of frames in the buffer should never become zero. You may achieve this by increasing the "start playing ..." option. The "start playing ..." option means that when WASAPI takes the first packet from the buffer the number of frames in the buffer not becomes zero immediately (instead it approximately is the mean number of frames in the buffer).

I increased the "start playing ..." parameter to 2 and it works (which means nothing because for me it's working anyway).

On one side there is WA delivering packets of sound at a rate which in mean represents the sample rate.

The same is true for the WASAP side: it reads packets of another size and at another rate which also represents in mean the sample rate.

We can conclude that in mean the ring buffer is empty. It just compensates for the different packet sizes. But there is still some probability that the buffer becomes empty, and we here glitches or pops.

The mean number of frames in the buffer should never become zero. You may achieve this by increasing the "start playing ..." option. The "start playing ..." option means that when WASAPI takes the first packet from the buffer the number of frames in the buffer not becomes zero immediately (instead it approximately is the mean number of frames in the buffer).

I increased the "start playing ..." parameter to 2 and it works (which means nothing because for me it's working anyway).

Thank you. I will increase the "start playing" parameter and see what this changes. Thanks for the prompt reply

You should get rid of the S_FALSE in shared mode when the format under Control Panel -> Sound (in Windows) is configured to mach the format of your audio (especially the sample frequency).

I always make sure the Windows Sound utility's format setting matches what is being output by Winamp. But as I said before, the format that is output does not match the format of the source file. Does your plug-in read (and pass on) the format of the source file or the format that is passed to it by other plug-ins ahead of it in the processing chain?

Does your plug-in read (and pass on) the format of the source file or the format that is passed to it by other plug-ins ahead of it in the processing chain?

The plugin takes what WA gives to it. I think in your case it is the output from a DSP plugin (because an output plugin is always the last in the chain). You may ask DrO how chains of plugins are build ...

Ok, but the format is 24 bit, 96000 Hz, 6 channels which the Windows Sound configuration tool is setup to expect and it's working fine with the plug-ins I'm currently using (but they only support shared mode).

I don't want to annoy you, but logically your plug-in should work for me, but it doesn't. I'm just trying to understand why the Winamp DirectSound output plug-in accepts and passes on the signal to the WASAPI in an acceptable way and your output plug-in doesn't seem to.

Is it possible the 24 bits are being truncated to 16? I'm trying to figure out what may work without trying all the possible permutations. I'm afraid of what multiple crashes may do to my system.

The configuration dialog for the DirectSound output plug-in has a status page that shows the output format it is using. I use Matrix Mixer (http://sourceforge.net/projects/winampmatrixmix/) to do the up-sampling and up-mixing of the decoded input source and pass the resulting signal directly to a selectable output plug-in (in this case DirectSound, which is the default).

A DSP plug-in (if used) would process the signal after the appropriate input plug-in and before Matrix Mixer. I don't use the Winamp equalizer and I'm not sure if it's processing is done before or after a DSP plug-in. I assume WASAPI would apply a soundcard's or mobo soundchip's equalizing and/or DSP signal processing utilities (I don't use them either) to the signal after it leaves Winamp.

I sometimes use Stereo Tool (http://www.stereotool.com/), a DSP plug-in, to 'enhance' some of my lower quality mp3 files I've downloaded over the years. I don't need it for files I've ripped myself.

Quote:

Originally Posted by pbelkner

What is this? Could you please post a link?

Sorry for the confusion. I'm taking about the same Windows control panel utility you mentioned earlier

Please note that the new default options for buffer configuration are tested with internet radio. With the old default options internet radio was prone to glitches and pops even on my side because of huge fluctuations of the stream. With the new options it seems that these fluctuations are buffered sufficiently.