Displaying 4 results from an estimated 4 matches for "frame_cnt".
Did you mean:
frame_count
2010 Apr 10
2
Is Speex 1.0 and >=1.1 compatible?
...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_nbytes(&bits);
char output_buf[nbytes];
nbytes = speex_bits_write(&bits, output_buf, nbytes);
writeEncodedSamples(output_buf, nbytes);
spe...
2010 Apr 11
2
Is Speex 1.0 and >=1.1 compatible?
...gt; >
> > 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_nbytes(&bits);
> > char output_buf[nbytes];
> > nbytes = speex_bits_write(&bits, output_b...
2010 Apr 10
0
Is Speex 1.0 and >=1.1 compatible?
...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_nbytes(&bits);
> char output_buf[nbytes];
> nbytes = speex_bits_write(&bits, output_buf, nbytes);
> writeEncodedSamp...
2010 Apr 11
0
Is Speex 1.0 and >=1.1 compatible?
...>>> 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_nbytes(&bits);
>>> char output_buf[nbytes];
>>> nbytes = speex_bits_write(&...