Old 3rd December 2001, 20:43   #1
Pio2001
Senior Member
 
Join Date: Aug 2000
Location: Lyon, France
Posts: 293
48 kHz playback

Hi,
It's been a soo long time But I wanted to make sure that this topic was not forgotten.

I hope it will be fixed in the final version, Winamp 3 currently playbacks 48 kHz files at 44.1 kHz, with an awful downsampling algorithm (if we can call algorithm the nearest neighbor pickup), that makes them sound like 64 kbps mp3s, like in SQRsoft crossfader or Justin's (Nullsoft) gapless output for Winamp 2.

Winamp 3 / Marian Marc 2 or SB Live soundcard. Digital output for both.
The Marian directly outputs 44.1 kHz SPDIF (it outputs without resampling), the SB live resamples to 48 kHz of course.

Pio2001
Pio2001 is offline  
Old 3rd December 2001, 21:10   #2
peter
ist death
 
peter's Avatar
 
Join Date: May 2000
Posts: 3,704
eh ?

you mean 48khz mp3 files ? they play fine here and they are NOT downsampled. looks like your soundcard drivers are broken or something.
peter is offline  
Old 3rd December 2001, 22:15   #3
Pio2001
Senior Member
 
Join Date: Aug 2000
Location: Lyon, France
Posts: 293
No, 48 kHz wavs. But I just tried MP3s, and it's the same.

Winamp 2 with Waveout, wave mapper, DirectSound, or Crudsoft gapless output plays fine at 48 kHz (sample rate shown by the external DAC plugged into the Marian Marc 2 soundcard's digital output).

Winamp 2 with Nullsoft gapless, SQRsoft crossfade, and Winamp 3 crackle (not pop and clicks, in fact, just a zzzzzz sound over the music : the sound of raw resampling, I can upload it, I you want to hear it) and the output is 44.1 kHz.

The SB live always outputs 48 kHz, but there is the same cracle over the sound when using those plugins. The same on my old computer with an SB live.
I think I remember not having had the crackle with a certain SQRsoft setting on the old computer.

In ALL cases, Winamp correctly displays 48 kHz ! It's the external DAC that shows me it's actually outputted at 44.1 kHz. And the Marc 2, unlike some other 24/96 soundcards, has no fixed sample rate output. It outputs what the sound device feeds (or rather sets its clock to the same sample rate), and support any integer sample rate between 11.025 and 96 kHz in both input (slaving itself to the incoming clock) and output.
No way to see it with an SB live, because the mixer works at 48 kHz, but unfortunately it can still be heard.

Pio2001
Pio2001 is offline  
Old 3rd December 2001, 22:29   #4
Pio2001
Senior Member
 
Join Date: Aug 2000
Location: Lyon, France
Posts: 293
I forgot :
According to its doc, SQRsoft explicitly resamples its input :

The sample converter will automatically change the track to the format selected in the "Open wave device as...".

Isn't Winamp 3 based on the same engine ?

Pio2001
Pio2001 is offline  
Old 3rd December 2001, 22:46   #5
peter
ist death
 
peter's Avatar
 
Join Date: May 2000
Posts: 3,704
[EDIT]
ok, talked to Christophe on irc.
both wa3 dsound and waveout DO resample to 44khz.
get this: http://www.blorp.com/~peter/zips/cnv_ds2.zip
that's all
peter is offline  
Old 4th December 2001, 17:24   #6
Pio2001
Senior Member
 
Join Date: Aug 2000
Location: Lyon, France
Posts: 293
Thank you for the link. The problem is solved for the SB Live. The sound is good.
But not with the Marc 2. It still plays at 44.1 kHz. The cracle is now smoother, it has become a noise modulated by the signal.

I don't know how this DirectSound output works, but maybe the problem is one of the three following :

-The plugin resamples at 44.1 kHz with a "better" quality (but still crappy), that allows the SB live to eliminate the resample distortion while resampling again to 48 kHz.
-The plugin asks the device for the sample rate instead of forcing it's own. The SB live works at 48 kHz, and the Marc 2 at 44.1 kHz unless another sample rate is specified by the application program.
-The Marc 2 can't stand DirectSound (and that's actually the case with games like Unreal Tournament), however Winamp 2's DirectSound output properly plays 48 kHz...(I've not checked for exactness at the bit level, but the sound is clean).

I'd like to listen to music with the Marc 2, because it allows bit-exact playback through a good quality digital output. With digital CD playback, it turns my computer into a very good CD player for external converter, while the SB live messes up the digital data.

For the time being, I'm sticking with Winamp 2 for that purpose.

