[vorbis-dev] Reading OGG embedded in a pack file

Ken Rogoway Ken at Rogoway.com
Mon May 3 21:13:55 PDT 2004



>That's right. There's no way for libvorbisfile to find out how long a
stream
>is if it's not seekable - there could be an indefinate amount of
information
>to come.

Okay.  It seems like this could have been solved by having a parm for non-
seekable streams that specified the size of the stream.  Regardless, I
understand
what you are saying and realize the limitations vs. what I am trying to do.

>> This appears to be returning OV_EINVAL (-131) because the stream is not
>> seekable.  However, my code needs to know the number of samples so I can
>> allocate a buffer to read into:

>Do you really need to allocate a buffer for the entire stream? That could
be
>awfully large. I'd not recommend this approach, unless you know with
complete
>certainty that the streams will always be extremely short (say... less than
a
>couple of seconds long).

I want to load the entire steam so I can pass off the decoded data to a
function
that plays wave data.

>If you absolutely _must_ do things this way, then you'll have to tell
>libvorbisfile that your "file" is seekable: if the underlying datasource is
>seekable, this is simple: you just need to make the seek/tell functions
work
>relative to the start/end of your sub-file within your archive.

This sounds like what I will have to do.  Thanks for the clarification.

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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.672 / Virus Database: 434 - Release Date: 4/28/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.672 / Virus Database: 434 - Release Date: 4/28/2004

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