speex_bits_reset is before encoding, not decoding. If you don't call it,
then everything you encode will be appended so it will grow without end.
As for the point of the SpeexBits struct, it's there as a sort of
"array
of bits" to it's easy to pack and unpack bits.
Jean-Marc
Le lundi 06 juin 2005 ? 13:54 -0500, Matt DeMoss a ?crit
:> The example in the documentation demonstrates using speex_bits_reset
> before encoding and decoding each frame.
>
> "
> speex_bits_reset(&bits);
>
> speex_encode(enc_state, input_frame, &bits);
>
> nbBytes = speex_bits_write(&bits, byte_ptr, MAX_NB_BYTES);
> "
>
> What happens if this is not done? I think I'm missing the point of
> having a SpeexBits object.
>
>
> _______________________________________________
> Speex-dev mailing list
> Speex-dev@xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
--
Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca>
Universite de Sherbrooke