I know that this is a tough problem because of the crossfading option, that requires a common sample rate for all sources. But Winamp should also be able of audiophile playback.
Maybe, when crossfading is disabled, it should play gapless only for a given sample rate, then make a gap anyway when changing of sample rate if two tracks next to each other have a different sample rate. I don't think files with different sample rate will ever need gapless playback.

Pio2001
Pio2001 is offline  
Old 4th December 2001, 17:31   #7
peter
ist death
 
peter's Avatar
 
Join Date: May 2000
Posts: 3,704
first, resampling is done in output plugins (for 'gapless' playback), AFTER crossfading - yes, that's extremely dumb, but i'm not the one who coded it and i could hardly believe that they've done such crap. anyway, crossfading has nothing to do here.
second, cnv_ds2 passes raw PCM data it receives to your soundcard (via DirectSound drivers). it DOES NOT resample, your drivers do. enabling primary buffer stuff in DirectSound output config might help.
peter is offline  
Old 4th December 2001, 19:57   #8
Pio2001
Senior Member
 
Join Date: Aug 2000
Location: Lyon, France
Posts: 293
When I enable the primary buffer, I get "Error : (01085400)" for all track at whatever sample rate.

And there is the same kind of crappy sound (as without the primary buffer enabled) in DirectSound games (UT, Alice). It must be all resampling to 44100.
I tried to reinstall the drivers with no luck. I think that this Marian soundcard don't handle DirectSound properly . It's a semi-pro soundcard designed for ASIO, digital linking, 24/96 recording and playback. But not for multimedia.

Thanks for the help anyway.

Edit : thx, to 44100

Pio2001
Pio2001 is offline  
Old 4th December 2001, 20:06   #9
peter
ist death
 
peter's Avatar
 
Join Date: May 2000
Posts: 3,704
oh boy, looks like i'm gonna have to replace wa3 waveout plugin too (next weekend maybe).
btw, make sure that you have the latest drivers for your soundcard.
peter is offline  
Old 4th December 2001, 21:00   #10
Pio2001
Senior Member
 
Join Date: Aug 2000
Location: Lyon, France
Posts: 293
I meant that the direct sound drivers of my soundcard must resample to 44.1, not Winamp DirectSound output, of course.
And yes, though old, they are the latest drivers.

Sorry if I was unclear.

Pio2001
Pio2001 is offline  
Old 5th December 2001, 00:01   #11
peter
ist death
 
peter's Avatar
 
Join Date: May 2000
Posts: 3,704
/me yawns
ok, try this one
peter is offline  
Old 5th December 2001, 05:15   #12
Christophe
Sexaholic
 
Join Date: Oct 2000
Posts: 114
Quote:
Originally posted by peter
first, resampling is done in output plugins (for 'gapless' playback), AFTER crossfading - yes, that's extremely dumb, but i'm not the one who coded it and i could hardly believe that they've done such crap.
Hey PP, why don't you start now and code your own fucking player that'll not be "such crap" and coded by "extremely dumb" people like the one we're currently working on?

until then, why don't you just shut the fuck up?

-christophe
Christophe is offline  
Old 5th December 2001, 09:31   #13
peter
ist death
 
peter's Avatar
 
Join Date: May 2000
Posts: 3,704
sorry for bitching, but i just don't get the idea of resampling after crossfading. i didn't mean any insult, this solution just seems weird to me. if you really have to hurt audio quality with software resampling, at least put it in right place so it keeps crossfader happy and make output format configurable so people don't bitch.
peter is offline  
Old 6th December 2001, 11:28   #14
Pio2001
Senior Member
 
Join Date: Aug 2000
Location: Lyon, France
Posts: 293
Thanks a lot, Peter, this one works perfectly !

The sound devices seemed to be messed up, I didn't check in depht, but the numbers were not the same as with the other plugin the first time. I'm not sure.

I checked for bit-exactness pluging the optical output of the Marc2 into its own optical input, and recording the playback at 44.1 and 48 kHz : no problem, the recorded files were perfectly identical to the originals (according to the FC command, after padding the silent parts).

The tracks play gaplessly. But the last track of the playlist is not played until the end, it misses about 2500 to 3500 samples each time (variable).

Thanks again.

Pio2001
Pio2001 is offline  
Old 6th December 2001, 19:08   #15
peter
ist death
 
peter's Avatar
 
Join Date: May 2000
Posts: 3,704
i'll look into the problem with missing samples at the end - it took like 2 hours for me to code this plugin, i might have left a bunch of minor glitches (i considered it a temporary hack).
[edit] try the updated version
peter is offline  
 
Go Back   Winamp & Shoutcast Forums > Winamp3 > Wasabi 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