BASS sounds cruddy playing 8k wavs

Started by little_jay,

little_jay

Playing an 8000 Hz wav using BASS_StreamCreateFile sounds really bad... like a very low bit rate or depth.

This happens when BASS is initialized with a freq of 44100.

It does NOT happen if BASS is initialized with a freq of 8000 -- but if anything else plays sound (ie windows beep when you change volume in the taskbar) the BASS playback of the 8000 Hz wave immediately starts sounds crappy again.

The same behavior occurs with windows media player -- the 8k wav sounds fine until another program plays sound.

But the problem does NOT occur if the 8k wav is played in the windows "sound recorder".

System is Dell Dimension 2350 running Windows 2kPro service pack 3, using built-in SoundMax audio, bass 1.7, media player 6.4.

Is this a win2k problem? directX problem?  Crappy sound card?
Is there any way to prevent this short of having to convert all wavs to the same frequency?

Thanks
lil j

little_jay

I can fix it by going to ControlPanel->Sounds&Multimedia->Audio->SoundPlayback->Advanced->Performance->SampleRateConversionQuality and setting it from "good" to "best".  Probably not a bad idea anyway.  Now the 8k wavs sound fine when BASS is initialzed at 44100, and don't get cruddy when another sample is played over them.  Still, it seems strange to me that Sound Recorder is exempt from this problem.

Ian @ un4seen

Yep, when a channel is software mixed (ie. the soundcard has no hardware channels), then that "Sample rate conversion quality" option takes effect. The default setting is "best" in WinXP, but only "good" in previous Windows version.

In your example, when the 8000hz stream is the only sound playing, then the soundcard can output it at 8000hz and no resampling is required. But when you also play the 44100hz sound, then the output is changed to 44100hz (the 44100hz sound would obviously be bad at 8000hz), and so the 8000hz sound has to be resampled to 44100hz.

The reason Window's Sound Recorder was not affected is that it uses the waveOut API (not DirectSound), which always uses the "best" option regardless of the "Sample rate conversion quality" setting.

little_jay

Thanks.  Is it better then to initialize BASS at 44.1k or 8k, to get the highest quality 8k playback?

Or, quality being comparable, does it require less CPU time to play 8k sound if BASS is initialized at 8k?

Ian @ un4seen

The output rate you initialize BASS at only actually has effect on software mixed channels on Win9x (VxD drivers). On Win2k/XP (WDM drivers) it has no effect, and instead it does as I described above - the output rate is automatically adjusted depending on what's being played.

But now that you mention it... you're using Win2k, and what's happening is the "Win2k fix" is using the rate you specify, forcing the output to atleast that rate. That'll be corrected in 1.8 :)