View Single Post
Old 16th June 2005, 12:21   #12
Junior Member
Join Date: Jun 2005
Location: Harvard, MA
Posts: 2
Bug Report: Pure Noise Sometimes After Pause with 24bit Vorbis Input Plugin

I've noticed a bug in 5.092: If I press pause and then resume playback, about 1/10 times the playback will be pure noise. The other 9/10 times, there is no problem. It seems to be random, and seems to be more likely when it has been paused for a long time, which makes me suspect a memory leak.

The configuration that exibits the problem is as follows: ogg vorbis -q9 files, vorbis input plugin with 24bit playback enabled (more on this below), DirectSound output plugin with prebuffer and hardware acceleration enabled, Soundblaster 24bit LIVE! soundcard (with output stage modified to reduce gain), Shure E5C headphones. Running Windows 2000 Pro.

If I hear the pure noise, and then press stop, and then press play, then playback resumes from the beginning of the track normally. This makes me suspect the vorbis plugin because unlike mp3 files, the internal "state" of the ogg decoder depends on the data in each frame back to the beginning of the file. Therefore, if this state were corrupted by a memory leak, the vorbis decoding would be corrupted, and you would hear pseudorandom noise.

A side note on 24bit playback, since this bug only seems to happen in 24bit mode, and some may ask "why don't you just disable 24bit mode, since it CAN'T make a difference": there is a note in the vorbis plugin when you enable 24bit playback that says "This won't make it sound better with 24bit soundblaster cards." This turns out to be wrong - it does make a HUGE difference under these conditions:
1) You are listening to a quiet piece of music (-30dB from maximum amplitude)
2) You have the soundcard volume control turned way down (-20dB) because your speakers are very sensitive (even when the soundcard output amp has been hand modified to attenuate by 20dB)

These two factors multiply so that you are talking about -50dB data. At 16 bits, this means that the loudest part of the quiet music is now at only code #207 of a possible 65536. You can definately hear quantization errors at this level. When I enable the 24 bit playback, everything sounds good. Which is interesting because vorbis playback is like jpg encoding in that it does a Fourier decomposition and stores only the *frequency* information. Thus, on decoding, it is possible to reconstruct the original 16 bit data with *higher* precision than that with which it was originally encoded. This may be why the prevailing opinion has been that 24bits doesn't make a difference - it only does with vorbis.
jhbretz is offline   Reply With Quote