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
From: Björn Stenberg (bjorn_at_haxx.se)
Date: 2002-08-13


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



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa