Skip to main content

Topic: Winamp 2 Kernel Streaming Output Plugin (Read 400721 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Gabor
  • [*]
Winamp 2 Kernel Streaming Output Plugin
Reply #275
Hi Steve!

Happy new year! :-)
I've a problem. I like your WA KS, but I couldn't solve a simple thing.
I use late night a headphone and speakers during the day.
The amplifier hasn't headphone output connector so I tried to connect the headphone and the amplifier same time to my Audigy card. (e.g. amplifier to front channels and headphone to rear channels)
I wanted to set same outputs for front and rear channels, but I couldn't find any solution.
I'm thinking about that how can I set KS output to 4 channel? (same output to front and rear channels)
Is there any solution to listen through 4 channels the music?


Thanks!

Gabor

  • eevan
  • [*][*][*][*][*]
Winamp 2 Kernel Streaming Output Plugin
Reply #276
You can do this if you use kX Audio Driver
If age or weaknes doe prohibyte bloudletting you must use boxing

  • dd_wizard
  • [*]
Winamp 2 Kernel Streaming Output Plugin
Reply #277
I found a reference to this error from around 2003 in this thread, but that was for a Windows 98 system.  I'm running Vista with a RealTek High Definition Audio sound device. When I start Winamp 5.51 with the KS 3.63 plugin, I get the following error dialog:

CksEnumFilters::EnumFilters failed

I looked on the RealTek and Microsoft sites, but didn't have much luck.  It does look like Vista supports Kernel Streaming, though. Before I embark on a major search, I thought I'd ask if any Vista users have already resolved this issue.

Thanks for any help,
dd_wizard
  • Last Edit: 05 January, 2008, 04:34:11 AM by dd_wizard

  • Steve Monks
  • [*][*][*]
  • Developer
Winamp 2 Kernel Streaming Output Plugin
Reply #278
I found a reference to this error from around 2003 in this thread, but that was for a Windows 98 system.  I'm running Vista with a RealTek High Definition Audio sound device. When I start Winamp 5.51 with the KS 3.63 plugin, I get the following error dialog:

CksEnumFilters::EnumFilters failed

I looked on the RealTek and Microsoft sites, but didn't have much luck.  It does look like Vista supports Kernel Streaming, though. Before I embark on a major search, I thought I'd ask if any Vista users have already resolved this issue.

Thanks for any help,
dd_wizard


Hi, presumably you get this error when you start playing a track and not when you start Winamp? What format of audio are you playing? e.g. two channel 44.1KHz @ 16 bit? Are you using any resampling pluigins such as HQSoft?

The error occurs when the plugin attempts to create an output pin that can handle the format of what you are  trying to play, so this could fail either because the specific format is not supported or because Kernel Streaming is not supported on the selected device. Check what device is selected in the Kernel Streaming configuration panel, if there are several options, try a different one.

Several people have reported success running Kernel Streaming on Vista, so it does appear to work in some cases, I haven't personally tried it as I don't have access to a Vista based machine, however, support may be driver dependent.

It may be helpful if you can post an error log so I can check all of the above directly. Launch Winamp, enable logging in the Kernel Streaming configuration, then try to play something. Close Winamp and the log should be in the folder where Winamp is installed and will be called "kernel streaming log.txt"

Steve

  • dd_wizard
  • [*]
Winamp 2 Kernel Streaming Output Plugin
Reply #279
Hi, presumably you get this error when you start playing a track and not when you start Winamp? What format of audio are you playing? e.g. two channel 44.1KHz @ 16 bit? Are you using any resampling pluigins such as HQSoft?
Steve


Thanks for the reply!  Actually, I get this error when I start Winamp.  So I never get a chance to play any type of file through the Kernel Stream.  In case it matters, I'm using 44.8 KHz @ 24 bits which works fine with the normal Winamp DirectSound output plugin. From reading this thread, I didn't think enabling logging would help since the failure occurs on initialization. Is there a way to find out why the failure occurs when Winamp starts?

Thanks,
dd_wizard

  • Steve Monks
  • [*][*][*]
  • Developer
Winamp 2 Kernel Streaming Output Plugin
Reply #280
Thanks for the reply!  Actually, I get this error when I start Winamp.  So I never get a chance to play any type of file through the Kernel Stream.  In case it matters, I'm using 44.8 KHz @ 24 bits which works fine with the normal Winamp DirectSound output plugin. From reading this thread, I didn't think enabling logging would help since the failure occurs on initialization. Is there a way to find out why the failure occurs when Winamp starts?

Thanks,
dd_wizard


Presumably you mean 44.1KHz not 44.8KHz which is a non standard sample rate.

Try dropping down to 16 bit samples as this may help too. Bear in mind that the output from the Directsound plugin still goes through KMixer, so it can allow you to feed it sample rates and sizes that your hardware cannot handle directly. Kernel Streaming goes in at a lower level bypassing any form of sampe rate or length conversion improving quality but reducing compatibility down to whatever your driver can directly handle.

If enabled, logging operates from the moment the plugin is started, so the early portion of the log could be useful.

Steve

  • dd_wizard
  • [*]
Winamp 2 Kernel Streaming Output Plugin
Reply #281
Sorry, I meant 48KHz @24 bits.  The hardware can handle up to 96K @ 24 bits. Here is the log file, I hope it helps.

Kernel Streaming Plugin v3.63 (x86) Diagnostic log

input buffer configured to 65536 bytes
output buffer configured to 8192 bytes per packet
Constructed KSCore (Input Size:65536) (Output Size 8192) (Output Cnt 8)
End(force=1)
EndInternal() - mode=0 force=1
Attempting to close player thread
Player Thread - closing
Player thread has closed
Destructed KSCore

Besides the "CksEnumFilters::EnumFilters failed" error message at startup, I get this error message when I click play:

"Could not find suitable output filter"

I installed the latest drivers, dated 25-12-2007, from RealTek and set the sound device back to 44.1KHz @ 16 bits and disabled 24 bits in Winamp. These changes haven't affected the behavior, so I may be stuck.

EDIT: I was able to get the Otachan ASIO output plugin to work, but I had to install ASIO4ALL to connect the out_asio.dll to the WDM device that my RealTek ALC861 codec supports.  ASIO support isn't that common from what I've been reading, but I'm starting to wonder if the ALC861 drivers support Kernel Streaming.  Do you have any idea what dll file I should be looking for in my driver configuration to see if it does support KS?

Oh, there were no devices listed in the KS plugin configuration screen, that may be a clue.

Thanks again,
dd_wizard
  • Last Edit: 06 January, 2008, 01:39:57 AM by dd_wizard

  • wdekler
  • [*][*][*]
Winamp 2 Kernel Streaming Output Plugin
Reply #282
I also had some disappointing experiences with the onboard Realtek chip. It turned out the Realtek chip only outputs higher bitrates with AC3/DTS streams. If you pick up a dirt cheap CMI8738 based card and use Dogbert's drivers you're way better off.

However, if you're looking for 24bit capability you can't use this CMI chipset. The datasheets states that it is capable but as far as I know, no board actually outputs 24bit. A VIA Envy24 based card can do this, but I still use the CMI card because Dogbert's drivers are better.

  • NoX1911
  • [*]
Winamp 2 Kernel Streaming Output Plugin
Reply #283
Bug: 'Number of output buffers' always jumps back to '8' at next winamp session. The value will be saved correctly in 'winamp.ini' though.

I'm trying to set all buffers to lowest values to get a responsive Winamp (seeking).

WinXPSP2
Winamp v5.51
SB-Live! Value (CT4670)
  • Last Edit: 19 January, 2008, 08:07:42 PM by NoX1911

  • steamer
  • [*]
Winamp 2 Kernel Streaming Output Plugin
Reply #284
KS 3.63 bug.

On my system the 'Number of output buffers' always jumps back to '8' at next winamp restart.

'winamp.ini' has the correct values though.

I'm using these low buffers to get a responsive winamp

XPSP2
Winamp v5.53
SB-Xfi

  • _Raziel-BG
  • [*][*][*]
Winamp 2 Kernel Streaming Output Plugin
Reply #285
KS 3.63 bug.

On my system the 'Number of output buffers' always jumps back to '8' at next winamp restart.

'winamp.ini' has the correct values though.

I'm using these low buffers to get a responsive winamp

XPSP2
Winamp v5.53
SB-Xfi

A already mentioned that. Waiting for the new version/build. 

  • mojo-chan
  • [*]
Winamp 2 Kernel Streaming Output Plugin
Reply #286
I too get the visualisation/timing issues with the KS plugin. Other than that though, it's fantastic. Gapless playback in particular works flawlessly, while with ASIO it doesn't.

Regarding the timing issues, I can report that I don't have the problems with ASIO so there is probably a solution somewhere. My guess is that ASIO sends much smaller chunks of data to the soundcard. Maybe you could split the 8k output buffer down into 256 byte chunks or something.

  • rt87
  • [*][*]
Winamp 2 Kernel Streaming Output Plugin
Reply #287
just noticed that winamp keeps writing winamp.m3u/winamp.m3u8 after installing out_ks363. Can anyone confirm about this?
Sorry for my English.

  • puntloos
  • [*][*][*]
Winamp 2 Kernel Streaming Output Plugin
Reply #288

Hey, one year ago!
Quote
In many ways you're right, it is relatively simple to scale the sample data as it passes through the plugin (just a multiply followed by a divide or a shift if your not too bothered about absolute accuracy) although it's slightly more complicated because you'd have to deal with 32 bit overflow (unless we assume the availability of 64 bit operands on the CPU which introduces potential compatibility issues).

The more involved bit is adding extra interface code to let the user choose this mode of operation and additional setup code to handle attempting to set up the output pin accordingly and falling back to straight pass through should this fail and so on. None of this is truly difficult but it's a lot of work for minimal gain (none whatsoever for me as I just want a transparent digital pass-through from my PC) and runs the risk of introducing new bugs into the plugin.

Fair enough, bad luck for me I guess. (unless you've suddenly come into the possession of an audiophile system  )
Quote
Quote
but I strongly suspect the plugin of being the cause of my crashes

I'd forgotten about that. When I get a moment I'll have a go at recreating this crash to see what happens. Roughly how many files does it take to crash it and what type of files are they?


i think the main problem is with files that have nonstandard bit depths or sample rates. I have a few DTS files that play back fine through winampac3 -> kernel streaming but fail on winampac3 -> hqsoftproc -> kernel streaming, and work with winampac3 -> hqsoftproc -> directsound output

Mind: I get slightly better luck (but not always) when playing something else first and then adding the DTS to the playlist.

Additionally, since you're obviously bored  - here's another feature request: prebuffering track changes to facilitate gapless playback. They've built it in the directsound plugin.

  • Steve Monks
  • [*][*][*]
  • Developer
Winamp 2 Kernel Streaming Output Plugin
Reply #289
Additionally, since you're obviously bored  - here's another feature request: prebuffering track changes to facilitate gapless playback. They've built it in the directsound plugin.


Erm, it's had true gapless playback for years now, you probably just need to enable it in the config panel.

Bear in mind, this is true gapless playback which joins the tracks together without disruption, so, albums where the tracks merge into each other (such as dance mixes or 70's concept albums) should play just as they would on a CD. I think the direct sound plugin does some kind of whacky crossfade which would actually disrupt such material (unless it's been updated since I last looked at it a couple of years ago).

The only time you should get unintentional gaps when this is enabled is when the format changes (bit rate, bit depth or number of channels) as the plugin has to release and reacquire a suitable output pin.

Steve

  • puntloos
  • [*][*][*]
Winamp 2 Kernel Streaming Output Plugin
Reply #290

Additionally, since you're obviously bored  - here's another feature request: prebuffering track changes to facilitate gapless playback. They've built it in the directsound plugin.


Erm, it's had true gapless playback for years now, you probably just need to enable it in the config panel.

Bear in mind, this is true gapless playback which joins the tracks together without disruption, so, albums where the tracks merge into each other (such as dance mixes or 70's concept albums) should play just as they would on a CD. I think the direct sound plugin does some kind of whacky crossfade which would actually disrupt such material (unless it's been updated since I last looked at it a couple of years ago).

The only time you should get unintentional gaps when this is enabled is when the format changes (bit rate, bit depth or number of channels) as the plugin has to release and reacquire a suitable output pin.

Steve


Ah, yeah I suppose that might be it, the directsound plugin indeed prebuffers which helps things a little bit in those rare cases, but indeed I didn't notice any stutters with ks and my new setup. My old server was only a P3-800 which sometimes struggled at this.

Any thoughts on the resampling (bit depth upconverting) issues?

-M

  • Qjimbo
  • [*]
Winamp 2 Kernel Streaming Output Plugin
Reply #291
Any chance of a post-XP compatible update?

Vista introduced a terrible sound system that "grainifies" everything. At the moment I'm using a Windows 7 beta and the problem is still there. Right now I'm using the ASIO output plugin to my digidesign mbox, but to have the kernel streaming plugin would be great.

Shame Microsoft can't just fix the audio really. The problem exists on every soundcard I've tried.

  • Steve Monks
  • [*][*][*]
  • Developer
Winamp 2 Kernel Streaming Output Plugin
Reply #292
Any chance of a post-XP compatible update?

Vista introduced a terrible sound system that "grainifies" everything. At the moment I'm using a Windows 7 beta and the problem is still there. Right now I'm using the ASIO output plugin to my digidesign mbox, but to have the kernel streaming plugin would be great.

Shame Microsoft can't just fix the audio really. The problem exists on every soundcard I've tried.


As far as I'm aware the plug-in should be compatible with any Windows operating system that supports Kernel Streaming (i.e. Windows 2000 onwards) as long as the sound card drivers support it too. I seem to recall reports of it working in Vista, but I can't comment on the Windows 7 Beta. I also don't have either of these operating systems installed on any of my PC's so I can't do any development work specific to them.

Sounds card drivers are very important from the point of view of Kernel Streaming compatibility, for example, I've found that the latest XP drivers for the M-Audio audiophile 2496 don't seem to work for some reason although earlier ones do.

Steve

  • NoX1911
  • [*]
Winamp 2 Kernel Streaming Output Plugin
Reply #293
There is still that 'number of output buffers' setting not saved over sessions bug present. Can't you fix that? It's really annoying and seems to be fixable quite easily.

  • Qjimbo
  • [*]
Winamp 2 Kernel Streaming Output Plugin
Reply #294
As far as I'm aware the plug-in should be compatible with any Windows operating system that supports Kernel Streaming (i.e. Windows 2000 onwards) as long as the sound card drivers support it too. I seem to recall reports of it working in Vista, but I can't comment on the Windows 7 Beta. I also don't have either of these operating systems installed on any of my PC's so I can't do any development work specific to them.

Sounds card drivers are very important from the point of view of Kernel Streaming compatibility, for example, I've found that the latest XP drivers for the M-Audio audiophile 2496 don't seem to work for some reason although earlier ones do.

Ah, I see. Well in my case I'm trying it with Realtek onboard sound (one of the high definition ones), and the XP driver works with Kernel Streaming, but the Vista 32bit and 64bit drivers don't seem to, which is disappointing. Perhaps I should see if I can install the XP driver...

Thanks for the quick reply by the way
  • Last Edit: 05 January, 2009, 08:53:55 PM by Qjimbo

  • ton
  • [*][*]
Winamp 2 Kernel Streaming Output Plugin
Reply #295
At first I apologize for not having read this very long thread. Also it is rather technical for me and I still don't understand everything.
I tried to use the KS 3.63 in Winamp 5.541 but it does not work with 24 bit, although my soundcard (Theatron Agrippa = Auzentech Explosion) should support that.
Maybe I am doing something completely wrong, but I cannot find out what. Btw, I am on Windows XP.
I enabled logging and this is what is reported:

OpenOutput - Current Settings:
Chosen Filter:      Theatron Agrippa Wave Device
Input Buffer Size:  65536
Output Buffer Size  8192
Output Buffer Count: 8


Attempting to CreateRenderPin with the following WaveFormatExtensible (first attempt):
Format.nChannels            = 2
Format.nSamplesPerSec      = 44100
Format.wBitsPerSample      = 32
Format.nBlockAlign          = 8
Format.nAvgBytesPerSec      = 352800
Format.cbSize              = 22
Samples.wValidBitsPerSample = 24
dwChannelMask              = 00000003


Failed to create pin on first attempt!

Attempting to CreateRenderPin with the following WaveFormat (2nd attempt):
Format.nChannels            = 2
Format.nSamplesPerSec      = 44100
Format.wBitsPerSample      = 24
Format.nBlockAlign          = 6
Format.nAvgBytesPerSec      = 264600
Format.cbSize              = 0
Samples.wValidBitsPerSample = 0
dwChannelMask              = 00000000

What is wrong ?
Thanks in advance.
Ton




  • Steve Monks
  • [*][*][*]
  • Developer
Winamp 2 Kernel Streaming Output Plugin
Reply #296
Hi ton,

KS 3.63 supports 24 bit audio and I've used it to successfully play various 24/96 "studio master" tracks I've downloaded from Linn Records on my M-Audio Audiophile 24/96 sound card.

The dump indicates that the Kernel Streaming plugin has attempted to connect to your sound cards driver with a 44.1KHz 24 bit sample format using two different methods. When the first attempt failed, it tried the second, fallback method (which works with drivers that don't support WaveFormatExtensible format specifications) and I presume that failed as well because it didn't work for you. The values look right for 24/44.1 playback so the fact it's failed indicates that your driver doesn't support this format.

Apparently, your card is based on a C-Media 8770 chipset which, looking at the data sheet on C-Media's website here, only appears to support 16 bit samples. Usually, this will be masked by Windows K-Mixer automatically converting whatever you throw at it into the correct format, but with Kernel Streaming, the data format has to be one that the sound cards driver and hardware supports.

Out of curiousity, what are you trying to play in 24/44.1 format? I don't believe that's a particularly common sample rate / sample length combination.

Regards,
Steve



At first I apologize for not having read this very long thread. Also it is rather technical for me and I still don't understand everything.
I tried to use the KS 3.63 in Winamp 5.541 but it does not work with 24 bit, although my soundcard (Theatron Agrippa = Auzentech Explosion) should support that.
Maybe I am doing something completely wrong, but I cannot find out what. Btw, I am on Windows XP.
I enabled logging and this is what is reported:

OpenOutput - Current Settings:
Chosen Filter:      Theatron Agrippa Wave Device
Input Buffer Size:  65536
Output Buffer Size  8192
Output Buffer Count: 8


Attempting to CreateRenderPin with the following WaveFormatExtensible (first attempt):
Format.nChannels            = 2
Format.nSamplesPerSec      = 44100
Format.wBitsPerSample      = 32
Format.nBlockAlign          = 8
Format.nAvgBytesPerSec      = 352800
Format.cbSize              = 22
Samples.wValidBitsPerSample = 24
dwChannelMask              = 00000003


Failed to create pin on first attempt!

Attempting to CreateRenderPin with the following WaveFormat (2nd attempt):
Format.nChannels            = 2
Format.nSamplesPerSec      = 44100
Format.wBitsPerSample      = 24
Format.nBlockAlign          = 6
Format.nAvgBytesPerSec      = 264600
Format.cbSize              = 0
Samples.wValidBitsPerSample = 0
dwChannelMask              = 00000000

What is wrong ?
Thanks in advance.
Ton


  • witlily
  • [*]
Winamp 2 Kernel Streaming Output Plugin
Reply #297
Hi, Steve

Thank's for this KS, this best perfomance sound for my onboard realtek alc888 HD with winamp 5.5 without DSP and equalizer (Win XP SP2 + Logitech Z-2200 2.1)   
  • Last Edit: 18 March, 2009, 08:31:32 PM by witlily

  • jessenov1
  • [*]
Winamp 2 Kernel Streaming Output Plugin
Reply #298
Hi Steve

I recently discovered your plugin - it sounds very good, currently my preferred playback option. I would like to experiment with different compiler settings, and different compilers (MS vs. Intel), to see how (if at all) it affects performance. Based on my previous experience doing that with ASIO plugin, it might.

Problem is, source code for ver. 3.63 is unavailable, and ver. 3.62 causes winamp to crash on start of playback, which is exactly what was fixed in 3.63.

Would you be so kind to share the changes that were made in ver. 3.63?
  • Last Edit: 13 May, 2009, 10:29:20 AM by jessenov1

  • Steve Monks
  • [*][*][*]
  • Developer
Winamp 2 Kernel Streaming Output Plugin
Reply #299
Hi Steve

I recently discovered your plugin - it sounds very good, currently my preferred playback option. I would like to experiment with different compiler settings, and different compilers (MS vs. Intel), to see how (if at all) it affects performance. Based on my previous experience doing that with ASIO plugin, it might.

Problem is, source code for ver. 3.63 is unavailable, and ver. 3.62 causes winamp to crash on start of playback, which is exactly what was fixed in 3.63.

Would you be so kind to share the changes that were made in ver. 3.63?


Hi,

the crash fixed in 3.63 was caused by a simple divide by zero in the function KSCore::GetWrittenTime(). As the plugin is driven in a multi threaded manner, it's possible that Winamp can call GetWrittenTime before KSCore::Start() has finished executing. In this situation, wfx_cur.Format.nAvgBytesPerSec will not have been initialised when GetWrittenTime() is called and is therefore zero. Looking at the CVS logs, the only change between 3.62 and 3.63 is an early throwout added to GetWrittenTime(). The revised function should read as follows (added code marked in red);

int KSCore::GetWrittenTime(void)
{
[blockquote]unsigned int bytes_per_sec, t;

bytes_per_sec = wfx_cur.Format.nAvgBytesPerSec;


if (!bytes_per_sec) {
[blockquote]DebugMsg("KSCore::GetWrittenTime - format not initialised");
return 0;
[/blockquote]}

t =  written_data / bytes_per_sec * 1000;                     // time to nearest second in mS
t += (written_data % bytes_per_sec) * 1000 / bytes_per_sec;   // add in fractional component

return t;
[/blockquote]}
[/font]

At some point I may get round to posting a full release of the 3.63 version of the source, but for now, that should sort you out (I'm pretty certain it's the only practical difference), let me know how you get on.

Regards,
Steve