|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
|
![]() |
#1 |
Senior Member
Join Date: Jun 2010
Posts: 405
|
Yet Another (WA)SAPI Output Plugin for Winamp (YASAPI)
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.
|
![]() |
![]() |
#3 | |
Senior Member
Join Date: Jun 2010
Posts: 405
|
Quote:
http://out-yasapi.sourceforge.net/up...sapi-0.1.1.exeCould yo give it a try? |
|
![]() |
![]() |
#4 | |
Member
Join Date: Apr 2014
Posts: 55
|
Quote:
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? |
|
![]() |
![]() |
#5 | |
Member
Join Date: Oct 2011
Location: Melbourne Australia
Posts: 84
|
Quote:
![]() |
|
![]() |
![]() |
#6 | ||
Senior Member
Join Date: Jun 2010
Posts: 405
|
v0.2.0
@all:
Many thanks for the valuable feedback! 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:
![]() Quote:
For convenience, here are the links to the new 0.2.0 version:
|
||
![]() |
![]() |
#7 | |
Senior Member
Join Date: Jun 2010
Posts: 405
|
v0.3.0
Quote:
![]() For convenience, the relevant links:
|
|
![]() |
![]() |
#8 |
Member
Join Date: Apr 2014
Posts: 55
|
Awesome!
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. |
![]() |
![]() |
#9 | |
Senior Member
Join Date: Jun 2010
Posts: 405
|
Quote:
|
|
![]() |
![]() |
#10 |
Forum King
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,783
|
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.
I think this happens because I'm using another plug-in just ahead of yours in my processing chain. This other plug-in (Matrix Mixer) up-samples the decoded mp3 stereo input signal (16bits@44.1KHz) to 24bits@96KHz (to match my soundcard driver format settings) and up-mixes the stereo channels to 6 channels (to match my soundcard driver channel settings for my 5.1 speaker system). 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. Windows 10 Home 64-bit v20H2 desktop - Logitech Z906 5.1 speaker system |
![]() |
![]() |
#12 |
Senior Member
Join Date: Jun 2010
Posts: 405
|
|
![]() |
![]() |
#13 |
Forum King
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,783
|
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). ![]() Windows 10 Home 64-bit v20H2 desktop - Logitech Z906 5.1 speaker system |
![]() |
![]() |
#14 |
Senior Member
|
Hi, Here is the Screenshot of the new Version showing the error:
![]() hope that helps, Kind regards Raver |
![]() |
![]() |
#15 | |
Senior Member
Join Date: Jun 2010
Posts: 405
|
Quote:
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. |
|
![]() |
![]() |
#16 |
Forum King
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,783
|
That's the proof of what, exactly?
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. Windows 10 Home 64-bit v20H2 desktop - Logitech Z906 5.1 speaker system |
![]() |
![]() |
#17 |
Forum King
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,783
|
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. Windows 10 Home 64-bit v20H2 desktop - Logitech Z906 5.1 speaker system |
![]() |
![]() |
#18 |
Senior Member
Join Date: Jun 2010
Posts: 405
|
|
![]() |
![]() |
#19 |
Forum King
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,783
|
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. Sorry for the confusion. I'm taking about the same Windows control panel utility you mentioned earlier Windows 10 Home 64-bit v20H2 desktop - Logitech Z906 5.1 speaker system |
![]() |
![]() |
#20 | |
Senior Member
Join Date: Jun 2010
Posts: 405
|
Quote:
|
|
![]() |
![]() |
#21 |
Senior Member
Join Date: Jun 2010
Posts: 405
|
v0.4.0
What's new?
![]() 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.
|
![]() |
![]() |
#22 |
Junior Member
Join Date: Jul 2016
Posts: 1
|
hai, Got up to 4.9x buffer and Bjork stopped popping during playback. Even though loker 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? iam problem again... |
![]() |
![]() |
#23 |
Senior Member
Join Date: Jun 2010
Posts: 405
|
From the Common Options tab folder just enable Volume Control.
|
![]() |
![]() |
#24 |
Forum King
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,783
|
Hi pbelkner,
Does version 0.4.0 include a possible fix for my issue? Windows 10 Home 64-bit v20H2 desktop - Logitech Z906 5.1 speaker system |
![]() |
![]() |
#25 |
Senior Member
Join Date: Jun 2010
Posts: 405
|
|
![]() |
![]() |
#26 | |
Member
Join Date: Oct 2011
Location: Melbourne Australia
Posts: 84
|
Quote:
http://www.head-fi.org/t/588677/a-sh...w-maiko-wasapi Essentially, WASAPI routes the music without mixing it before reaching the speakers. You get the music as it is with no fancy sampling around. This works best with music encoded at high bit rates and great quality. It is also because of the music is not sampled, you would not get sound from other sources, but one (YASAPI output). This is by design. Hope this helps. Anyone wants to add? You are welcome @pbelkner Sorry I plugged in a guide to Maiko's plugin. I could not find any other guide to illustrate. I use your plugin since launch now so count me as your fan. Keep the work on the plugin ![]() ![]() |
|
![]() |
![]() |
#27 |
Senior Member
Join Date: Jun 2010
Posts: 405
|
|
![]() |
![]() |
#28 | |||
Senior Member
Join Date: Jun 2010
Posts: 405
|
Quote:
It should not happen in shared mode. Quote:
Quote:
You shouldn't have this problem with exclusive mode. If some sample rate is not supported in exclusive mode (e.g. 22.050) you should get AUDCLNT_E_UNSUPPORTED_FORMAT. |
|||
![]() |
![]() |
#29 |
Senior Member
Join Date: Jun 2010
Posts: 405
|
|
![]() |
![]() |
#30 |
Senior Member
Join Date: Jun 2010
Posts: 405
|
v0.5.0
What's new?
![]() Relevant links:
|
![]() |
![]() |
#31 | |
Junior Member
Join Date: Sep 2015
Posts: 24
|
Quote:
|
|
![]() |
![]() |
#32 |
Member
Join Date: Nov 2003
Posts: 77
|
Hi Peter!
I have just found your plugin, thanks for your work! 1. I got this error when I try to use: shared+push mode: S_FALSE: "yasapi_player.c" (140). (sampling rate is matched in Sound in Control panel, 44.1KHZ) I'm not using any dsp plugin. Exclusive mode is working fine. Winamp 5.581, yasapi 0.5, Win8.1 x64, hdmi out to Yamaha RX-A830. Thanks |
![]() |
![]() |
#33 | |
Senior Member
Join Date: Jun 2010
Posts: 405
|
Quote:
![]() EDIT: "yasapi_player.c" (140) is a call to IAudioClient::IsFormatSupported(). Last edited by pbelkner; 2nd October 2015 at 05:53. |
|
![]() |
![]() |
#34 | |
Member
Join Date: Nov 2003
Posts: 77
|
Quote:
I don't understand this part: "Not each mode is supported by each DAC." Only Exclusive+Push is working, not shared mode at all. But the old Maiko is working for me in shared mode. If you need some additional info/test, just tell me ![]() Thank you! EDIT: I have found out what the problem was with the shared mode (Maiko plugin helped me, I remembered that it upconverted the audio to 5.1 channels): - you have to set to stereo (2 channel) the speaker configuration!!! - and the output to: 16 bit, 44100Hz (otherwise I got back the line 140 error message, is this a bug in 0.6.1) My setup is: laptop -> hdmi -> av receiver -> hdmi -> tv I'm using MPC-HC (latest nightly also have an internal wasapi renderer) for videos, movies , and I set it to use exclusive mode (it required to bitsreaming the supported format to the receiver), so a 2 channel source can be upconverted to 5.1 by putting AC3filter at the end of the directshow chain (outputs 5.1 pcm). So the setup seems to be perfect in this way! ![]() Bug (?): all the modes are working except for Exclusive+Pull (I'm using Shared+Push now) (I'm using the sse version) Feature request (if you are in the mood): - create a select box where we can choose the device to playback with, e.g. SytemDefault, device1, device2.... (you can check the source code of MPC-HC, how did they implemented it) - proper upsampling and downsampling in shared mode - create a checkbox called "Allow audio channel up/downmixing" (which would change the channels to the system speaker configuration) (Funny part is that I came here from the linux world: in Ubuntu the same problem exists. The main audio driver is ALSA and there's a userspace daemon called PulseAudio which is a mixer layer on top of that, and unfortunately it ruins the audio quality the same way as the builtin Windows mixer does. It turned out that couple of audio (Audacoius, Clementine, etc)and video player (Smplayer, etc) can output audio directly to the ALSA device, so it can use exclusive or shared mode of the audio device. The result is the same as in Windows: more dynamic sound! And Google Chrome browser also has an "--enable-exclusive-audio" command-line switch! ![]() Thanks again! Last edited by chros; 6th October 2015 at 21:10. |
|
![]() |
![]() |
#35 |
Junior Member
Join Date: Feb 2003
Posts: 21
|
I tried this plugin on my Windows 64 bit with SA stereotool dsp but I do not get any sound at all. The spectrum analyzer display is also erratic and the scrolling of the musical selection is accelerated for some reason.
|
![]() |
![]() |
#36 | |
Senior Member
Join Date: Jun 2010
Posts: 405
|
Quote:
Have you tried the YASPI plugin without any DSP? |
|
![]() |
![]() |
#37 | |
Junior Member
Join Date: Feb 2003
Posts: 21
|
Quote:
Yes with the same result |
|
![]() |
![]() |
#38 |
Junior Member
Join Date: Sep 2015
Posts: 1
|
The bug of S_FALSE and AUDCLNT_E_UNSUPPORTED_FORMAT maybe a barrier to me.
Iam using Windows 10 and an USB Sound Card. I was using Maiko WASAPI since Windows 8.1, it works well until Windows 10. Sound sometimes freezes and the only way to get it back is unplug the USB cable then plug it again. It happens every 1 or 2 hours. I see that your plugin works better to me. Of course Exclusive settings are poor (compair to Maiko's), but I always use Shared Mode so your plugin is almost perfect without the bug above. What gonna happen if I have a lot of songs with various bitrate? I believe that almost people in here, who using your plugin do have. And when I was deep in a sweet melody, the error popup appears interrupting my moment, I have to close error reporting windows, go to sound settings -> device settings -> change my default format -> open Winamp again -> choose next song??? And if I was lucky, I will remember to change it again before next song plays, cause next song is stored at another sampling. Bad story. I know it is not a bug, it's what you called "by design" but I did not see any output methods requires me to change sound sampling matching song's sampling. You should have better solution for this. |
![]() |
![]() |
#39 | ||
Senior Member
Join Date: Jun 2010
Posts: 405
|
Quote:
In such a case Maiko silently does sample rate conversion (SRC). But why using WASPI in conjunction with SRC and not DS? SRC is exactly what DS adds to the bill. WASAPI + SRC = DS! Quote:
If WASAPI of your sound card supports all of you're frequencies you may use WASAPI in exclusive mode. That's where YASAPI is designed for. Otherwise YASAPI is not for you, just use DS! |
||
![]() |
![]() |
#40 |
Senior Member
Join Date: Aug 2013
Posts: 129
|
Sorry,there is BUG:
(hp g4-1060tx laptop,i5-2410M CPU @2.3GHz,4G RAM,win7_x64,Winamp 5.666) 1.Too hard to use, high delay. 2.Not support 24bit. |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|