[Speex-dev] Decoding multiple encoded frames
Darren Longhorn
darren.longhorn at redembedded.com
Thu Oct 9 06:28:02 PDT 2008
Jean-Marc Valin wrote:
>
>
> The decoder will return -1 if it can't decode anything else, so you just
> do something like:
>
> while(1) {
> err = speex_decode_int(state, bits, pcm);
> if (err==-1)
> break;
> output_data(pcm);
> }
I think I still didn't fully understand. As a test I encoded some frames
(wideband, with quality set to 8), each were 70 bytes. I then did three
things:
- passed half of it to the decoder
- passed exactly one frame to the decoder
- I passed two concatenated frames to the decoder.
In all cases speex_decode_int returned 0.
Unless I misunderstood what you say above, I think it should have
returned 0 only for the third test, -1 for the second test and perhaps
-2 for the first test?
Cheers
Darren
More information about the Speex-dev
mailing list