Speex Decoder state reset

  audio, audio-streaming, c++, encoder-decoder, speex

I am using speex decoder(cpp library LibSpeex) to decode multirame speex packet.I have few queries –

1.When to reset decoder state –
After decoding all frames of one packet and before starting decoding the next packet does the decoder must be reset?
i.e invoking speex_decoder_destroy(dec_state); before every new packet decoding begins?

2.Is output of speex decoder deterministic, Same encoded packet when decoded will always give the same result?
3. When I decode a packet containing 5 frames by invoking speex_decode_int 5 times, and then start decoding same packet again, if I start decoding same packet with call to speex_decoder_destroy, decoder output is same for second packet as it was for first but if I do not call speex_decoder_destroy before starting decoding packet for second time output differs from first output. Why is it so?

Thanks

Source: Windows Questions C++

LEAVE A COMMENT