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

Rockbox mail archive

Subject: playlists


From: stuart martin <>
Date: Tue, 30 Apr 2002 20:45:07 -0000

I've checked in some initial code for playlist processing, which holds info
about the playlist in memory, including the filename of the current disk-
based playlist, an array of indices of the start positions of filenames
within that playlist file, the total indices count and an index to the
indices ;) used to identify the current track within the playlist.

Functions to maniplulate this structure include loading from disk, index
extracting and storage (dynamically allocated), randomising of the indices,
emptying of the list, and extracting the current track info from the current
index. See harness.c (of which more below) for example usage.

The track is currently just a filename string, but can be extended as needed.

Also provided is a skeleton settings structure for volume, balance, bass,
treble, etc. and some stubbed-out functions to load them from the pre-fat
storage area.

Also provided is a basic panic() routine, that should be called when we have
an unrecoverable error. This routine displays the passed-in message and then
loops forever. future impls could offer reboot options to the user etc.

I modified debug.c to provide a 'crt display' version which uses printf. If
you guys think debug is the wrong location for logging messages, lemme know.
When complete, the simulator will presumably provide this functionality. This
is controlled by a -DCRT_DISPLAY define which defaults to off.

Also provided is disk.c in which I've placed some high-level disk access
functions including loading a file into a dynamically created buffer.

In firmware/test/wavey there's a playlist test harness and a makefile for
win32 compilation (gcc under cygwin - ymmv). To build, just copy these files
to the firmware dir and run make -f Makefile.win32 Again, the simulator will
hopefully make these redundant.

Anyhow, keep what's good, and move around/throw any rubbish away.


Received on 2002-04-30

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