[vorbis] Newbie question
msmith at labyrinth.net.au
msmith at labyrinth.net.au
Mon Dec 16 05:37:03 PST 2002
Carsten Orthbandt <carsten.orthbandt at sek-ost.de> said:
> I'm new to OggVorbis (btw: we're about to use it in a game...) and
> am curious about page sizes when decoding ogg streams. With every
> stream I tested, I get either 512 or 4096 byte packages from ov_read().
> While this is fine with me, I'd like to know if there is a upper limit
> to this chunk size. If it's variable, how do I find out what the max
> chunk size for the open stream is?
> I know that I can limit the amount of data ov_read retrieves through
> the size param, but I'd like to drive it with the best possible size
> and no artificial restrictions on my side. But if there was a remote
> possibility of ov_read() returning big chunks (>64 kbyte), i'd rather
> know that in advance.
In theory, it could return up to (sample size)*(number of channels)*4096. So,
if you restrict yourself to stereo (or mono, which is obviously less), and you
decode to 16 bit samples (2 bytes), the maximum is 16kB. This is a
format-imposed maximum, no encoder actually produces streams that'll do that.
In actual real-world streams, you can halve that to 8 kB (8192 bytes) (I
_think_ there are some encoding modes that will do that, though I haven't
checked).
>
> On a side note: this is on Win32 and I'd like to note that I had
> serious trouble linking the static libs with /MT code. I Finally
> resorted to building a single oggvorbis lib with all source included.
We're mostly not windows experts - the win32 build files often have some
problems, and we'd _really_ appreciate any help with issues like these.
Mike
--- >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