Re: MP3 player that loads files into RAM

Date view Thread view Subject view Author view

From: Gerald Oskoboiny (gerald@impressive.net)
Date: Fri Apr 14 2000 - 14:21:34 PDT


On Fri, Apr 14, 2000 at 01:38:06PM -0700, Karl Anderson wrote:
> Dan Kohn <dan@dankohn.com> writes:
>
> > The issue is that if there is no power jack, the constant HD access runs
> > through my laptop battery ridiculously fast. Given that I have 128 MB of
> > RAM, it seems like the player should be able to load the full song into RAM
> > and then not spin up the HD again until it needs to load the next song. I'm
> > currently running Winamp 2.61 on W2K.
>
> You don't want me to tell you to run linux and cycle the files thru a
> ramdisk, do you? Don't the windows players have a buffer option?
> I use x11amp & mpg123 on linux, & use a 2-4K buffer to avoid warbles
> on one box with a cheap video card, but I just noticed that mpg123
> breaks at about 64K.

On a Linux box, you should be able to use the built-in filesystem
cache for this, just cat the files to /dev/null before listening
to them to prefetch them to RAM.

devo: gerald> perl -e '$x = "x" x 32000000'; # free up some RAM

devo: gerald> free
             total used free shared buffers cached
Mem: 127908 63948 63960 20900 2620 9384
-/+ buffers/cache: 51944 75964
Swap: 265032 179372 85660

devo: gerald> time cat mail/FoRK > /dev/null
0.07user 0.98system 0:05.21elapsed 20%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (4662major+15minor)pagefaults 0swaps

devo: gerald> free
             total used free shared buffers cached
Mem: 127908 83424 44484 20908 2620 28740
-/+ buffers/cache: 52064 75844
Swap: 265032 179372 85660

devo: gerald> time cat mail/FoRK > /dev/null
0.02user 0.06system 0:00.07elapsed 103%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (103major+15minor)pagefaults 0swaps

devo: gerald> du -sk mail/FoRK
18244 mail/FoRK

-- 
Gerald Oskoboiny <gerald@impressive.net>
http://impressive.net/people/gerald/


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Apr 14 2000 - 14:24:06 PDT