Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Winamp 2 Kernel Streaming Output Plugin (Read 436706 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Winamp 2 Kernel Streaming Output Plugin

Reply #50
@Chun-Yu:

nice work :-)
i don't know if you are going to do any further work on this, anyway i found 2 bugs.

1) in open() you check "if(!pin)" and do a retry "pin=create..." but never check the result of the 2nd create (could be NULL too)
2) in open() you set nBlockAlign to nch*bits/8 but i think it should be 4 (EDIT: 4*nch of course) for 20bitPCM, 24bitPCM and 32bitPCM. maybe wBitsPerSample should be 32 too and only wValidBitsPerSample set to 20/24 respectively, but ... that's one thing i don't really know too :-)

regards,

paul

Winamp 2 Kernel Streaming Output Plugin

Reply #51
Im using WA.

I'm Going Nutz... with this "One at a Time" crap... Help!!!
Need Some Help!!!

Problem: I can only play one song at a time, then I have to click on the next one manually in order for it to play. It will not go to the next one automatically, And it will not start back at the begining of the song. The "slider bar thing" just sits at the end of the song.

Please do not post "Advance Playback Settings/uncheck Manual playlist advance" as this is NOT a solution to my problem.

I believe the problem is a conflict with a plugin/output called "Simple Kernel Streaming output" [out_ks.dll] and my sound card. This plug-in allows me to listen to songs without any other interference in the background. I say this because i'm running XP on both my Desktop and laptop and the desktop is fine but the laptop (with exact same settings) is causing this problem.

If anyone knows of a solution or possible alternative to listening to my songs without any other sounds comming through while playing my songs. please let me know!!!

P.S. My sound card is "SoundMAX Digital Audio"

--

Winamp 2 Kernel Streaming Output Plugin

Reply #52
<cough> foobar2000 </cough>

Another solution (not a simple one) is to disable all Windows sounds (and other in-program sounds like in IM clients, etc.).

Winamp 2 Kernel Streaming Output Plugin

Reply #53
Quote
Quote
On my system, currently using only a Realtek AC97 spdif out, the sample rate is being converted from 44.1 to 48 kHz as per normal kmixer experience. Shouldn't Kernel Streaming enable direct 44.1 digital output?

No, if your audio driver only outputs at 48 kHz (probably because your DAC only supports a fixed rate of 48 kHz).  I'm guessing that since the DAC is fixed at 48 kHz, so is the digital out (like the SB Live!?).  In this case, the sampling rate conversion isn't done by KMixer, but by the audio driver, which cannot be bypassed.  All I can suggest is...getting a new soundcard? ;)
[a href="index.php?act=findpost&pid=47078"][{POST_SNAPBACK}][/a]


I have the exact same problem under Windows 2000.

I used the NVIDIA linux drivers for Realtek ALC650 (same as yours or darn close) nForce2 in Redhat 8.0 and played the 44.1khz DTS stream bit-perfect
cat my-dts-audio.wav > /dev/dsp

Though I've tried both ASIO and Kernel streaming in Win2k and it STILL upsamples to 48khz.

Winamp 2 Kernel Streaming Output Plugin

Reply #54
Is there any ASIO or KS solutions for DirectShow based players? Anything bypassing kmixer for these players? If not, is there anybody trying to write such a filter?

 

Winamp 2 Kernel Streaming Output Plugin

