[vorbis] problems loading an ogg to memory

Cameron Patrick cameron at patrick.wattle.id.au
Wed Sep 3 10:30:28 PDT 2003



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.

CP.

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