dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: RE: search a string

RE: search a string

From: Linus Nielsen Feltzing <>
Date: Fri, 6 Sep 2002 20:42:36 +0200

On Fri, 6 Sep 2002 14:20:54 -0400, John Wood wrote:
> > The MP3 buffer is a ring buffer that wraps at the end. Thus, the
> > unused memory can be anywhere in that buffer, depending on where
> the
> > data was loaded the last time.
> What tells it where the buffer starts and ends? And how often can
> you tell it?

It's a ring buffer. Basically, two pointers tell where it starts and
ends. The DMA handler reads data using the mp3buf_read index, and
advances it when the data has been played. The disk reader writes
data using the mp3buf_write index. The buffer is empty when
mp3buf_read and mp3buf_write are equal.
The size of the loaded but unplayed data is thus
mp3buf_write-mp3buf_read. It's all in mpeg.c if you want to dive
deeper into it.


Linus Nielsen Feltzing, on 2002-09-06
Received on 2002-09-06

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy