[Live-devel] GSM with SimpleRTPSink & WAVAudioFileSource.

Ross Finlayson finlayson at live.com
Thu Feb 17 12:34:58 PST 2005


At 12:11 PM 2/17/05, you wrote:
>I'm using WAVAudioFileSource & SimpleRTPSink as a foundation to implement 
>GSM recording source.

Note that "WAVAudioFileSource" returns raw PCM audio data.  To convert this 
to GSM, you will need to write a (new)  'filter' class that encodes this 
data to GSM frames.

Then, instead of using "SimpleRTPSink", you should use (the existing) 
"GSMAudioRTPSink".

I.e., you will end up with:
         WAVAudioFileSource -> YourGSMEncoder -> GSMAudioRTPSink

>  Now, I have three questiones:
>
>1. Should I make fFrameSize always be like "number * 33" (33 is GSM base 
>frame)? How can I assure  that the receiver always get the whole 33 bytes?
>2. Should I put as much data into a frame as the encoded data ? or I have 
>calculate according to the orginal PCM timing?
>3. In source, there is something like:
>fDurationInMicroseconds = fLastPlayTime
>         = (unsigned)((fPlayTimePerSample*fFrameSize)/fBytesPerSample);
>but there should be some difference between fDurationInMicroseconds and 
>fLastPlayTime, how to set them ?

Your (new) GSM-encoding filter class will need to:
- deliver 1 GSM frame at a time (and setting "fFrameSize" to 33)
- setting "fDurationInMicroseconds" to be the duration (in microseconds) of 
each GSM frame.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list