define(M4_URL,$1)dnl define(M4_REF_EXT,$2)dnl define(M4_REF_INT,$2)dnl define(M4_MARK,$2)dnl define(M4_EM,$1)dnl define(M4_BOLD,$1)dnl define(M4_PARASITE,M4_EM(parasite))dnl define(M4_V2_0_0_UNDEFINED,0)dnl define(M4_V2_0_0_DEFINED,1)dnl define(M4_V2_0_0,M4_V2_0_0_UNDEFINED)dnl Yet Another (WA)SAPI (YASAPI) NT Output Plugin for Winamp

Yet Another (WA)SAPI (YASAPI) NT Output Plugin for Winamp

Copyright © 2015-2018 by Peter Belkner (M4_URL(`http://home.snafu.de/pbelkner/'))

Yet Another (WA)SAPI (YASAPI) NT Output for Winamp (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 M4_REF_EXT(`http://www.gnu.org/licenses/',<http://www.gnu.org/licenses/>).

Yet Another (WA)SAPI (YASAPI) NT Output for Winamp 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.

M4_MARK(`political')M4_REF_EXT(`https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants',`Nanos gigantum humeris insidentes'): This project is dedicated to my European 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.

M4_MARK(`note')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 THERE IS SOMETHING ALONG THE WAY I CAN DO FOR YOU THAT'S GREAT!

Home:   M4_URL(`http://out-yasapi.sourceforge.net/')
Project:   M4_URL(`http://sourceforge.net/projects/out-yasapi/')
Download:   M4_URL(`http://sourceforge.net/projects/out-yasapi/files/out-yasapi/')
Winamp Forum:   M4_URL(`http://forums.winamp.com/showthread.php?t=380396') (discontinued)
 
Input Plugin:   M4_URL(`http://in-ffsox.sourceforge.net/')
Loudness Normalization:   M4_URL(`http://bs1770gain.sourceforge.net/')
    M4_URL(`http://r128gain.sourceforge.net/')
Keep HDD Awake:   M4_URL(`http://gen-hdd.sourceforge.net/')
Yet Another Shuffle:   M4_URL(`http://gen-yas.sourceforge.net/')

Content

    define(M4_CHAPTER_HISTORY,1)dnl define(M4_CHAPTER_HISTORY_MARK,hist)dnl define(M4_CHAPTER_HISTORY_HEAD,History)dnl
  1. M4_CHAPTER_HISTORY_HEAD define(M4_CHAPTER_WHY_UNDEFINED,1)dnl define(M4_CHAPTER_WHY_DEFINED,2)dnl define(M4_CHAPTER_WHY,M4_CHAPTER_WHY_UNDEFINED)dnl ifelse(M4_CHAPTER_WHY,M4_CHAPTER_WHY_DEFINED, define(M4_CHAPTER_WHY_HEAD,Why YASAPI NT?)dnl define(M4_CHAPTER_WHY_MARK,why)dnl
  2. M4_CHAPTER_WHY_HEAD) define(M4_CHAPTER_INTRO,incr(M4_CHAPTER_WHY))dnl define(M4_CHAPTER_INTRO_MARK,intro)dnl define(M4_CHAPTER_INTRO_HEAD,Introduction)dnl
  3. M4_CHAPTER_INTRO_HEAD define(M4_CHAPTER_INSTALL,incr(M4_CHAPTER_INTRO))dnl define(M4_CHAPTER_INSTALL_MARK,install)dnl define(M4_CHAPTER_INSTALL_HEAD,Installation)dnl
  4. M4_CHAPTER_INSTALL_HEAD define(M4_CHAPTER_IMPLEMENT,incr(M4_CHAPTER_INSTALL))dnl define(M4_CHAPTER_IMPLEMENT_MARK,implement)dnl define(M4_CHAPTER_IMPLEMENT_HEAD,Implementation)dnl
  5. M4_CHAPTER_IMPLEMENT_HEAD define(M4_CHAPTER_CONFIG,incr(M4_CHAPTER_IMPLEMENT))dnl define(M4_CHAPTER_CONFIG_MARK,config)dnl define(M4_CHAPTER_CONFIG_HEAD,Configuration)dnl
  6. M4_CHAPTER_CONFIG_HEAD define(M4_CHAPTER_REF,incr(M4_CHAPTER_CONFIG))dnl define(M4_CHAPTER_REF_MARK,ref)dnl define(M4_CHAPTER_REF_HEAD,References)dnl
  7. M4_CHAPTER_REF_HEAD define(M4_CHAPTER_MESSAGE,incr(M4_CHAPTER_REF))dnl define(M4_CHAPTER_MESSAGE_MARK,message)dnl define(M4_CHAPTER_MESSAGE_HEAD,A Message Silently Disappearing from the Winamp Forums)dnl
  8. M4_CHAPTER_MESSAGE_HEAD define(M4_CHAPTER_PARASITE,incr(M4_CHAPTER_MESSAGE))dnl define(M4_CHAPTER_PARASITE_MARK,parasite)dnl define(M4_CHAPTER_PARASITE_HEAD,Some Additional Notes Regarding the Parasite)dnl
  9. M4_CHAPTER_PARASITE_HEAD
M4_MARK(M4_CHAPTER_HISTORY_MARK)

M4_CHAPTER_HISTORY. M4_CHAPTER_HISTORY_HEAD

ifelse(M4_CHAPTER_WHY,M4_CHAPTER_WHY_DEFINED, ) ifelse(M4_V2_0_0,M4_V2_0_0_DEFINED, )
    We tried to answer the M4_REF_INT(`question',`question') from the M4_PARASITE's forum in adding a paragraph M4_REF_INT(M4_CHAPTER_WHY_MARK,Why YASAPI NT) to this documenation.
2018-04-23 M4_MARK(2.0.0)M4_REF_EXT(https://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/2.0.0/,2.0.0)
  • Essentialy the same as M4_REF_INT(2.0.0-beta9,v2.0.0-β9) (except some minor changes, of course).
  • This milestone should provide a solid basis for moving on.
  • As M4_REF_INT(milestones,already outlined) the goal for the next milestone is to provide volume control. Our goal is not just provide some simple software solution but also support the M4_REF_EXT(https://msdn.microsoft.com/en-us/library/windows/desktop/dd316531(v=vs.85).aspx,ISimpleAudioVolume) and the M4_REF_EXT(https://msdn.microsoft.com/en-us/library/windows/desktop/dd370977(v=vs.85).aspx,IAudioStreamVolume) M4_EM(WASAPI) interfaces.
2018-04-29 M4_MARK(2.0.0-beta10)M4_REF_EXT(https://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/2.0.0-beta10/,2.0.0-β10) Fixed label M4_EM(Device Period) erroneous linked to combo box M4_EM(Strategy) and not to combo box M4_EM(Mode) as it should be.
2018-04-28 M4_MARK(2.0.0-beta9)M4_REF_EXT(https://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/2.0.0-beta9/,2.0.0-β9)
  • Just discovered that the M4_REF_INT(bitdepth,combo box) advertised with M4_REF_INT(2.0.0-beta6,v2.0.0-β6) was disabled. Now it should be fixed.
  • Worked on M4_EM(Pause) again.
2018-04-28 M4_MARK(2.0.0-beta8)M4_REF_EXT(https://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/2.0.0-beta8/,2.0.0-β8) Yet another β-version. While working on the sync issue we had a closer look at M4_EM(Pause) leading to some further improvements:
  • We have the impression that the remaining quirks can as well be observed with the standard M4_EM(DirectSound) output. Anyway, you shouldn't hit the M4_EM(Pause) button too frequent with no time left in between.
  • While looking at M4_EM(Pause) we came through another obstacle: M4_EM(Disconnect when Pause). This feature was fully implemented all the time but was disabled because it didn't work with M4_EM(Double Buffered) mode we're focussed on these days. With this mode and the option disabled the plug-in got immediatly stucked when un-pausing, i.e. the plug-in's M4_REF_EXT(https://msdn.microsoft.com/en-us/library/windows/desktop/dd370865(v=vs.85).aspx,IAudioClient) seemed not to M4_REF_EXT(https://msdn.microsoft.com/en-us/library/windows/desktop/dd370879(v=vs.85).aspx,start) again after having been M4_REF_EXT(https://msdn.microsoft.com/en-us/library/windows/desktop/dd370880(v=vs.85).aspx,stopped). This morning we had the right idea to finally resolve the issue: When in M4_EM(Double Buffered) mode it's not sufficient to just M4_REF_EXT(https://msdn.microsoft.com/en-us/library/windows/desktop/dd370880(v=vs.85).aspx,stop) the M4_REF_EXT(https://msdn.microsoft.com/en-us/library/windows/desktop/dd370865(v=vs.85).aspx,IAudioClient) but it also needs to be M4_REF_EXT(https://msdn.microsoft.com/en-us/library/windows/desktop/dd370880(v=vs.85).aspx,reset). Hence the M4_REF_INT(disconnect,Disconnect when Pause) feature is back again (also when in M4_EM(Double Buffered) mode, i.e. M4_EM(Pulled Exclusive) mode):
2018-04-26 M4_MARK(2.0.0-beta7)M4_REF_EXT(https://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/2.0.0-beta7/,2.0.0-β7) Needed another β-version because we've resolved a subtle synchronization issue: With this version the plug-in defers applying commands like M4_EM(Pause) or M4_EM(Flush) to be in sync with a playback cycle.
2018-04-23 M4_MARK(2.0.0-beta6)M4_REF_EXT(https://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/2.0.0-beta6/,2.0.0-β6)
  • M4_MARK(bitdepth)Implemented M4_EM(Bit Depth) conversions:
  • In case you try to convert to a format not supported by your device you might get an error like

    When getting such an error you should cross check with M4_EM(Configuration → Explore).
  • This might become M4_EM(v2.0.0).
  • M4_MARK(milestones)Our further plans are
    • M4_EM(v2.1.0): volume control, and
    • M4_EM(v2.2.0): gapless playback.
2018-04-22 M4_REF_EXT(`https://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/2.0.0-beta5/',`2.0.0-β5')
  • Our preferred mode using this plug-in is double buffered, i.e. exclusive pulled. With this mode we sometimes observed that the plug-in got stucked. As a source of this strange behaviour we identified an underflow of the plug-in's buffer.
  • Our solution is in such a case sending silence to WASAPI instead of reading from the plug-in's buffer and reporting the incident by means of Dropout counters under Configure → Monitor:
  • A rule of thumb for configuring the plug-in: Make the buffer as small as possible but not that small that dropouts occur.
  • Introduced preprocessing this WEB page by means of the M4_REF_EXT(`https://www.gnu.org/software/m4/manual/m4.html',`m4 macro processor') allowing for a much more flexible way of editing.
2018-04-20  
  • From the M4_REF_EXT(`http://forums.winamp.com/showpost.php?p=3144787&postcount=503',WA forum's YASAPI thread):
  • From the the M4_PARASITE's forum:
  • Who are those people prefering inferior products just for political reasons? Obviously they like being replaced by an uncivilized "people" with an IQ of about 70.
  • Anyway, we're not. To say it with a word by M4_REF_EXT(`https://en.wikipedia.org/wiki/Alexander_Gauland',`Alexander Gauland') (leader of the only M4_REF_EXT(`https://en.wikipedia.org/wiki/Democracy',`democratic party') in the M4_REF_EXT(`https://en.wikipedia.org/wiki/Bundestag',`german bundestag'), i.e. the only one in the sense of rule of the people, i.e. expressing - at least to some extend - people's will and not the will of some pluralist pressure group - M4_REF_EXT(`https://en.wikipedia.org/wiki/Alternative_for_Germany',`Alternative for Germany')): M4_REF_EXT(`https://www.br.de/bundestagswahl/afd-politiker-gauland-ueber-merkel-wir-werden-sie-jagen-100.html',`We will hunt them!') We'd like to add: M4_REF_EXT(`http://jungeuropa.de/gesamtverzeichnis/175/kulturrevolution-von-rechts',`Cultural Revolution from the Right!')
  • M4_MARK(`question')We doubt that people attracted by the M4_PARASITE know what WASAPI really is. It could be that the M4_PARASITE itself does not. We're convinced that they're satisfied by anything labelled "WASAPI" without asking any further question what's below the hoot. They shood stick with DS, really:
2018-04-20 M4_REF_EXT(`https://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/2.0.0-beta4/',`2.0.0-β4') The user already mentioned notified us by PM that selecting a device hadn't worked as expected. This preview release fixes this (silly) bug. Many thanks again Ralf!
M4_MARK(`fixrt')2018-04-20  
  • We've uploaded the (hopefully) fixed version 180412-1003 of the latest GTK runtime.
  • The reason the prior attempt was broken was that under the hood of remaining fully binary compatible the good people from the GTK team created a dependency to libfribidi-0.dll we'd not packaged.
  • In case you're interested in what the unsusual version numbers mean: They are constructed from the latest time stamp on MSYS2 of all files making up a complete runtime.
  • You can view the real versions by means of About → Versions. As far as we can see this time libgtk hasn't changed at all and libglib has a minor (but incompatible!) change from 2.56.0 up to 2.56.1:
  • We're now a step away from DepenencyWalker we once used to determine the DLLs needed (a tedious work we thought we're doing once and for all time) and started to create a shell script determining depencencies automatically by means of the commands strings in combination with grep (instead of DepenencyWalker).
  • Thanks again Ralf!
2018-04-19  
  • A user notified us by PM that the latest GTK runtime published on M4_REF_EXT(`https://sourceforge.net/projects/yagtk-rt/files/',`Sourceforge') is broken (it's not available any longer). Many thanks go out to Ralf!
  • For now you should revert to the prior version M4_REF_EXT(`https://sourceforge.net/projects/yagtk-rt/files/180403-0917/',`180403-0917') or stick to the expert approach.
  • Sorry for any inconvenience.
2018-04-16 M4_REF_EXT(`https://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/2.0.0-beta3/',`2.0.0-β3')
  • Introduced options for defining the positions in Z-order of the M4_EM(Configuration) and M4_EM(About) dialogs, respectively.
  • Fixed saving the coordinates of dialogs in case they are not visible.
  • Changed some identifiers which may have broken your configuration. Please double check.
2018-04-12 M4_REF_EXT(`https://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/2.0.0-beta2/',`2.0.0-β2') The second preview of what you might expect to come:
2018-04-11   We just noticed that on 2018-04-10, 04:19, the following M4_REF_EXT(`http://forums.winamp.com/showthread.php?s=e3f7adbb0a71891bb74427e67599c59f&p=3153134#post3153134',`new thread') appeared at the WA forum:
Might be a fan of us but please note that this message is not ours. We don't post at the WA forum for years now.
Anyway, we know at least one M4_PARASITE who likes tricking users into reporting to him and not to the plug-in's author:
2018-04-08 M4_REF_EXT(`https://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/2.0.0-beta1/',`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 M4_REF_EXT(`https://en.wikipedia.org/wiki/Busy_waiting',`busy waiting'). In any attempt to fall back on it substituted it by thread synchronization means, i.e. WaitFor[M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/ms687032(v=vs.85).aspx',`Single')/M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/ms687025(v=vs.85).aspx',`Multiple')]Object[s]()/M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/ms686211(v=vs.85).aspx',`SetEvent()') or M4_REF_EXT(`https://developer.gnome.org/glib/stable/glib-Threads.html#g-cond-wait',`g_cond_wait()')/M4_REF_EXT(`https://developer.gnome.org/glib/stable/glib-Threads.html#g-cond-signal',`g_cond_signal()') functions, respectively.
  • The GUI (i.e. the M4_REF_INT(M4_CHAPTER_CONFIG_MARK,M4_CHAPTER_CONFIG_HEAD) and About dialogs) were made from the great M4_REF_EXT(`https://www.gtk.org/',`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 M4_REF_INT(note,note): This was the perfect opportunity for me 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   Updated Some Additional Notes Regarding the Parasite.
2017-04-27   As a sort of side project to out_yasapi I've created milkdrop2-compile:
  • M4_URL(`https://sourceforge.net/projects/milkdrop2-compile/')
  • M4_URL(`https://sourceforge.net/projects/milkdrop2-compile/files/milkdrop2-compile/')
2017-01-10   Added a M4_REF_INT(political,`political statement') to the top of this page:
M4_REF_EXT(`https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants',`Nanos gigantum humeris insidentes'): This project is dedicated to my European 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.
M4_MARK(`2016-08-11')2016-08-11   Just recently it came to my 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 M4_REF_EXT(`https://en.wikipedia.org/wiki/Libert%C3%A9,_%C3%A9galit%C3%A9,_fraternit%C3%A9',`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 M4_REF_EXT(`http://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/',`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!
  • Added the section M4_REF_INT(M4_CHAPTER_MESSAGE_MARK,M4_CHAPTER_MESSAGE_HEAD) to this documentattion.
  • Added the section M4_REF_INT(M4_CHAPTER_PARASITE_MARK,M4_CHAPTER_PARASITE_HEAD) to this documentation.
2016-08-06 1.7.25
  • Parameterized the configure script that it may be useful for others as well (cf. the new section M4_REF_EXT(`index-old.html#build',`Compiling YASAPI from Source') below). It now supportes the "./configure && make" cycle well known from UNIX/LINUX systems.
  • Fixed the error introduced with the prior version that YASAPI does not play in pull mode (as reported to the M4_REF_EXT(`http://forums.winamp.com/showthread.php?p=3065758&postcount=485',`WA forum'))
2016-07-30 1.7.24
  • Updated my build machine from Vista to Windows 7 (good bye Vista users).
  • Hence the new version is build using MSVC 11 / Windows SDK v7.1A (instead of the respective MSVC 10 / Windows SDK v7.0A under Vista.)
  • Dropped the SSE2 versions because by using MSVC 11 they make no sense any longer.
  • As usual, some code clean-up.
2016-07-03 1.7.18
  • Some final code clean-up before moving on.
  • Development ist stalled again.
2016-06-30 1.7.17 Added the following personal statement to the About dialog and to the projects home page at M4_REF_INT(`note',`http://out-yasapi.sourceforge.net/'):
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 THERE IS SOMETHING ALONG THE WAY I CAN DO FOR YOU THAT'S GREAT!
2016-06-30 1.7.15 Fixed several bugs regarding the implementation of the device specific option Extend to 24 Bit. This option is apperently not equivalent to Winamp → Options → Preferences → Playback → Playback → Allow 24bit because the latter reduces bit deps to 16 bit if un-checked otherwise to 24 bit. Bit depth is never extended to 24 bit. YASAPI extends bit depth to 24 bit those enabling playback on devices which does support 24 bit WASAPI playback but not 16 bit WASAPI playback.
2016-06-27 1.7.10 Added a device specific option in order to define whether YASAPI should promote 8/16 bit input to 24 bit. This is not really necessary because the same effect can be achieved by enabeling Winamp → Options → Preferences → Playback → Playback → Allow 24bit but is provided on user request
2016-06-23 1.7.4
  • Factored out a framework for simialr plug-ins.
  • Connect to the device before continue playing after flush when in underflow.
2016-06-21 1.7.1 Improved migrating the plug-in from an un-plugged default device to the new default device when playing.
2016-06-20 1.7.0 (Limited) support for un-plugging the default device (as configured via System control) when playing.
2016-06-19 1.6.14
  • Disconnect on pause and undeflow when option Disconnect is choosen.
  • Removed timer for disconnecting gapless sessions because it is not needed any longer.
  • Fixed crashing of the configuration dialog in case the device selected in the previous session has meanwhile become invalid.
2016-06-14 1.6.11 Fixed combining pause with flush (skip).
2016-06-13 1.6.9
  • For gapless mode it is configurable after which time interval the connection should be released when in idle state.
  • Reworked the tracing facilities of the debug version.
2016-06-12 1.6.8 For the debug version it may be configured that the trace is written to a file in the AppData/Winamp/Plugin directory rather then dispalying it in a console.
2016-06-12 1.6.7 In gapless mode, when a playlist ends the device is not released. It is waiting for the next track to start. This situation is un-distinguishable from an ordinary underflow situation and hence playback ends in an undeflow state. This may cause trouble when in such a situation the user decides to change the output plugin (via configuration). This new version applys to exact this situation: If in case the user changes the output plugin and this plugin is found in an underflow state this plugin is closed (and hence the device released).
2016-06-12 1.6.6 Fixes regarding gapless playback.
2016-06-12 1.6.5
  • Stopping player when Winamp closes and not already stopped (needed for gapless mode).
  • Guarding against locking zero sized device buffers.
  • Reworked About dialog.
2016-05-29 1.6.4 Added a common option in order to define whether 4, 6, or 8 channels should be interpreted as qadrophnic (3.1), 5.1, or 7.1 (disabled) or sorround (3.1 sorround), 5.1 sorround, or 7.1 sorround (enabled), respectively.
2016-05-26 1.6.3
  • Fixed AUDCLNT_E_BUFFER_SIZE_ERROR appearing in eclusive/pull mode.
  • Fixed a potential forever-loop which may have appeared at the end of a track.
  • Fixed crashing as client of the M4_REF_EXT(`https://sourceforge.net/projects/winampmatrixmix/',`WinampMatrixMixer output plugin').
2016-05-22 1.6.0
  • Gapless playback.
  • A common option for switching on/off gapless playback (disabled by default).
  • A device option for choosing whether the time offset for gapless playback is maintained as a 64-bit integer value (representing the playback position) or as a 64-bit floating point value (representing the quotient taken from the playback position and a frequency). For a deeper understanding regarding position and frequency values you may refer to the documentation of the M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370889%28v=vs.85%29.aspx',`IAudioClock::GetPosition()') and M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370887%28v=vs.85%29.aspx',`IAudioClock::GetFrequency()') methods. We feel that as long as a constant frequency value can be assumed choosing the time offset as beeing maintained as a 64-bit integer value is preferable.
  • A debug version for SSE2.
2016-05-17 1.5.4 Solved the dead-lock caused by saving the configuration.
2016-05-17 1.5.1-
1.5.3
Improved dealing with draining the ring buffer and end of track (eot).
2016-05-16 1.5.0
  • The Default Device is listed in the respective configuration dialog's drop down box as an option to choose.
  • In case the Default Device is choosen from the drop down box (and saved),
    • the configuration is saved for the physical device which was configured at the time (configuration time) as Default Device from Window's System Control when the configuration was loaded to the dialog,
    • each time a new track starts, the physical device configured at this time (play time) as Default Device from Window's System Control is used to play the track (please note that this device may differ from the one configured at configuration time).
Please note that this is a complete re-write. Everything was thrown into peaces, something into larger building blocks and something into dust. The larger building blocks, which greatly remained intakt, could be re-used. The dust had to be thrown away and substituted by a new development. Please be careful in using this new version, thoroughly test it and re-configure it, if needed.
2016-04-09 1.0.7 In order to have YASAPI in a well defined state from the very first beginning, M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370877%28v=vs.85%29.aspx',`reset') the M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370865%28v=vs.85%29.aspx',`IAudioClient') interface at start-up.
2016-01-13 1.0.6
  • Detect end of track by respective "isplaying" request.
  • Fixed bug regarding synchronization of Share Mode and Strategy options.
2016-01-09 1.0.0
  • Some minor code clean-up.
  • Further development is stalled because according to the Winamp team they have developed a native WASAPI output plugin: M4_REF_EXT(`http://forums.winamp.com/showpost.php?p=3045974&postcount=1347',`"Benski has coded a new out_wasapi plug-in"') and M4_REF_EXT(`http://forums.winamp.com/showpost.php?p=3045979&postcount=1350',`"it'll probably be included with 5.8 beta"').
2016-01-03 0.16.0
  • Guarded against writing when paused.
  • Stopping audio client when underflow.
  • From the configuration dialog, dropped the device list page in favour of a combobox on top of the dialog.
  • Slightly adapted default values.
2015-12-21 0.15.0 Brought back, as an option, a call to M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370876%28v=vs.85%29.aspx',`IAudioClient::IsFormatSupported') which is disabled by default.
2015-12-10 0.14.1 Increased default ring buffer size to 2.5.
2015-12-08 0.14.0
  • Introduced an (by default enabled) option "Write Block" that in case the plugin's "write" method delivers more data than actually could be written to the ring buffer it should block and wait until enough data are consumed from it rather then returning immediately.
  • For automatic mode, removed restrictions for switching from exclusive to shared mode.
2015-12-06 0.12.0 Fixed interplay with the M4_REF_EXT(`http://slickproductions.org/notsofatso.php',`NotSo Fatso input plugin').
2015-12-04 0.11.0
  • Reorganized the configuration dialog:
    • Focused again on the most important two (per device) parameters "Mode" (share/exclusive) and "Strategy" (push/pull).
    • Duplicated those two parameters from the "Device Options" page to the dialog's top-region.
    • Moved the former top-region parameters to a new "General" tab-control page.
    • Added a "Store" button with similar functionality as the "OK" button except that it doesn't close the dialog.
  • Fixed several bugs.
2015-11-29 0.10.0
  • Reorganized configuration of device period.
  • Added progess bars to the configuration dialog in order to visualize the load of the ring and the shared buffers.
  • Added an option for dis-/enabling the visualization.
  • Added an (experimental) function for balancing the shared buffer.
  • Added some more tracing to the debug version.
  • Split the verbose debugging into verbose level 1 ond and level 2 (even more verbose).
2015-11-23 0.9.1
  • Added an option for configuring whether calculation of the buffer sizes should be based on the default or on the minimum device period as proposed by WASAPI. Made default device period the default. So long the calculation was silently based on the minimum device period.
  • Added tooltips to the configuration dialog's controls.
2015-11-22 0.9.0
  • Complete re-write based on a new architecture. The basic idea is to serialize all requests and dispatch them into just one worker thread. In particular the serialization takes into account asynchronous requests resulting from the WASAPI device.
  • Round up ("ceil") the size of the ring buffer to the next multiple of Winamp's packet size (576 samples).
  • Special treatment of double buffering, i.e. pull in exclusive mode.
  • Additional options to configure the debug version.
Note:  You should re-configure at least the buffer sizes. 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.
2015-11-02 0.8.3
  • Improved thread synchronization during start-up.
  • Fixed a bug regarding recovery from error AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED of the IAudioClient::Initialize() method.
2015-10-31 0.8.2
  • Implemented recovery from error AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED of the IAudioClient::Initialize() method (cf. remarks section from M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370875%28v=vs.85%29.aspx',`MSDN documentation')).
  • Added support for M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd390971%28v=vs.85%29.aspx',`KSAUDIO_SPEAKER_7POINT1').
2015-10-30 0.8.1 New share mode "automatic" which is similar to exclusive except that it falls back to shared in case exclusive fails.
2015-10-29 0.8.0
  • Improved synchronization with visualizations and video because of
    • corrected calculation of max latency and
    • corrected calculation of "written time".
  • Dropped "written time" options.
  • Dropped the call to M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370876%28v=vs.85%29.aspx',`IAudioClient::IsFormatSupported()').
  • New device specific options "Auto Convert PCM" and "SRC Default Quality". These Options are only available in shared mode. They correspond to the M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370791%28v=vs.85%29.aspx',`AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM') and M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370791%28v=vs.85%29.aspx'.`AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY') flags, respectively, of the M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370875%28v=vs.85%29.aspx',`IAudioClient::Initialize()') method (regarding the AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY flag cf. also M4_REF_EXT(`http://tri-mide22.rssing.com/browser.php?indx=12246968&item=896',`here')).
2015-10-26 0.7.1
  • Automatic re-sampling in shared mode seems to work now.
  • Added an "Exit Winamp" option to the error message dialog box.
2015-10-26 0.7.0
  • Support for multiple devices.
  • Configuration options per device.
  • Various fixes.
Note: Prior configuration for the default device may be lost. Please re-configure.
2015-10-03 0.6.1 Corrected a silly bug in testing for share mode.
2015-10-03 0.6.0 Add M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370791%28v=vs.85%29.aspx',`AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM') flag when in shared mode (doesn't have any effect on Vista).
2015-02-14 0.5.0
  • Utilization of the M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370881%28v=vs.85%29.aspx',`IAudioClock') interface instead of the M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/ms724408%28v=vs.85%29.aspx',`GetTickCount()') or the M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd757629%28v=vs.85%29.aspx',`timeGetTime()') functions for reporting the elapsed time to Winamp.
  • Option for controlling whether "written time" should be calculated.
2015-01-30 0.4.0
  • Option for treating mono as stero (default switched on).
  • New default options for buffer configuration.
  • Some fixes.
2015-01-25 0.3.0
  • Support for pull strategy.
  • Support for volume control.
2015-01-24 0.2.1
  • Component Object Model (COM) error messages are displayed with the file and the line number where they occur.
  • Compiled with shared "MSVCR110.DLL" (instead of static as before).
2015-01-24 0.2.0
  • Improved configuration for buffer sizes.
  • Provided a SSE2 version.
  • Compiled with the C compiler from "Visual Studio 10 Express" (instead of "Visual Studio 9 Express" as before).
2015-01-23 0.1.0 Initial release.
ifelse(M4_CHAPTER_WHY,M4_CHAPTER_WHY_DEFINED, M4_MARK(M4_CHAPTER_WHY_MARK)

M4_CHAPTER_WHY. M4_CHAPTER_WHY_HEAD

YASAPI NT's history is much`,' much longer than the existence of the plug-in. Way back in the early 2000s we started experimenting with digital audio. The idea was based on the assumption that there should be no difference between playing the same track from CD and playing it from the PC. After all it's digital and the same bytes are streamed! Unfortunately`,' in practice in almost all cases there seems to be a hughe difference to the theory. Only when starting our experiments with M4_EM(WASAPI) wayback in 2015 we could resolve the discrepancy.

The following M4_REF_EXT(`https://forums.guru3d.com/threads/the-asio-driver.417458/#post-5484056',`post (Oct 21, 2017)') taken from the M4_REF_EXT(`https://forums.guru3d.com/',`guru3D forums') makes the essential point (although the guy seem to mix up WASAPI with ASIO and that one should fall back on Shared Mode only if Exclusive Mode for some reason does not work. In case M4_EM(Shared Mode) is used with the same format configured with M4_EM(Control Panel → Hardware and Sound → Sound → Playback → Device → Properties) there shuold be no difference to M4_EM(Exclusive Mode)):

This guy apart each theory experienced the hughe potential w.r.t audio reproduction each PC has due to WASAPI. The only thing YASAP NT adds is to make this potential available to Winamp users.) M4_MARK(M4_CHAPTER_INTRO_MARK)

M4_CHAPTER_INTRO. M4_CHAPTER_INTRO_HEAD

According to M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370784%28v=vs.85%29.aspx',`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 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:

M4_MARK(M4_CHAPTER_INSTALL_MARK)

M4_CHAPTER_INSTALL. M4_CHAPTER_INSTALL_HEAD

Installation is as easy as downloading and running the latest M4_REF_EXT(`https://en.wikipedia.org/wiki/Nullsoft_Scriptable_Install_System',`NSIS') installer from the M4_REF_EXT(`https://sourceforge.net/projects/out-yasapi/files/out_yasapi-nt/',project's download page).

Even if the plug-in runs without any further M4_REF_INT(M4_CHAPTER_CONFIG_MARK,M4_CHAPTER_CONFIG_HEAD) (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. M4_MARK(`expert')The expert way:
M4_MARK(M4_CHAPTER_IMPLEMENT_MARK)

M4_CHAPTER_IMPLEMENT. M4_CHAPTER_IMPLEMENT_HEAD

There are two sides the YASAPI plugin has to take into account:

The implementation on the WASAPI side follows along the lines of an M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd316756%28v=vs.85%29.aspx',`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 M4_REF_EXT(`https://msdn.microsoft.com/en-us/library/windows/desktop/dd370844%28v=vs.85%29.aspx',`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.

M4_MARK(`push')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 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 M4_REF_EXT(`http://en.wikipedia.org/wiki/Circular_buffer',`ring or circular buffer'). That way,

According to step 2 of the push model sketched M4_REF_INT(`push',`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. M4_MARK(M4_CHAPTER_CONFIG_MARK)

M4_CHAPTER_CONFIG. M4_CHAPTER_CONFIG_HEAD

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 there are the following per device options:

The next page labeled Monitor looks the following:

The final page labeled Explore looks the following:

M4_MARK(M4_CHAPTER_REF_MARK)

M4_CHAPTER_REF. M4_CHAPTER_REF_HEAD

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

M4_MARK(M4_CHAPTER_MESSAGE_MARK)

M4_CHAPTER_MESSAGE. M4_CHAPTER_MESSAGE_HEAD

The following message posted by me to the top-level (sticky) thread M4_REF_EXT(`http://forums.winamp.com/showthread.php?t=374929',`Winamp News') in forum the M4_REF_EXT(`http://forums.winamp.com/forumdisplay.php?f=8',`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 (M4_REF_EXT(`http://forums.winamp.com//showthread.php?p=3066142#post3066142',`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

M4_MARK(M4_CHAPTER_PARASITE_MARK)

M4_CHAPTER_PARASITE. M4_CHAPTER_PARASITE_HEAD

On his blog the M4_PARASITE M4_REF_EXT(`parasite.html',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 M4_REF_EXT(`http://forums.winamp.com/showthread.php?p=3066142&postcount=490',`Winamp forum').

The M4_PARASITE's M4_REF_EXT(`parasite.html',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 M4_PARASITE on his web site M4_REF_EXT(`parasite.html',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", ha ha, what kind of people are attracted by such a M4_REF_EXT(`https://en.wikipedia.org/wiki/Spasticity',`spast')?) likes to trick users into registering.