[asterisk-dev] Understanding how to Write RTP packets out to a WAVE file -- Playback is too fast

Race Vanderdecken asteriskdev at codetyrant.com
Mon Sep 11 09:21:29 MST 2006


I am trying to understand how Asterisk writes the RTP packets out to a
WAVE RIFF file.

I have the code working for the most part.

I can open and create a RIFF WAVEfmt file. That works.

I can create the header; I used the write_header() function settings
from format_wav.c

I can receive the rtp, strip the headers, convert them from ulaw to
Linear PCM. I used the
http://hazelware.luggle.com/tutorials/mulawcompression.html table
decompress (but the asterisk decompress does the same thing.)

I can update the RIFF header info.

I can close the file

And I can play back the file using Windows media player or Adobe
Audition, which is cool and free for 30 days.

But the wav file I get plays back too fast, about 30% to fast. I can use
Audition to slow the file playback by about 30% and it sounds normal.

So, what am I missing? I am writing the RTP packets directly as they
come in. I am not checking for out of order and the machine never loses
or get them out of order.

Anyone?

-Race

Race Vanderdecken
Code Tyrant





More information about the asterisk-dev mailing list