[Y]et [A]nother WA[SAPI] [N]ew [T]echnology [Out]put Plugin for Winamp (out_yasapi-nt)

Last updated on 201007-0848

Copyright © 2015-2019 by Peter Belkner <info@pbelkner.de>

[Y]et [A]nother WA[SAPI] [N]ew [T]echnology [Out]put Plugin for Winamp (out_yasapi-nt) (out_yasapi-nt) 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.

out_yasapi-nt 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 out_yasapi-nt.  If not, see <http://www.gnu.org/licenses/>.

Please note that any remark on this sites is just art. Of course, its aim is to trigger some thoughts in your mind. But please hesitate projecting them back on us, i.e. don't assume those thoughts are ours

[Y]et [A]nother WA[SAPI] [N]ew [T]echnology [Out]put Plugin for Winamp (out_yasapi-nt) 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). YASAPI/NT Output may serve as a replacement for any other Winamp Output.

In order to understand the difference between YASAPI/NT and it's hijacked predecessor YASAPI read this first.

Nanos gigantum humeris insidentes: This project is dedicated to my German heritage. It is strictly to be understood as a statement against the "sweet" liberal lie of "multiculturalism" which is going to destroy Europe as we know it, in particular against the Merkel regime selling out Europe for nothing as we watch. #WLM

PLEASE NOTE THAT THIS PROJECT IS AN EXPERIMENTAL RATHER THEN AN INDUSTRIAL STRENGTH EFFORT. THIS PROJECT IS NOT FOR YOU. IT IS FOR ME IN ORDER TO LEARN SOMETHING. IF THER'S SOMETHING ALONG THE WAY I CAN DO FOR YOU THAT'S GREAT!

Home:   http://pbelkner.de/projects/web/out-yasapi/
Download:   http://pbelkner.de/projects/files/out-yasapi/out_yasapi-nt/
Winamp Forum:   http://forums.winamp.com/showthread.php?t=380396 (discontinued)
 
Input Plugin:   http://pbelkner.de/projects/web/in-ffsox/
Loudness Normalization:   http://pbelkner.de/projects/web/bs1770gain/
    http://r128gain.sourceforge.net/
Keep HDD Awake:   http://gen-hdd.sourceforge.net/
Yet Another Shuffle:   http://pbelkner.de/projects/web/yapib/

Content

  1. News
  2. Introduction
  3. Sequence Diagram
  4. Installation
  5. Implementation
  6. Configuration
  7. References
  8. A Message Silently Disappearing from the Winamp Forums
  9. Some Additional Notes Regarding the Lovely Parasite 

Note: You may toggle the size of most images by clicking on them.

1. News

If you prefer all entries of section News loaded at start-up you should go here.

Date Release Remarks
2020-06-03
pinned
 
  • As it seems our days at Sourceforge are counted. At least we’ve received a respective ultimatum:

    Isn‘t it funny that this is happening at the exact same time as Donald J. Trump is going to crack down all that commie scum?

  • 2020-06-09 − These days where anything and everything has a motto it remains Sorceforge’s secret why prohibiting a motto in favor of one’s own people. Anyway, we’re going to leave: In order to comply formally with their ”policies“ this page ill simply be replaced by something similar to dummy-doc/index.html.
  • 2020-06-14 − The project has been moved to http://pbelkner.de/.
  • 2020-06-30 − We’ve changed the above tag: #TeamWhite#WLM.


    (C) by FOCUS Online
2020-06-23  
  • By pure accident we’ve stumbled across this:

    “I won’t be trying to update it to use YASAPI/NT since despite the code licensing the author of the plug-in has not made using GPL’d code a nice experience nor has their actions to numerous users been nice to see).”: Ha, ha, ha, spast: Treffer, versenkt!!! For sure, you’ll never again will go and steel away our software :-)))))))))))))))))))))))))))))

  • 2020-06-24 − We simply did what we’ve promised to RMS himself:

