[Asterisk-Dev] ulaw <-> slinear and app_milliwatt
Eric Liedtke
e at musinghalfwit.org
Wed Sep 29 15:42:55 MST 2004
I've been playing around with app_milliwatt and have run into a
confusing situation I am hoping someone can help me with. I basically
copied the app file to my own and changed all the instances of
AST_FORMAT_ULAW to AST_FORMAT_SLINEAR and changed the datafilling
pattern and the buffer to be signed int .
I've spent many hours now reading up on ulaw and slinear and converting
between the two and swiped some source off the net to convert between
them. I figured that I should be able to then take the 8 values I got
converting from ulaw in app_milliwatt to slinear and replace them in my
copy of it and generate the same tone. However when I hit the SLINEAR
version the tone sounds much lower.
The source I used to convert ulaw<->slinear was here
http://www.speech.cs.cmu.edu/comp.speech/Section2/Q2.7.html
I'm not sure if I'm missing something about the conversion or the use of
different formats in *. Any light anyone can shed on this for me would
be greatly appreciated, my logic is obviously flawed somewhere and I
can't seem to find where that hole is.
Thanks,
-e
More information about the asterisk-dev
mailing list