Bug 17713

Summary: GRECORD sets the incorrect channel (mono/stereo) when recording mono
Product: [Retired] Red Hat Linux Reporter: Tom Woller <twoller>
Component: gnome-mediaAssignee: Havoc Pennington <hp>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
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: 2000-10-23 18:52:08 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:

Description Tom Woller 2000-09-19 16:57:51 UTC
GRECORD sets the incorrect channel (mono/stereo) when recording mono. the 
problem is a local variable that is the same name as a global.  the global 
channel value is corrupted with the ESD_STEREO definition (bit field not a 
binary 0/1 value).  problem appears after playing back recorded data, the 
audio is distorted.

patch for grec.c in GRECORD 0.3.4:

--- grec.c	Mon Sep 18 10:13:54 2000
+++ grec.c.fix	Mon Sep 18 10:13:45 2000
@@ -528,7 +528,7 @@
 	gint length = 0;
 	
 	gint bits = ESD_BITS16;
-	gint channels = ESD_STEREO;
+	gint esd_channels = ESD_STEREO;
 	gint mode = ESD_STREAM;
 	gint func = ESD_RECORD;
 	esd_format_t format = 0;
@@ -551,7 +551,7 @@
 
 	rate = atoi (samplerate);
 
-	format = bits | channels | mode | func;
+	format = bits | esd_channels | mode | func;
 	sock = esd_record_stream_fallback (format, rate, host, name);
 	
 	if (sock <= 0)

Comment 1 Harald Hoyer 2000-10-13 13:52:05 UTC
grecord is in gnome-media :)

Comment 2 Elliot Lee 2001-02-01 00:37:52 UTC
fixed in gnome-media-1.2.0-10