[vorbis-dev] Jittery Audio Output When Calling ao_play() function.

Monty xiphmont at xiph.org
Wed May 16 12:05:29 PDT 2001



On Sun, May 13, 2001 at 11:49:34PM -0700, Greg Mayer wrote:
> It basically gets into a loop and gets the PCM via the ov_read() function,
> then dumps it to the ao_play() function for output.  I'm monitoring the
> return value from the ov_read() call and it isn't reporting any errors.  Any
> ideas on what my be the culprit, here?  I believe it to be in the ao_play()
> call, so possibly a problem with how I'm accessing my audio device.

ov_read decodes/returns only one packet of audio at a time, and short
blocks are very very short; too short for smooth playback under most
circumstances as the system is spending more time on overhead to set
up playback of the tiny snippet than it is decoding/playing (and
underutilizing buffering, making it orders of magnitude more likely to
starve playback).

You probably want to stick a buffer between ov_read and ao_play.

Monty

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