[PATCH] GSM decode

FyMonkey <[email protected]> Sun, 22 Mar 2009 18:38:36 -0400
Newsgroups gmane.comp.gnu.ccaudio.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------020705080303090103060405
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

To Whom It May Concern:

I found a bug that affects the GSM codec in the ccaudio2 library.  The 
problem is that it encodes just fine but the decode does not work 
correctly.  The reason for this is because the encoded frame is 
incremented at 160 bytes instead of the GSM standard 33 bytes.  Please 
refer to the attached patch file.

Regards,
-FyMonkey

--------------020705080303090103060405
Content-Type: text/x-diff;
 name="ccaudio2-1.0.0.gsm.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ccaudio2-1.0.0.gsm.patch"

diff -crB ccaudio2-1.0.0/codecs/gsm.cpp ccaudio2-1.0.1/codecs/gsm.cpp
*** ccaudio2-1.0.0/codecs/gsm.cpp	2008-12-16 12:23:29.000000000 -0500
--- ccaudio2-1.0.1/codecs/gsm.cpp	2009-03-22 18:35:52.000000000 -0400
***************
*** 115,121 ****
  
  	while(count--) {
  		gsm_decode(decoder, encoded, dest);
! 		encoded += 160;
  		dest += 160;
  	}
  	return result;
--- 115,121 ----
  
  	while(count--) {
  		gsm_decode(decoder, encoded, dest);
! 		encoded += 33;
  		dest += 160;
  	}
  	return result;

--------------020705080303090103060405
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ccaudio-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/ccaudio-devel

--------------020705080303090103060405--