[vorbis-dev] encode example
R.L. Horn
eastcheap at fastmail.fm
Tue May 18 17:38:44 PDT 2004
On Tue, 18 May 2004, Adriano Almeida wrote:
> How can I encode a mono file in 22050 and 44100?
> ret=vorbis_encode_init_vbr(&vi,1,22050,.5) ;
That's ok.
> // uninterleave samples
> for(i=0;i<bytes/2;i++)
> {
> buffer[0][i]=((readbuffer[i*2+1]<<8)|
> (0x00ff&(int)readbuffer[i*2]))/32768.f;
> }
Ummm, that's also ok. Are you sure the problem isn't on the decoding end
(i.e. a player that assumes stereo)?
--- >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