[Vorbis-dev] Sample accuracy in reading

Michael Smith mlrsmith at gmail.com
Fri Jun 24 08:48:59 PDT 2005


On 6/23/05, Christopher Egner <disciplezero-nl at syrrax.com> wrote:
> Hey guys,
> 
> I've finished my work on reading vorbis files (straight reading at either
> PCM sample lengths, or time lengths). However, I've run across a question.
> When you call vorbis_synthesis_read, I assume that increments the internal
> ptrs so you don't get the same data twice. The question is, what happens if
> you call vorbis_synthesis and vorbis_synthesis_blockin? Does the next call
> have what SHOULD be the next PCM data, or has it incidentally been
> invalidated? A little simpler, is it safe to load another page packet and
> decode while there is still pcm data waiting?

I wouldn't expect this to be safe, though it may be. Should be easy to
check, if it doesn't work, then it isn't safe! It doesn't really seem
like a very useful thing to do, though. If you want to buffer decoded
data, why not just buffer it externally to libvorbis (probably after
converting to the sample format you want to use)?

Mike


More information about the Vorbis-dev mailing list