Bug 100918

Summary: redhat-credits causes audio distortion, but the ogg file by itself doesn't
Product: [Retired] Red Hat Linux Beta Reporter: George Karabin <gkarabin>
Component: redhat-artworkAssignee: Alexander Larsson <alexl>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: beta1CC: mitr
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-08-08 14:22:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 100644    
Attachments:
Description Flags
fixes the audio stuttering none

Description George Karabin 2003-07-27 03:03:46 UTC
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.

Comment 1 George Karabin 2003-07-27 03:09:08 UTC
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. :)

Comment 2 Miloslav Trmac 2003-07-27 21:20:22 UTC
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.

Comment 3 Miloslav Trmac 2003-07-27 21:23:10 UTC
*** Bug 81209 has been marked as a duplicate of this bug. ***

Comment 4 George Karabin 2003-07-27 22:21:14 UTC
Oops - yeah, that's what's going on. The "error message" theory was obviously a
product of sleep deprivation.... :)


Comment 5 Havoc Pennington 2003-07-28 00:39:55 UTC
Indeed, this looks like the right patch.
Doh. Fortunately I don't think I wrote that part of the code ;-)

Comment 6 Alexander Larsson 2003-08-06 09:48:43 UTC
I checked in the fix. It'll be in the next redhat-artwork build.


Comment 7 Alexander Larsson 2003-08-08 14:22:29 UTC
Fixed in 0.78-1