2020-05-07  
  • Chris reported that the plug-in seemed not to load on Windows 10.
  • Fortunately, this could be resolved by using the plug-in's gcc version.
  • Hence we changed the default download from msc-bundle to gcc-bundle.
  • Please note that the plug-in is developed on Windows 7.
2019-10-31 2.3.5 Made the plug-in more robust for being run from an unexpected environment. (Many thanks again Ralf!)
2019-10-21 2.3.4
  • Brought back the dialog for choosing the installation directory of the GTK runtime (cf. below) which for some unknown reason had been vaporized (thanks a lot Ralf.)
  • Corrected counting broken sessions.
2019-06-27  
2019-06-02  
  • In case you try downloading "winamp58_3660_beta_full_en-us.exe" from the source (i.e. from winamp.com) you may experience that it's not possible because their certificate has been expired (already for some time):
     
  • It's, of course, possible to download e.g. by means of the wget command:
    # wget 'https://download.nullsoft.com/winamp/client/winamp58_3660_beta_full_en-us.exe' --no-check-certificate
    --2019-06-02 07:24:43--  https://download.nullsoft.com/winamp/client/winamp58_3660_beta_full_en-us.exe
    Resolving download.nullsoft.com (download.nullsoft.com)... 5.39.58.66
    Connecting to download.nullsoft.com (download.nullsoft.com)|5.39.58.66|:443... connected.
    WARNING: cannot verify download.nullsoft.com's certificate, issued by ‘CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US’:
      Unable to locally verify the issuer's authority.
    HTTP request sent, awaiting response... 302 Found
    Location: https://download.nullsoft.com/winamp/misc/winamp58_3660_beta_full_en-us.exe [following]
    --2019-06-02 07:24:44--  https://download.nullsoft.com/winamp/misc/winamp58_3660_beta_full_en-us.exe
    Reusing existing connection to download.nullsoft.com:443.
    HTTP request sent, awaiting response... 200 OK
    Length: 8201952 (7.8M) [application/x-msdos-program]
    Saving to: ‘winamp58_3660_beta_full_en-us.exe’
    
    winamp58_3660_beta_full_en-us 100%[=================================================>]   7.82M  1.68MB/s    in 4.8s
    
    2019-06-02 07:24:48 (1.64 MB/s) - ‘winamp58_3660_beta_full_en-us.exe’ saved [8201952/8201952]
  • Update: Seems to be fixed.
