Red Hat Bugzilla – Bug 100918
redhat-credits causes audio distortion, but the ogg file by itself doesn't
Last modified: 2007-04-18 12:56:11 EDT
If I play /usr/share/redhat-credits.ogg with ogg123, it sounds nice a nice
guitar solo. If I run /usr/libexec/redhat-credits instead, I immediately hear a
low frequency ticking, at a couple of Hz. Then within a few seconds the guitar
begins to play, with the ticking accompanying it. It almost sounds like a drum
machine in the background - because the ticking isn't quite periodic it has some
rhythm to it.
P.S. Nice tune. Sounds like something that Margo of the Cowboy Junkies ought to
be singing to.
Created attachment 93172 [details]
fixes the audio stuttering
All of the console output that ogg123 is generating is returnin a ton of error
messages, given the high rate at which it writes to the console. Using dup2 and
/dev/null is much more smooth - apparently it's a lot more expensive to write
to a nonexisting file handle than an existing one.
On my 1GHz Athlon, this is definitely noticeable. Maybe different grades of
hardware don't see the problem, maybe they do. In any case, a patch that makes
the program much more smooth is attached. :)
Doh! I was suspecting the kernel...
What really happens is that the ogg123 uses file descriptor 2 for /dev/dsp
(because of the close (1), close (2) that shouldn't be there), and is sending
its status information with the sound data.
*** Bug 81209 has been marked as a duplicate of this bug. ***
Oops - yeah, that's what's going on. The "error message" theory was obviously a
product of sleep deprivation.... :)
Indeed, this looks like the right patch.
Doh. Fortunately I don't think I wrote that part of the code ;-)
I checked in the fix. It'll be in the next redhat-artwork build.
Fixed in 0.78-1