This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
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.
Home: | http://out-yasapi.sourceforge.net/ | |
Project: | http://sourceforge.net/projects/out-yasapi/ | |
Download: | http://sourceforge.net/projects/out-yasapi/files/out-yasapi/ |
2015-01-25 | 0.3.0 |
|
2015-01-24 | 0.2.1 |
|
2015-01-24 | 0.2.0 |
|
2015-01-23 | 0.1.0 | Initial release. |
According to Microsoft:
The Core Audio APIs were introduced in Windows Vista. This is a new set of user-mode audio components provides client applications with improved audio capabilities. These capabilities include the following:
- Low-latency, glitch-resilient audio streaming.
- Improved reliability (many audio functions have moved from kernel mode to user mode).
- Improved security (processing of protected audio content takes place in a secure, lower-privilege process).
- Assignment of particular system-wide roles (console, multimedia, and communications) to individual audio devices.
- Software abstraction of the audio endpoint devices (for example, speakers, headphones, and microphones) that the user manipulates directly.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd370784%28v=vs.85%29.aspx
Of special interest is that there is an exclusive mode for rendering audio, i.e. there is a mode where an application has exclusive access to the audio device without being disturbed by third parties.
The aim of the YASAPI plugin is to make the WASAPI exclusive mode for audio rendering available to the users of Winamp.
The name of the plugin was choosen because there are already at least two WASAPI output plugins for Winamp:
There are two sides the YASAPI plugin has to take into account:
The implementation on the WASAPI side follows along the lines of an example provided by Microsoft. The startegy shown in this example is not only applicable for shared mode streams but also for exclusive mode ones, i.e. not the share mode should be emphasized but what is known as the push model. There is also an example demonstrating the pull model in conjunction with the exclusive mode. In that sence there are four strategies:
The YASAPI plugin implements the first two strategies, i.e. the ones based on the push model.
The push model, in principle, works as follows:
But the YASAPI plugin not only has to take into account the
WASAPI side (the loop consisting of sleeping and writing to the
audio device) but also the Winamp side because Winamp provides
the audio samples which should be played in an completely
unpredictable way.
The YASAPI plugin decouples the two sides by means of a
ring or circular buffer.
That way,
According to step 2 of the push model sketched above,
it shoud become clear that the ring buffer should be at least as
large (or larger) as the buffer the plugin's WASAPI component shares
with the audio device.
The YASAPI plugin comes with the following configuration dialog:
There are the following options:
In case something went wrong you may be interested in some more
information. In order to utilize this there is a debug version
of the plugin (distinguished by a lower case "d" at the and of
the name, i.e. out_yasapid.dll) available from the
download site.
Do the following:
The debug console.
You can get rid of the debug console by choosing the respective
option from the debug YASAPI plugin's configuration dialog:
Please note that no option takes effect before hitting the OK button.
4. Configuration
From the above sketch of the push model it shold be clear
that the following relation holds (which is enforced by the configuration dialog):
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
5. Debug