Old 12th January 2010, 15:47   #1
Adion
Junior Member
 
Join Date: Feb 2002
Location: Belgium
Posts: 28
Winamp WASAPI output plugin beta

Hi all,

I've created a simple output plugin which uses WASAPI, so it can be used on Windows Vista or later.
It's only a first version, and it can be downloaded on my website:
http://adionsoft.net/winampwasapi/
http://adionsoft.net/winampwasapi/

I know that there already was a WASAPI output plugin, but it didn't really function the way I wanted.

My plugin currently prefers exclusive mode, but if it fails to find a suitable exclusive mode, it will connect in shared mode.
It can do high quality resampling if required, and supports 16,24 and 32-bit outputs.
For input files it currently only supports 16 and 32 bit files.
Volume-changes are always click-less.
Currently it also prefers a low latency, but if it detects a problem with glitches in the output it will automatically increase the latency. Since it doesn't remember the optimal setting yet, this means that when you first start winamp there might be a few glitches the first few minutes you use it.

The reason I created it was because my laptop doesn't want to play audio without glitches in directsound mode, but it does play without glitches in exclusive wasapi mode, and with only very infrequent glitches in wasapi shared mode.
An advantage of exclusive mode is also that you aren't interrupted by other programs (annoying flash popups in your browser for example )

Some things that I might add to it in the future:
-Fading stop/pause/seek
-Not close wasapi immediately when close is called so that it responds faster when loading another song
-Remember optimal latency
-Configuration for exclusive mode and latency
-Up- and down-converting for 5.1 to 2.0 or 2.0 to 5.1 (maybe with bass-redirection also)
-Support for 24-bit input files

If anyone is interested in trying it, or wants to make suggestions, feel free to do so!
Adion is offline   Reply With Quote
Old 15th January 2010, 13:20   #2
kerimcem
Member
 
Join Date: Jan 2010
Posts: 76
thanks..
kerimcem is offline   Reply With Quote
Old 15th January 2010, 13:39   #3
kerimcem
Member
 
Join Date: Jan 2010
Posts: 76
link dont see.. send pm?
kerimcem is offline   Reply With Quote
Old 15th January 2010, 13:44   #4
Adion
Junior Member
 
Join Date: Feb 2002
Location: Belgium
Posts: 28
I'm not sure why the link doesn't show up, here it is again, hopefully you can see it now:

http://adionsoft.net/winampwasapi/
Adion is offline   Reply With Quote
Old 15th January 2010, 13:51   #5
kerimcem
Member
 
Join Date: Jan 2010
Posts: 76
Quote:
Originally posted by Adion
I'm not sure why the link doesn't show up, here it is again, hopefully you can see it now:

http://adionsoft.net/winampwasapi/
ı see..nice thanks....
kerimcem is offline   Reply With Quote
Old 15th January 2010, 13:57   #6
DrO
 
Join Date: Sep 2003
Posts: 27,880
is due to a spam protection measure applied to junior members.

clickable link -> http://adionsoft.net/winampwasapi/

-daz
DrO is offline   Reply With Quote
Old 15th January 2010, 14:49   #7
kerimcem
Member
 
Join Date: Jan 2010
Posts: 76
bugs srs sanbox+win7x86
configure window not open
output 32 bits not 16 bit
error window (renderdiconnectcallback)
kerimcem is offline   Reply With Quote
Old 27th January 2010, 09:29   #8
murrayp
Junior Member
 
Join Date: Sep 2009
Posts: 4
great!

Well done! - this is the very first Wasapi exclusive output that has worked without problems on my Sony Vaio / W7 / (asynchronous) usb / dCS set up. So far no others (Foobar, J River, XXHighEnd, Reclock) have worked without locking up or glitches. Interestingly, Wasapi exclusive sounds excellent and so far seems to sound the same in most players (excluding glitches) Other bit perfect outputs (ASIO) were supposed to but never did. Now unfortunately Winamp doesn't come with a "10 foot" mode (large sceen mode for remote control from 10' - at least as far as i know). So how would you like to write a plugin for J River that works (unlike the native one)? Anyway well done!