2019-05-28 2.3.3
  • Most likely you've read the following message a few days ago appearing on the Winamp forum:
  • Because of that we ask some of our users we're convinced really exist whether they can confirm because we're on a hopelessly outdated Windows 7 system and hence cannot tell whether it's running on Windows 8.1 or Windows 10 (apart from technical issusses caused by drivers and devices.)
  • As expected, the only thing they confirm is that it's up and running. Many thanks to everyone contributing to the survey!
  • One of the users, Diimaan from India, took the opportunity to report some problems he experienced on his system with exclusive mode where calling the IAudioClient::Initialize method was returning with some error message.
  • Jointly we where able to resolve the issue with exclusive/push (you may have noticed undocumented v2.3.3-β1, v2.3.3-β2, v2.3.3-β3, and v2.3.3-β4 needed for respective communications):
    • The error code returned was AUDCLNT_E_UNSUPPORTED_FORMAT, an error code
    • This brouht us to the idea to introduce an additional call to IAudioClient::IsFormatSupported in front of IAudioClient::Initialize and voilà the issue was fixed. (Please note that to our knowledge it is undocumented that calling IAudioClient::IsFormatSupported in front of IAudioClient::Initialize is mandatory.)
  • Unfortunately, it was not possible to resolve the issue with exclusive/pull where on Diimaan's system calling the IAudioClient::Initialize method repeatetdly returns with error AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED:
    • Error AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED should be healed by the alignment dance.
    • Unfortunately, this doesn't help here because the alignment dance has alredy taken place (indicated by repeatedly contained in YASAPI/NT's error message.)
    • Anyway, we found a bug in YASAP/NT's implementation of the alignment dance and fixed it. Unfortunately, this doesn't help either (we on our system are not able to test the alignment dance's implemetation because error AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED is not appearing.)
  • Thanks a lot Diimaan!
  • This release is bundeled with the latest v190528-0620, of the GTK+ runtime.
2019-05-12 2.3.2 A few days after having published the below fix, the issue appeared again on our system. Of course, it is not sufficient to just have the event object in place, we should also fire it when un-pausing! (Viewed this way the additional event object might be completely superfluous - anyway, it doesn't hurt.)
2019-05-12   Ratatosk: German Doomer caught on camera
2019-04-06 2.3.1 load
2019-04-06  
2019-03-14   load
2019-02-28 2.3.0 load
2019-02-02   load
2019-02-02 2.3.0-β13 load
2019-01-14 2.3.0-β12 load
2019-01-10 2.3.0-β11 load
2019-01-06 2.3.0-β10 load
2018-12-31  
  • Lovely Parasite , may we remind you on your promise?
  • Is that all???
  • Erreicht den Hof mit Mühe und Not;
    In seinen Armen das Kind war tot.
    He reaches his courtyard with toil and with dread, –
    The child in his arms finds he motionless, dead.
    Johann Wolfgang von Goethe: Erlkönig
  • Not reached yet, surprise, surprise: "the public WACUP preview build is now aimed for the 1st or 2nd"
  • Lovely Parasite  (the future of Winamp ), guess what? We're tired of waiting.
  • Update 19-01-03: The Lovely Parasite  finally has shipped its effort. We've given it a try:
    • First impression: Trying to install in portable mode (on a system partition) crashes.
    • It still comes with a stolen version of this plugin (cf. here and here. BTW: That's the only innovation since ages regarding Winamp's core functionality: audio reproduction.) The plug-in's crash seems to be "fixed" just cosmetically: double buffered mode now simply does not work (without notice.)
    • Summary: This is a "product" nobody needs. Nothing other than GUI gimmicks without any benefit we had to wait for about three years The future of Winamp
    • Because we don't want to further honor the Parasite we've decided to stop commenting on it because we feel that the ones really interested in WASAPI will find their way to this page anyway and will not support the Parasite's effort just because of WASAPI.
    • Thanks again to the talented engineers at Nullsoft who had designed already by the late nineties an API to Winamp still open enough these days for low-latency audio, and the engineers at Microsoft for crafting WASAPI.
  • Update 19-01-05: How does it go that the Parasite's effort (technically nothing other than a wrapper to an outdated Winamp) is hyped by some MSM as soon as it appeares (delayed by half a year according to the Parasite's primary announcement)? Why the Parasite got stuck to an outdated Winamp and does not upgrade to a decent version? Think about it! (Hint to the latter: Even Herrschaftswissen is getting outdated when not getting refreshed )
  • Update 19-01-19: As of today there's another Lovely Parasite's  victim: Otachan who made the source code of his famous out_asio plug-in publicly available:

  • Update 19-05-23: As an answer to a post hyping the Parasite as the The future of Winamp a message appeared on the WA-forum perfectly nailing down what's going on there:
  • Update 19-05-30: Those SJWs really believe they're the good ones

    where indeed they're nothing other than crypto-communist parasites, e.g. radio presenter and general purpose nerd:

    Please note what this particular idiotic SJW is letting us know about his occupation: Evil Genius.
    MWAHAHAHAhahahahahaaaaaaa. . aaa.aaa.aa...a...a.a
    *cough cough cough*
2018-12-30 2.3.0-β9 load
2018-12-18 2.3.0-β8 load
2018-12-13 2.3.0-β7 load
2018-12-13 2.3.0-β6 load
2018-12-12 2.3.0-β5 load
2018-12-08 2.3.0-β4 load
2018-12-06 2.3.0-β3 load
2018-12-01 2.3.0-β1 load
2018-11-29   load
2018-10-24   load
2018-10-22   load
2018-10-20 2.2.0-β5 load
2018-10-19   load
2018-10-17   load
2018-09-28 2.2.0-β4 load
2018-09-28   load
2018-09-19   load
2018-09-16 2.2.0-β3 load
2018-09-16 2.2.0-β2 load
2018-09-14   load
2018-09-08   load
2018-09-06   load
2018-09-05   load
2018-09-01   load
2018-08-31   load
2018-08-30   load
2018-08-26   load
2018-08-25   load
2018-08-18 2.2.0-β1 load
2018-07-15 2.1.0 load
2018-07-05   load
2018-06-24 2.1.0-β6 load
2018-06-24   load
2018-06-03 2.1.0-β5 load
2018-06-01   load
2018-05-27 2.1.0-β4 load
2018-05-20 2.1.0-β3 load
2018-05-18 2.1.0-β2 load
2018-05-13 2.1.0-β1 load
2018-05-09   load
2018-05-06 2.0.0 load
2018-05-06   load
2018-05-05   load
2018-04-30   load
2018-04-29 2.0.0-β10 load
2018-04-28 2.0.0-β9 load
2018-04-28 2.0.0-β8 load
2018-04-26 2.0.0-β7 load
2018-04-23 2.0.0-β6 load
2018-04-22 2.0.0-β5 load
2018-04-20   load
2018-04-20 2.0.0-β4 load
2018-04-20   load
2018-04-19   load
2018-04-16 2.0.0-β3 load
2018-04-12 2.2.0-β2 load
2018-04-11   load
2018-04-08 2.0.0-β1
  • We're back again: This is a preview of what you might expect to come. It's re-written from scratch with several improvements, hence we called it New Technology (NT). It's our attempt getting rid of annoying nasty Parasites  because we assume that those Parasites  are silly coders just being able to do some silly native win32 GUI coding based on drawn dialogs created with the help of some resource editor and hence we no longer provide a resource file.
  • This NT version is superior to any prior version by any means and does let any prior version look just like a silly prototype:
    • Exclusive pulled (i.e. double bufferered) playback is fully supported.
    • In case of pushed playback a periodic timer may be utilized. This allows for a wonderful symmetric solution compared to pulled playback where no timer is needed at all and playback is triggered in high accuracy by the device itself.
    • Initialization of any resource is deferred until it actually is needed. This way the plug-in's footprint at Winamp start-up time is the lowest possible, i.e. you will not notice whether it is installed.
    • Avoided any instance of busy waiting. In any attempt to fall back on it substituted it by thread synchronization means, i.e. WaitFor[Single/Multiple]Object[s]()/SetEvent() or g_cond_wait()/g_cond_signal() functions, respectively.
  • The GUI (i.e. the Configuration and About dialogs) were made from the great GTK+ toolkit.
  • You might fear that building on Gtk+ might pose some overhead compared to a native Windows implementation:
    • This is, of course, true.
    • But you should note that this is constraint to GUI/configuration and not to playback.
    • As long as you don't make use of the GUI there is no difference to a plain Windows WASAPI implementation. WASAPI is, of course, 100% Windows and nothing else.
    • Loading the GTK+ DLLs in a Winamp session is deferred until the Config or About buttons, respectively, are hit for the first time. To give an impression on the overhead of loading the GTK+ DLLs we display a wait cursor during the time it takes. (Be warned and be patient, especially when GTK+ has to be loaded after re-booting your system!) Once the DLLs required for GTK+ are loaded there is no measurable difference between GTK+ and a native Windows GUI.
    • Last but not least please remember the above note: This was the perfect opportunity for us to dive into the world of GTK+ programming. The result is more than satisfying.
  • This preview has the following limitations:
    • Format conversions (i.e. monto to stereo and bit depth conversions) are not implemented yet.
    • Volume control is not implemented yet.
    • Gapless playback is not implemented yet.
    • The documentation is not fully updated yet. (Updating might continue during the next days.) The documentation of previous versions is available here.
2018-02-16   load
2017-04-27   load
2017-01-10   load
2016-11-10   load
2016-08-11   Just recently it came to our attention that a creature calling itself "DrO" (update 2018-04-08: according to the silly "one world" ideology ruling the so called "western world" it is just a "human being" without any individual properties discriminating it from others, just like an ant in a bath full of infinite many undistinguishible ants; you shouldn't have any doubt that in a literal sense it is "equal" to you and me by any means, just like in liberté, égalité, fraternité advertises a silly and buggy clone of this plug-in with just a few lines of code errornous changed (out of about 20.000 and his name added to the About box) he advertises under the name of Not So YASAPI Output Plug-in. Be careful and get not mixed up! The original YASAPI plug-in indeed comes from this site and SourceForge (as usual!) Luckily and thanks to the GPL3 the "author" of this silly clone had to leave the original copyright notice and the reference to this site intact!
2016-08-06 1.7.25 load
2016-07-30 1.7.24 load
2016-07-19 1.7.23 load
2016-07-15 1.7.22 load
2016-07-12 1.7.21 load
2016-07-08 1.7.20 load
2016-07-05 1.7.19 load
2016-07-03 1.7.18 load
2016-07-03 1.7.18 load
2016-07-30 1.7.17 load
2016-07-30 1.7.15 load
2016-06-27 1.7.10 load
2016-06-23 1.7.4 load
2016-06-21 1.7.1 load
2016-06-20 1.7.0 load
2016-06-19 1.6.14 load
2016-06-14 1.6.11 load
2016-06-13 1.6.9 load
2016-06-11 1.6.8 load
2016-06-12 1.6.7 load
2016-06-12 1.6.6 load
2016-06-12 1.6.5 load
2016-05-29 1.6.4 load
2016-05-26 1.6.3 load
2016-05-22 1.6.0 load
2016-05-17 1.5.4 load
2016-05-17 1.5.3 load
2016-05-16 1.5.0 load
2016-04-09 1.0.7 load
2016-01-13 1.0.6 load
2016-01-09 1.0.0 load
2016-01-03 1.16.0 load
2015-12-21 1.16.5 load
2015-12-10 1.14.1 load
2015-12-08 1.14.0 load
2015-12-04 1.11.0 load
2015-11-29 1.10.0 load
2015-11-23 1.9.1 load
2015-11-22 1.9.0 load
2015-11-02   load
2015-10-31 1.8.2 load
2015-10-30 1.8.1 load
2015-10-29 1.8.0 load
2015-10-26 1.7.1 load
2015-10-26 1.7.0 load
2015-10-03 1.6.1 load
2015-10-03 1.6.0 load
2015-02-14 1.5.0 load
2015-01-30 1.4.0 load
2015-01-25 1.3.0 load
2015-01-24 0.2.1 load
2015-01-24 0.2.0 load
2015-01-23 0.1.0 Initial release.

2. Introduction

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:

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 plug-in is to make the WASAPI exclusive mode for audio rendering available to the users of Winamp.

The name of the plug-in was choosen because there are already at least two WASAPI output plug-in for Winamp:

3. Sequence Diagram

The following sequence diagram taken from the documentation v0.1 (describing to some extend YASAPI/NT v2.2-β5) was created using the impressive plantuml tool.

Note:    In case you know the "official" UML way to model threads please drop us a line (pbelkner@snafu.de.)

4. Installation

Installation is as easy as downloading and running the latest NSIS installer from the project's download page.

Even if the plug-in runs without any further Configuration (not very likely) you may wish to configure it. In order to enable configuration you need some GTK runtime. You have two choices to make the plug-in familiar with a GTK runtime:

  1. The easy way:
  2. The expert way:

5. Implementation

There are two sides the YASAPI plug-in 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 plug-in implements the first two strategies, i.e. the ones based on the push model.

The push model, in principle, works as follows:

  1. Query the size of the buffer shared with the audio device.
  2. Fill in completety the buffer shared with the audio device.
  3. Start playing.
  4. Loop until the track is played:
    1. Sleep half of the time corresponding to the size of the buffer shared with the audio device.
    2. Into the buffer shared with the audio device, fill in the gap which was growing free by playing during sleep.
  5. Sleep until the possibly remaining filled rest of the buffer shared with the audio device was played.
  6. Stop playing.

But the YASAPI plug-in 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 plug-in 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 plug-in's WASAPI component shares with the audio device.

6. Configuration

The YASAPI/NT plug-in comes with a configuration dialog which described in the following. The configuration dialog's top region presents the most important parameters:

Below the top region you find a notebook control consisting of five pages:

The notebook control's first page labelled Common looks as follows:

On the next page labeled WASAPI there are the following per device options:

On the next page labeled YASAPI/NT there are the following per device options:

The next page labeled Monitor looks the following:

The final page labeled Explore looks the following:

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
As a rule of thumb all buffer sizes should be 1.0 except the ring buffer's size which should be just a small amount greater then 1.0.

Please note that no option takes effect before hitting the OK button.

7. References

Just to name a few we'd like to thank (in no particular order)

8. A Message Silently Disappearing from the Winamp Forums

The following message posted by me to the top-level (sticky) thread Winamp News in forum the Winamp Discussion forum silently disappeared without any comment:

Dear DJ Egg,

I'm not certain whether you are the right person to address my reqest.. I'm not even certain about who rules this forum. My impression is that you are the only one "official" left (i.e. one with a contract to the owners of Winamp). All the rest including this forum's moderators seem to be volunteers.

As you may have noticed, since some time I have a conflict with some of the former contractors of Winamp, "DrO", regarding the question of intellectual property. As it turns out, this former contractor, "DrO", disrespects intellectual property. He advertises a product he calls "Not So YASAPI Output Plug-in v1.0 Beta" which is a close to 100% clone of YASAPI (cf. here for details).

As it turns out that at the blog of "DrO" some of his fanboys comment we know by their nicknames are frequent posters of this forum, among them some Pawel:

Could you please investigate whether this Pawel is identical to this forum's moderator with the same nickname and in case it turns out to be true fire him from his job as a moderator?

Thank you in advance and best regards,

Peter

9. Some Additional Notes Regarding the Lovely Parasite 

On his blog the Lovely Parasite  claims:

That's of course true. And I'm the last one to have ever told something different. But if doing so, changing just a few lines of code out of about 20.000 just in order to rectify putting his name on the product I consider a clear case of plagiarism:

For further details refer to the Winamp forum.

The Lovely Parasite's  further explanations are simply laughable:

Darren, it's not your WASAPI plug-in, it's mine. Even with that little changes you've made you've perfectly demonstrated that you don't have the slightest idea on how this (my) plug-in is supposed to work and you've managed introducing a major bug into the configuration.

Update 2018-02-16:

Meanwhile the Lovely Parasite  on his web site confirms that his buggy GPL clone is just a fake and that he's distributing (by violating YASAPI's license) a non GPL version to registered so called "beta testers":

As it seems, this way he (the "Hero Member" , what kind of people are attracted by such a spast?) likes to trick users into registering.


Disclaimer: Mit Urteil vom 12. Mai 1998 − 312 O 85/98 − “Haftung für Links” hat das Landgericht (LG) Hamburg entschieden, daß man durch das Setzen eines Links, die Inhalte der gelinkten Seite ggf. mit zu verantworten hat. Dies kann − so das LG − nur dadurch verhindert werden, daß man sich ausdrücklich von diesen Inhalten distanziert. Hiermit distanzieren wir uns ausdrücklich von den verlinkten bzw. zitierten oder als Zitat übernommenen Seiten.