[vorbis-dev] Sampling resolution

Dominik Kuhlen dh0dom at amsat.org
Tue Jan 13 05:35:56 PST 2004



On Tuesday 06 January 2004 15:34, Christian Wassmer wrote:
> Hi, it seems that every decoded Ogg/Vorbis-File has a sampling
> resolution of 16 bits. Is this correct?
For internal representation  floating point is used, so
you can use as many bits as you like.
But the spec says you should use at least 16 Bit.

Here a fragment of decoder_example.c shipped  with libvorbis:

----------- snip ----------
       **pcm is a multichannel float vector.  In stereo, for
        example, pcm[0] is left, and pcm[1] is right.  samples is
        the size of each channel.  Convert the float values
        (-1.<=range<=1.) to whatever PCM format and write it out */

        while((samples=vorbis_synthesis_pcmout(&vd,&pcm))>0){
---------- snip ----------

>
> Thanks,
> Christian Wassmer
>
> --- >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.

<p>Dominik
--- >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