[vorbis] problems loading an ogg to memory

Daniil V. Kolpakov dan at riga.lv
Wed Sep 3 10:11:20 PDT 2003



On 3 óÅÎÔÑÂÒØ 2003 20:30, Cameron Patrick wrote:
> On Wed, Sep 03, 2003 at 12:16:34PM -0500, Joel Gonzales wrote:
> | This seems to be where I'm stuck at currently. What function do I
> | call to set the sample size?
> |
> | Just to make sure my math is correct:
> | if we have 200 PCM samples, 1 channel and a rate of 44100, that
> | would give 200*1*44100 = 8820000 (assuming a file that isn't
> | chained)
> |
> | So I'd need an array of size 8820000? or is the number given in
> | bits/bytes?
>
> Unless I'm misunderstanding you: nope, that's wrong.  You want 200
> samples * 1 channel * 16 bits per channel => 3200 bits or 400 bytes.
                                ^^^^^^^^^^^
I would say, "per sample".


-- 
/dev/brains: permission denied

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

<p><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-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 mailing list