[vorbis-dev] encode example

Adriano Almeida adriano at continuum.com.br
Tue May 18 12:45:54 PDT 2004



Hi,
I am testing the encoder example and I have a question about it...  How can I encode a mono file in 22050 and 44100?
I've changed the init values to:
  ret=vorbis_encode_init_vbr(&vi,1,22050,.5) ;

and in the loop:
// uninterleave samples 
 for(i=0;i<bytes/2;i++)
         {
       buffer[0][i]=((readbuffer[i*2+1]<<8)|(0x00ff&(int)readbuffer[i*2]))/32768.f;
         }

.. what happened is that my file came 2x accelerated (originalsamples/2).  Why this happened?

thanks

    

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list