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

Greg Mayer gmayer at siliconetix.com
Wed May 16 16:51:56 PDT 2001



Thanks for the help on this problem.

Along these lines, is it a necessity that ov_read() and ao_play() be split
into two processes, where the buffer is a shared memory segment.  I noticed
that this seems to be how the ogg123 application works, but was looking to
avoid this route if possible.

Thanks,
Greg

-----Original Message-----
From: owner-vorbis-dev at xiph.org [mailto:owner-vorbis-dev at xiph.org]On
Behalf Of Monty
Sent: Wednesday, May 16, 2001 12:05 PM
To: vorbis-dev at xiph.org
Subject: Re: [vorbis-dev] Jittery Audio Output When Calling ao_play()
function.

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.

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