Subject: bin/9329: audiorecord records something audioplay can't play
To: None <gnats-bugs@gnats.netbsd.org>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
List: netbsd-bugs
Date: 02/01/2000 16:33:40
>Number:         9329
>Category:       bin
>Synopsis:       audiorecord records something audioplay can't play
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb  1 16:33:00 2000
>Last-Modified:
>Originator:     Wolfgang Rupprecht
>Organization:
W S Rupprecht Computer Consulting, Fremont CA
>Release:        NetBSD-current 1/11/00
>Environment:

System: NetBSD capsicum.wsrcc.com 1.4Q NetBSD 1.4Q (WSRCC) #0: Fri Jan 28 08:58:11 PST 2000 wolfgang@capsicum.wsrcc.com:/v/src/netbsd/NetBSD-current/usr/src/sys/arch/i386/compile/WSRCC i386


>Description:
    audiorecord records something audioplay can't play
>How-To-Repeat:

    $ audiorecord -t 10 wsr.au
    $ audioplay -V wsr.au 
    audioplay: unknown unsupported Sun audio encoding format 0
    audioplay: unknown audio file: wsr.au

>Fix:
    
    /usr/src/usr.bin/audio/record/record.c intentionally doesn't
    initialize the encoding field unless it is explicitly specified on
    the command line.  

    I don't really understand the full intention here, so perhaps this is 
    defeating a different feature the author wanted.

cd /v/src/netbsd/NetBSD-current/usr/src/usr.bin/audio/record/
diff -u /v/src/netbsd/NetBSD-current/usr/src/usr.bin/audio/record/record.c.\~1\~ /v/src/netbsd/NetBSD-current/usr/src/usr.bin/audio/record/record.c
--- /v/src/netbsd/NetBSD-current/usr/src/usr.bin/audio/record/record.c.~1~	Mon Nov  8 04:18:00 1999
+++ /v/src/netbsd/NetBSD-current/usr/src/usr.bin/audio/record/record.c	Tue Feb  1 16:29:42 2000
@@ -240,6 +240,8 @@
 		info.record.precision = precision;
 	if (encoding)
 		info.record.encoding = encoding;
+	else
+		encoding = oinfo.record.encoding;
 	if (volume)
 		info.record.gain = volume;
 	if (port)

Diff finished at Tue Feb  1 16:30:55
            
>Audit-Trail:
>Unformatted: