[vorbis] Jerkiness in player on some songs
Lance Paine
lbp1 at cs.waikato.ac.nz
Sun Jul 1 21:57:35 PDT 2001
LANCE:
> > What could be causing my player to skip, and repeat (ie Jerky) with some
> > songs and not others?
> > I am just using a timer and checking the buffer. Could it be that with
the
> > troublesome files the are extra empty packets (or something) that cause
this
> > timer approach to be inadequate?
> > I usually have no, problems, just with one or two files, and they play
> > correctly in winamp
> > I'm using beta encoder, and plugin, and vorbisfile.
MONTY:
>
> Most modern sound hardware uses a ring buffer; if it's starved, it
> will repeat the data in the buffer until new data shows up.
>
> It's possible that your player is starving the harware buffers by
> accident; for example, note that vorbisfile ov_read() returns (at
> most) only a packet at a time; short block packets return very small
> amounts of data. If your player is submitting only short blocks, the
> sound hardware may simply be working with fragments far too small for
> optimal playback.
>
> I mention this only as the problem has shown up in the past; the
> description doesn't quite match this theory, but if you're out of
> places to look for trouble, buffer timing is a good place to start.
>
LANCE:
I don't double buffer, I find out how much is left in the directx buffer,
and fill that, calling ov_read multiple times if necessary.
Should I try inserting a buffer of my own in the process? If I do so should
I convert the code from a timer in the main app, to a timer (or other) in a
separate thread?
Any ideas welcomed. :)
Thanks for a great product Monty and Co.
--- >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