Menu

#21 bug in reading/writing 8-bit twos coded audio

open
nobody
5
2003-04-22
2003-04-22
No

There is a bug reading/writing twos coded audio when it
uses only 8 bits per sample, and when reading/writing
on a system with little-endian ints (such as Intel).
The fix is very simple:

Index: codec_twos.c

RCS file:
/cvsroot/openquicktime/OpenQuicktime/audioplugins/simple/codec_twos.c,v
retrieving revision 1.9
diff -u -u -r1.9 codec_twos.c
--- codec_twos.c 15 Dec 2002 01:51:56 -0000 1.9
+++ codec_twos.c 22 Apr 2003 12:53:40 -0000
@@ -54,7 +54,7 @@
case 8:
for(i=0;i < samples; i+=1)
{
- buffer_out[i] = buffer_in[1];
+ buffer_out[i] = buffer_in[i];
}
break;

Discussion


Log in to post a comment.

MongoDB Logo MongoDB