search for: sample_buf

Displaying 4 results from an estimated 4 matches for "sample_buf".

Did you mean: sample_b
2010 Apr 10
2
Is Speex 1.0 and >=1.1 compatible?
...s the version of Speex is the same on both sides. When using a newer Speex (1.1.?) to encode and an older version to decode (1.0.5), it does not work. The encoder code look like this: int AudioEncoderSpeex::writeSamples(const float *samples, int count) { for (int i=0; i<count; ++i) { sample_buf[buf_len++] = samples[i] * 32767.0; if (buf_len == frame_size) { speex_encode(enc_state, sample_buf, &bits); buf_len = 0; if (++frame_cnt == 4) // Four frames per packet { speex_bits_insert_terminator(&bits); int nbytes = speex_bits_nby...
2010 Apr 11
2
Is Speex 1.0 and >=1.1 compatible?
...decode > > (1.0.5), it does not work. > > > > The encoder code look like this: > > > > int AudioEncoderSpeex::writeSamples(const float *samples, int count) > > { > > > > for (int i=0; i<count; ++i) > > { > > > > sample_buf[buf_len++] = samples[i] * 32767.0; > > > > if (buf_len == frame_size) > > { > > > > speex_encode(enc_state, sample_buf,&bits); > > buf_len = 0; > > > > if (++frame_cnt == 4) // Four frames per pac...
2010 Apr 10
0
Is Speex 1.0 and >=1.1 compatible?
...ides. When using a newer Speex (1.1.?) to encode > and an older version to decode (1.0.5), it does not work. > > The encoder code look like this: > > int AudioEncoderSpeex::writeSamples(const float *samples, int count) > { > for (int i=0; i<count; ++i) > { > sample_buf[buf_len++] = samples[i] * 32767.0; > > if (buf_len == frame_size) > { > speex_encode(enc_state, sample_buf,&bits); > buf_len = 0; > > if (++frame_cnt == 4) // Four frames per packet > { > speex_bits_insert_terminator(&amp...
2010 Apr 11
0
Is Speex 1.0 and >=1.1 compatible?
...it does not work. >>> >>> The encoder code look like this: >>> >>> int AudioEncoderSpeex::writeSamples(const float *samples, int count) >>> { >>> >>> for (int i=0; i<count; ++i) >>> { >>> >>> sample_buf[buf_len++] = samples[i] * 32767.0; >>> >>> if (buf_len == frame_size) >>> { >>> >>> speex_encode(enc_state, sample_buf,&bits); >>> buf_len = 0; >>> >>> if (++frame_cnt == 4) // Four frame...