Bug 81660 - Sound put through ESD skips with playback underruns (cause known, see bug body)
Summary: Sound put through ESD skips with playback underruns (cause known, see bug body)
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: esound
Version: 7.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Havoc Pennington
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2003-01-12 09:42 UTC by h0e
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-01-12 16:28:54 UTC

Attachments (Terms of Use)

Description h0e 2003-01-12 09:42:18 UTC
Any sound at all that I play through esd, from wav or mp3 or anything else, will
skip as if the playback buffer is underrunning. I think this is what's
happening, though I have no way to confirm it. The severity of the problem
varies depending on the load on my system, from small blips when the system
isn't doing anything else, to constant static with a soft discernible sound
stream going about 1/4 as fast as it should, if I'm building esound :). No
matter how quiet my system is though I have problems. My sound files tend to be
44.1khz joint-stereo MP3s.

I hunted around for the cause of this problem, and found out that the lines in
audio.c that mess with SNDCTL_DSP_SETFRAGMENT are the cause of the problem, and
if I remove them then the problem is fixed. Using some instrumentation I found
out that with said lines of code, the sound driver is set to use 128 fragments
of 256 bytes, while without those lines it defaults to 16 fragments of 4096 bytes.

I am using redhat 7.0, with the following stuff:

My system is:
Pentium II 233MHz
Sound Blaster 16 non-pnp OEM (had this for about 8 years)
80GB hard disk running at UltraDMA-33

The wierd thing is I'm sure I didn't have this problem before I upgraded my hard
disk (from a 6.4GB) and reinstalled rh7. My new setup is the same as it was as
far as I can tell, except for a larger swap space and root partition.

Comment 1 Havoc Pennington 2003-01-12 16:28:54 UTC
The stuff about SETFRAGMENT appears to be disabled in the latest release 
of esound. I'm not sure what version of Red Hat Linux that would have 
appeared in first, but it should be in 8.0 for sure.

Note You need to log in before you can comment on or make changes to this bug.