Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: HDD read ahead cache

Re: HDD read ahead cache

From: Björn Stenberg <bjorn_at_haxx.se>
Date: Tue, 13 Aug 2002 11:35:36 +0200

Uwe Freese wrote:
> I changed drivers/fat.c in a really silly way, but it should read
> twice the amount that the user requested every 2nd read.

It's not that simple. The call chain is: mpeg_thread() -> read() -> fat_read(). For each call to read(), there may be more than one call to fat_read(). And mpeg_thread() may call read() more than once (when the buffer wraps, for example).

You must change in mpeg_thread() to get a meaningful test. And, even then, the preloaded cache will be trashed when we load a new file (searching through the dir entries, loading id3 info etc).

Probably the easier way to test it is to make a more isolated test case that is not part of the mp3 playing process. Then we'll know if the cache is usable, and can start thinking about how to integrate it in the more complex mp3 playing environment.

-- 
Björn
Received on 2002-08-13

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