Detecting bitrate mode

Software Engineer <[email protected]>
Newsgroups gmane.comp.audio.compression.speex.devel
Message-ID <[email protected]>
Hi,
 
Is there anybody out there who can tell me how to solve the following problem:
 
An RTP payload of encoded speex data is received. The length of the payload is
N bytes. The length corresponds to 20ms * K of encoded audio where K is an
unknown integer. The audio was encoded by an encoder in wideband mode.
 
How do I partition the payload when I don't know which bitrate mode of the
encoder? I want to hand over 20ms of encoded audio to the decoder, but to be
able to do that I need to know how many bytes of the payload corresponds to
20ms.
 
I read that the bitrate mode and the wideband bit is embedded in the first byte, but
that is not what I actually see. What I see is that the MSB of the first encoded byte
is 0 and the following bits do not correspond to the bitrate mode that was used when
encoding the audio.
 
So I am wondering what I am doing wrong.
 
Is it because the first part of the payload is a narrowband bitstream ? And I need to 
extract the narrowband bitrate mode first, figure out how many bytes (M) that mode
corresponds to and skip M bytes ahead to get the wideband
bitrate mode? 
 
Or is there a quicker way of doing it?
 
Can somebody please shed some light on this??
 
Thank you!!

_______________________________________________
Speex-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/speex-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.