Murray
murrayp is offline   Reply With Quote
Old 28th January 2010, 13:06   #9
kerimcem
Member
 
Join Date: Jan 2010
Posts: 76
Waiting for new version.thanks..
kerimcem is offline   Reply With Quote
Old 28th January 2010, 15:07   #10
Adion
Junior Member
 
Join Date: Feb 2002
Location: Belgium
Posts: 28
Thanks

kerim: There is no configuration dialog yet, I also tried it with srs demo and it seemed to work fine here.
The output will indeed be 32-bit when available. This will reduce the quality loss when using the volume control, and there should be no quality loss at all converting 16-bit to 32-bit.

murrayp: As for J River, I'm afraid I don't have much time at the moment to write another plugin, and at first sight on the website I didn't even see anything about output plugins, so I don't know if it's even possible.
Maybe looking for a larger/different skin for winamp could make it work for you?
Adion is offline   Reply With Quote
Old 28th January 2010, 17:34   #11
murrayp
Junior Member
 
Join Date: Sep 2009
Posts: 4
Thanks for looking Adion. I thought maybe it wouldn't be straight forward getting it into another program. Have you any idea or hints that I could pass on to other developers to try as to why yours runs without stuttering or glitches when all others I've tried don't?

best

Murray
murrayp is offline   Reply With Quote
Old 28th January 2010, 17:53   #12
Adion
Junior Member
 
Join Date: Feb 2002
Location: Belgium
Posts: 28
Exclusive mode usually works better than shared mode, and selecting a buffer size that is large enough to minimize glitches.
Other than that I don't think there's anything special about the way my plugin uses wasapi.
Adion is offline   Reply With Quote
Old 28th January 2010, 18:39   #13
kerimcem
Member
 
Join Date: Jan 2010
Posts: 76
My headset is not compatible with 32-bit audio is broken up ...sorry
kerimcem is offline   Reply With Quote
Old 28th January 2010, 18:41   #14
Adion
Junior Member
 
Join Date: Feb 2002
Location: Belgium
Posts: 28
Strange, if it isn't compatible with it, the drivers shouldn't allow it either.
My sound card also only works in 16-bit mode, but it simply connects in 16-bit mode if 32-bit is not available.
Adion is offline   Reply With Quote
Old 28th January 2010, 18:52   #15
kerimcem
Member
 
Join Date: Jan 2010
Posts: 76
When the 32-bit output is set to srs sandbox removed when going back to 16-bit...my sound card sb live 24 bit

Last edited by kerimcem; 28th January 2010 at 19:25.
kerimcem is offline   Reply With Quote
Old 28th January 2010, 22:30   #16
dstln
Junior Member
 
Join Date: Apr 2008
Posts: 13
Does not play nice at all with my Winamp :P

RenderDisconnectCallback error when I try to play anything. If 24-bit output is enabled in Winamp, it skips through the song for a few seconds then freezes. If 24-bit output is disabled, it plays after error but freezes on stop/next/previous track. Vista 32-bit, Winamp 5.56, Auzentech X-*******n. Let me know if you need anything else although I may not check this topic often at all lol.
dstln is offline   Reply With Quote
Old 29th January 2010, 10:04   #17
Adion
Junior Member
 
Join Date: Feb 2002
Location: Belgium
Posts: 28
As mentioned 24-bit input wasn't supported yet.

There's a new beta now which supports 24-bit input, and also allows volume control on multi-channel audio.
Adion is offline   Reply With Quote
Old 29th January 2010, 11:15   #18
kerimcem
Member
 
Join Date: Jan 2010
Posts: 76
thaks update..
I tried again sounds bad .... sorry I returned ks plugin
kerimcem is offline   Reply With Quote
Old 29th January 2010, 15:27   #19
kerimcem
Member
 
Join Date: Jan 2010
Posts: 76

volume bar does not work



32 bit output and device not see

thanks..waiting..
kerimcem is offline   Reply With Quote
Old 29th January 2010, 15:37   #20
dstln
Junior Member
 