Reply #55
As far as I know, there's none.
DirectShow plugins are codecs, not sound i/o. (Correct me if I'm wrong.)
ruxvilti'a

Winamp 2 Kernel Streaming Output Plugin

Reply #56
Err, DirectShow plug-ins can be anything not just codecs. WMP or Zoomplayer are DS players (among others), Winamp is not.
btw, I'm no expert at all so you correct me if I'm wrong

Winamp 2 Kernel Streaming Output Plugin

Reply #57
Yes, you can pass directshow to winamp...otherwise it would be quite hard to play video in it.

Winamp 2 Kernel Streaming Output Plugin

Reply #58
Hi, I've spent a little time reworking Chun-Yu's Kernel Streaming plugin and I think I've fixed most of the issues people were having with it (i.e. stability and output device selection).

If anyone is interested in trying it out, you can find the plugin here and the revised source code here.

Essentially, I've made two major changes.

Firstly I've reworked how filters are handled so that the plugin no longer tries to delete the filter while it's still playing, it will now wait until it gets notified that playback has stopped before ever trying to delete it, this seemed to be the major cause of some pretty nasty crashes.

In addition, I've stopped the plugin from deleting and recreating the filters every time tracks are started or stopped. On the plus side, this means that track changes are now handled a lot quicker with less audible disturbance.

On the downside, it means that kernel streaming is engaged until you quit Winamp. If you attempt to switch to another output plugin and try to play without first quitting and restarting Winamp, the new filter will probably fail because kernel streaming has still got hold of the output device, it shouldn't crash, but Winamp will repeatedly attempt to restart the track and pop up an error, which can be awkard to get out of (repeatedly pressing enter while clicking on Stop seems to do the trick). I'd clean it up properly, but there doesn't appear to be any way of being notified that your plugin is being deselected.

Anyway, for safety, the golden rule is - always shut down Winamp immediately after switching from this plugin to any other.

The second major change is that I've added a simple dialog to allow the selection of different output devices, this was added primarily for my M-Audio card which needed the output routing explicitly to the SPDIF socket to get an uncorrupted (i.e. not resampled) bitstream for HDCD playback.

Unfortunately, the options listed are device paths which are not really human friendly, but at least it gives you an option to experiment with the available devices without having to recompile and hack the plugin like I originally did. If I ever find out how to derive the friendly name from the device path, I'll post an update with the fix.

I can't guarantee that the plugin will be totally stable for you, but on my test machine, with these fixes it went from crashing (and restarting the PC!) every couple of songs with the original plugin to not crashing at all so far, with several hours of random play and lots of manual track swapping under its belt.

Any feedback is welcome, if there are any problems I will attempt to fix them when time permits. Hope it proves useful for you.

Cheers,
Steve

Winamp 2 Kernel Streaming Output Plugin

Reply #59
Looks like I spoke to soon about the stability. I've just posted a newer version of the plugin that doesn't crash when unpausing. I've also spotted another minor issue where the pause status gets screwed up if you change tracks while it's paused, pressing pause a further couple of times seems to rectify this. I'll sort that out over the weekend.

Winamp 2 Kernel Streaming Output Plugin

Reply #60
Quote
Looks like I spoke to soon about the stability. I've just posted a newer version of the plugin that doesn't crash when unpausing. I've also spotted another minor issue where the pause status gets screwed up if you change tracks while it's paused, pressing pause a further couple of times seems to rectify this. I'll sort that out over the weekend.
[a href="index.php?act=findpost&pid=348472"][{POST_SNAPBACK}][/a]


Cool. Will try it out today at home. I am a big fan of kernel streaming output method. Is there any way the volume control on Winamp can be used with this?

Winamp 2 Kernel Streaming Output Plugin

Reply #61
I could implement the volume control, but it defeats the point of kernel streaming - the point being to get an uncorrupted bitstream - as I'd have to scale every sample as they pass throught the plugin - effectively corrupting them although, nothing like as much as KMixer does.

Winamp 2 Kernel Streaming Output Plugin

Reply #62
I've fixed the pause problem mentioned above (where switching tracks while paused would require a couple of presses of the pause button to set things going again), I've also fixed the problem that someone mentioned earlier where playback would stop at the end of a track rather than moving onto the next one. I started getting this one with uncompressed WAV files, strangely I didn't get it with WavPacked files.

The latest plugin (v2.2) and source are available at the links I provided earlier, i.e.

here

Winamp 2 Kernel Streaming Output Plugin

Reply #63
Quote
I've fixed the pause problem mentioned above (where switching tracks while paused would require a couple of presses of the pause button to set things going again), I've also fixed the problem that someone mentioned earlier where playback would stop at the end of a track rather than moving onto the next one. I started getting this one with uncompressed WAV files, strangely I didn't get it with WavPacked files.

The latest plugin (v2.2) and source are available at the links I provided earlier, i.e.

Plugin V2.2

Source for V2.2
[a href="index.php?act=findpost&pid=349200"][{POST_SNAPBACK}][/a]


I am having a problem with this plugin. None of the DSP plugins are working now (with DirectSound). I generally use Ozone and it used to work fine with original KS plugin. I am using Winamp 5.12. Thanks!!

Winamp 2 Kernel Streaming Output Plugin

Reply #64
Hi Manish, can you give me a little more details about the problem you're having. I've just downloaded iZotope Ozone Free and it seems to work fine on my development machine along with the KS plugin (I'm running Winamp 5.112).

What kind of problem are you getting? What steps are required to recreate it? Do you get an error message?

You mentioned DirectSound, are you having problems switching from KS to DirectSound? This latter issue is documented above (you need to shut down and restart Winamp when switching from this KS output plugin to any other output plugin BEFORE trying to play any further tracks because KS still has hold of the audio device).

If you can give me a more detailed overview of what's going wrong and under what circumstances it happens, I'll see if I can sort it out.

Cheers,
Steve

Winamp 2 Kernel Streaming Output Plugin

Reply #65
Thanks Steve. The DSPs are working now.
Is there any way to link the Winamp volume control to the main Windows volume control in the taskbar?

Winamp 2 Kernel Streaming Output Plugin

Reply #66
Hello.

Good to see some progress on this (other than my own custom tweaks which i did a while back).  Thank you for the updates.

One issue i'd like to note: Since kernel stream will have exclusive access to the audio ouput, you will not hear any other sounds from other apps.  This is okay while the music is playing in winamp but lets say I press stop on winamp and have it running in the background w/o music.  Since the filter wasnt destroyed when the playback was stopped/paused, any application (such as video players - MPC, WMP, etc) will not have sound until the winamp is completely shutdown.

Heres how to recreate this scenario:

- Run winamp
- Use any movie player to start a video (video will play with sound)
- shutdown the video player and start playback of a song in winamp
- reopen movie player and replay a video (video will play without sound).  No other sound will be heard until winamp is completely shutdown and video is restarted.

I usually have winamp running constantly in the background using (Advanced Control) to keep it in the system tray so this is an issue.

Winamp 2 Kernel Streaming Output Plugin

Reply #67
Hi iTCHYmix,

thanks for the feedback. Yes, I'm aware of that problem.

As a matter of fact, I intentionally coded it to do that for improved stability. As I use the plugin on a PC that is dedicated for music playback solely from Winamp this has not been an issue for me.

However, the main stability problem was fixed when I placed interlocks around the filter destruction so that it waited for playback to actually stop before destroying the filter. Therefore it should be possible to restore the original functionality (i.e. create filter at start of playing a track, destroy it at the end of each track) without any detriment to the stability.

When I started modifying the plugin, my main objective was to find a stable way of getting an uncorrupted bitstream out of the computer over SPDIF which I seem to have accomplished as the plugin has been rock solid since my last batch of changes and I can now externally decode HDCD (probably the litmus test of bitstream corruption).

Anyway, I'm intending to do some further work on the plugin over christmas to add some of the features people have asked for and generally tidy the thing up a bit. Currently, I'm thinking of adding the following features which should hopefully cover the requirements of both Manish and yourself;

1. An option to either hold onto the audio device (as it currently does) or release it between tracks (like it used to do).

2. Some form of volume control that can optionally be disabled to ensure an uncorrupted bitstream over SPDIF (essential for external HDCD decoding).

3. Human friendly device names in the config screen (if anyone can suggest how to derive these from the device path I'd love to know).

Hopefully I should be able to post an update in a couple of days.

Cheers,
Steve

Winamp 2 Kernel Streaming Output Plugin

Reply #68
Hi all, there's an updated version of the Kernel Streaming Plugin now available here. This now has the following new features;

1. The WinAmp volume control now works. This can be disabled in the config if required (for example, to ensure an unmodified bitstream for HDCD).

2. The plugin will now release the audio device each time a track ends or Stop is pressed, again, this behaviour can be disabled in the config if required.

3. The Output Device list box now uses "friendly names" rather than the pretty meaningless device paths it previously used - should make it easier to tell what you're actually selecting.

4. I've added a comprehensive readme to the .zip file that details the various features of the plugin and any outstanding issues that I'm aware of.

Enjoy.

Steve

Winamp 2 Kernel Streaming Output Plugin

Reply #69
Thanks for your hard work,Steve!
It's My Life,
It's Now Or Never,
I Ain't Gonna Live Forever,
I Just Want To Live While I'm Alive.


Winamp 2 Kernel Streaming Output Plugin

Reply #71
Steve,

Great work.

One question, does anyone else have trouble using this output plugin with streams?  I get the error "sorry, can't disk write streams".  In the plugin setup I have "enable volume control" and "release audio device when stopped" checked, but after the error occurs and I open the preferences, everything is unchecked and no output devices are displayed.

It seems as though streams without a file extension ending (i.e., an ip address and port only) won't play, whereas streams with a file extension (i.e., .mp3, .acc, .ogg, etc.) will play fine.

Winamp 2 Kernel Streaming Output Plugin

Reply #72
Hmm, I see what you mean. Looks like the plugin is being seen as a disc writer for some reason and being blocked. Other output plugins seem to work (e.g. Direct Sound) so I'm not sure what's so special about the KS one.

The problem with the settings changing looks like the KS plugin is trashing it's configuration variables which is rather suspicious, however, if you close down and restart Winamp, the previous settings are restored.

If I get a chance I'll take a look at it tomorrow with the debugger and see if I can suss out what's going on.

Cheers,
Steve

Winamp 2 Kernel Streaming Output Plugin

Reply #73
Quote
After a little further experimentation, it looks like your explanation is on the mark. As best I can tell, in my system, out_ks bypasses windows as desired (the winamp volume control doesn't work) and sends the bits to the Intel ICH4 chipset, which resamples to 48 kHz, then sends the bits to the Realtek AC97 Codec. That can be set to output either 48 kHz or 44.1, but since 44.1 involves another resample (down from 48) it sounds terrible. So I'm stuck resampling to 48 somewhere along the line, since the ICH4 seems to require it.

Too bad. I don't have another slot for a soundcard.
[a href="index.php?act=findpost&pid=47525"][{POST_SNAPBACK}][/a]



How does one determine in detail the pathway and conversions that audio bits take on their way out of the computer like this?  I'd love to know exactly what is happening in my PC (which succesfully outputs via kernal streaming/foobar via coaxial out of the soundcard) and laptop (which does not seem able to use kernal streaming, even though it's an option in the f2k config menu, when using f2k and a USB out for audio).

Winamp 2 Kernel Streaming Output Plugin

Reply #74
I've posted a new version of the plugin (V2.4) here which fixes the problem of settings disappearing from the config menu when no tracks are playing (as reported by Gabes Dad).

The issue where streaming media (e.g. Internet Radio) doesn't play is an interesting one. I suspect this is an anti-copy mechanism to prevent Stream Ripping. I'd guess the stream decoder checks the current output plugin to see if it's an approved plugin (such as Nullsofts own Wave Out and DS plugins) and if not, it assumes it's a stream ripper and refuses to play. I've posted a message about this in the Winamp Developer forum to confirm this or see if there's a workaround. I'll let you know what I find.

The latest version of the plugin also contains a new feature which (optionally) performs 2x oversampling on any input <= 48KHz. So, 44.1KHz becomes 88.2KHz and 48KHz becomes 96KHz. Personally, I can't hear any difference on my HiFi gear and given that most modern DAC's oversample anyway it's not really that much of a surprise. Still, it may be of benefit to someone, so I've left it in. It's disabled by default because it will block HDCD decoding (as it's basically inserting extra samples into the bitstream and therefore, in essence, corrupting the original data, although, not in the same destructive way as KMixer does with its Resampling). I'd be curious to know if anyone can hear a difference with this enabled.

Cheers,
Steve