[vorbis] problems loading an ogg to memory
Daniil V. Kolpakov
dan at riga.lv
Wed Sep 3 10:07:50 PDT 2003
On 3 óÅÎÔÑÂÒØ 2003 20:16, 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?
>
> Thanks a bunch for the help.
If we have 200 _seconds_, rate _is_ significant, but if we have 200 _PCM
samples_, it is _not_.
Having 200 PCM samples we need (200 * BPS_value / 8) bytes in memory to
store it. BPS_value is how much Bits we will spend Per Sample
(typically 16).
--
/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