diff options
Diffstat (limited to 'libspeex/bits.c')
-rw-r--r-- | libspeex/bits.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libspeex/bits.c b/libspeex/bits.c index 5c4cb0e..311e812 100644 --- a/libspeex/bits.c +++ b/libspeex/bits.c @@ -37,7 +37,8 @@ #endif #include <speex/speex_bits.h> -#include "misc.h" +#include "arch.h" +#include "os_support.h" /* Maximum size of the bit-stream (for fixed-size allocation) */ #ifndef MAX_CHARS_PER_FRAME @@ -67,6 +68,20 @@ void speex_bits_init_buffer(SpeexBits *bits, void *buff, int buf_size) speex_bits_reset(bits); } +void speex_bits_set_bit_buffer(SpeexBits *bits, void *buff, int buf_size) +{ + bits->chars = (char*)buff; + bits->buf_size = buf_size; + + bits->owner=0; + + bits->nbBits=buf_size<<LOG2_BITS_PER_CHAR; + bits->charPtr=0; + bits->bitPtr=0; + bits->overflow=0; + +} + void speex_bits_destroy(SpeexBits *bits) { if (bits->owner) |