Joe-Palmer / rtmplite

Automatically exported from code.google.com/p/rtmplite
0 stars 0 forks source link

Poor sound when transcoding speex<=>alaw #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Bugfix:

--- siprtmp.py.orig     2012-03-01 19:23:30.000000000 +0400
+++ siprtmp.py  2012-03-01 19:21:56.000000000 +0400
@@ -1233,7 +1233,7 @@
             if str(fmt.name).lower() == 'pcmu' and fmt.rate == 8000 or fmt.pt == 0:
                 linear = audioop.ulaw2lin(p.payload, 2)
             elif str(fmt.name).lower() == 'pcma' and fmt.rate == 8000 or fmt.pt == 8:
-                linear = audioop.ulaw2lin(p.payload, 2)
+                linear = audioop.alaw2lin(p.payload, 2)
             else: 
                 raise ValueError, 'ignoring unsupported payload type %r %r/%r'%(fmt.pt, fmt.name, fmt.rate)
             # TODO: never send speex/16000 to Flash after transcoding

Original issue reported on code.google.com by nikb...@gmail.com on 1 Mar 2012 at 3:26

GoogleCodeExporter commented 9 years ago
Thanks for the patch. Applied in svn r148.

Original comment by kundan10 on 1 Mar 2012 at 4:46