Join Date: Apr 2008
Posts: 13
Quote:
Originally posted by Adion
As mentioned 24-bit input wasn't supported yet.

There's a new beta now which supports 24-bit input, and also allows volume control on multi-channel audio.
Yes, but I wasn't using 24-bit input. As I said, it did not work with either 24-bit output (at all), as well as 16-bit output (error, freezes on any stop/track change).

I just tried the new version and am getting the same error. I am using 16-bit input. 24-bit output is now working the same as 16-bit output, but I am still getting the same error on playback start and winamp freezing on stop/trackchange. I'll see about updating winamp and if that helps.

Nope, did not fix updating to 5.72 or switching windows output to 48/44khz.

Okay, I found the fix. Unchecking "Give exclusive mode applications priority" fixes the issues. Is this an problem you can solve in the plugin?
dstln is offline   Reply With Quote
Old 29th January 2010, 15:44   #21
Adion
Junior Member
 
Join Date: Feb 2002
Location: Belgium
Posts: 28
I'm not sure, that switch is actually enabled here, so it might also be related to the soundcard's driver.
When I have some time I'll see if I can try it with some other sound cards.

As for the volume control, I'm not sure that it is possible to make it work for WASAPI Exclusive applications
Adion is offline   Reply With Quote
Old 1st February 2010, 19:56   #22
mark007
Junior Member
 
Join Date: Sep 2006
Posts: 23
Hi, Love the new plugin. I am now using it on a daily basis but I notice the seeker / time progress seems to move incorrectly.For example a 6 minute song will only display 3:00 when completed in winamp. For this reason dragging on the seekbar also seems to work incorrectly.

Can this be fixed from your end?
mark007 is offline   Reply With Quote
Old 2nd February 2010, 23:41   #23
soddit112
Junior Member
 
Join Date: Jul 2008
Location: east yorkshire, england
Posts: 17
working well here on my X-Fi XtremeGamer (if that makes any difference with software renderers?). for some reason, it always uses 32-bit output, according to the about window, which i find odd since my sound card apparently doesnt support this bit depth :/

it still sounds fine though, and hasnt done anything weird yet
soddit112 is offline   Reply With Quote
Old 3rd February 2010, 05:40   #24
Belarathon
Junior Member
 
Join Date: Feb 2009
Posts: 10
I've just tried the WASAPI output using Winamp 5.572 with an M-Audio Delta Audiophile 2496. It works beautifully with 24 bit 96Khz source material, but with 44.1Khz sampled source material, there is a constant, rhythmic "thump-thump-thump" noise masking the sound.

If I may help in any way, please let me know. I have high hopes. In the interim, it's back to kernel streaming for me.
Belarathon is offline   Reply With Quote
Old 3rd February 2010, 21:52   #25
Adion
Junior Member
 
Join Date: Feb 2002
Location: Belgium
Posts: 28
Could you check in 'About' what the samplerate and format is that the plugin connected with?
Adion is offline   Reply With Quote
Old 3rd February 2010, 22:03   #26
kerimcem
Member
 
Join Date: Jan 2010
Posts: 76
Quote:
Originally posted by Belarathon
I've just tried the WASAPI output using Winamp 5.572 with an M-Audio Delta Audiophile 2496. It works beautifully with 24 bit 96Khz source material, but with 44.1Khz sampled source material, there is a constant, rhythmic "thump-thump-thump" noise masking the sound.

If I may help in any way, please let me know. I have high hopes. In the interim, it's back to kernel streaming for me.
yes..
sound comes less than ks plugin foobarwasapi and makio 44.khz-48khz

Last edited by kerimcem; 3rd February 2010 at 23:26.
kerimcem is offline   Reply With Quote
Old 3rd February 2010, 23:13   #27
Belarathon
Junior Member
 
Join Date: Feb 2009
Posts: 10
Quote:
Originally posted by Adion
Could you check in 'About' what the samplerate and format is that the plugin connected with?
The bad:





The good:




Thank you.
Belarathon is offline   Reply With Quote
Old 4th February 2010, 17:36   #28
mark007
Junior Member
 
Join Date: Sep 2006
Posts: 23
Hi, I get

Samplerate: 192000
Output bits: 32
Floating point: true

for a 44.1khz 16bit mp3

I think there should be an option to avoid any processing, and output in pure form, ie same as input. Otherwise output at a certain rate of the users choosing if processing is to be allowed (for volume I assume?)
mark007 is offline   Reply With Quote
Old 7th February 2010, 05:26   #29
dstln
Junior Member
 
Join Date: Apr 2008
Posts: 13
BTW I'm still reproducing the same exclusive priority issue as before, now on Win7 64 and a new sound card in the X-Fi Forte :P
dstln is offline   Reply With Quote
Old 7th February 2010, 08:55   #30
Adion
Junior Member
 
Join Date: Feb 2002
Location: Belgium
Posts: 28
Another new beta. I've now added a delay before closing the wasapi output, which means that it will only be closed after the songs have stopped for 5 seconds, or when closing winamp.
On track changes, no reconnect occurs anymore.

I haven't been able to find what causes the other problems yet.

About processing: The plugin tries to connect at the same samplerate as the source song first, and if this succeeds no resampling occurs, so if the volume is at max, no processing occurs.
Adion is offline   Reply With Quote
Old 9th February 2010, 04:09   #31
dstln
Junior Member
 
Join Date: Apr 2008
Posts: 13
Seems to work fine with exclusive priority checked now.

Except for one humorous massive fail chain, but haven't been able to reproduce.
dstln is offline   Reply With Quote
Old 10th February 2010, 03:11   #32
dstln
Junior Member
 
Join Date: Apr 2008
Posts: 13
actually still seems kinda buggy with exclusive priority on, get random buggy static noises once in a while
dstln is offline   Reply With Quote
Old 10th February 2010, 03:27   #33
Belarathon
Junior Member
 
Join Date: Feb 2009
Posts: 10
Same here...almost like there isn't enough buffer or something. It occurs to me: If the plugin fails to initialize the sound card and falls back to re-sampling, how are we to know whether or not we are listening to bit perfect audio?

dstln: Are you seeing an option to tick "exclusive priority?" I don't have any options to configure on the plugin.
Belarathon is offline   Reply With Quote
Old 10th February 2010, 15:23   #34
dstln
Junior Member
 
Join Date: Apr 2008
Posts: 13
nono. I've been talking about in windows > sound settings > "give exclusive mode programs priority"
dstln is offline   Reply With Quote
Old 10th February 2010, 22:00   #35
Belarathon
Junior Member
 
Join Date: Feb 2009
Posts: 10
Quote:
Originally posted by dstln
nono. I've been talking about in windows > sound settings > "give exclusive mode programs priority"
Yep...I figured that eventually. I couldn't get it to play at all *without* exclusive mode.
Belarathon is offline   Reply With Quote
Old 11th February 2010, 15:06   #36
dstln
Junior Member
 
Join Date: Apr 2008
Posts: 13
btw is the plugin intended to display mono content in the left channel only? I wasn't sure.
dstln is offline   Reply With Quote
Old 11th February 2010, 20:54   #37
Belarathon
Junior Member
 
Join Date: Feb 2009
Posts: 10
Incidentally, I enabled my onboard sound (ACL850) and the plugin worked great @ 44.1Khz.
Belarathon is offline   Reply With Quote
Old 13th February 2010, 17:01   #38
Adion
Junior Member
 
Join Date: Feb 2002
Location: Belgium
Posts: 28
New beta available. Mono sources should work too now, but I haven't tested that yet.
The problem with the time display not being correct should be fixed too.
The about window now shows a little more information, so that you can see how it is connected.
Adion is offline   Reply With Quote
Old 13th February 2010, 20:22   #39
kerimcem
Member
 
Join Date: Jan 2010
Posts: 76
this version is working great.. thanks
kerimcem is offline   Reply With Quote
Old 13th February 2010, 21:30   #40
kerimcem
Member
 
Join Date: Jan 2010
Posts: 76

but problems continue , plugin using cpu high and sound freezing.
kerimcem is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump