Rockbox mail archive
Subject: RE: Playing a File
From: Benjamin (mailinglists_at_samuraipanda.com)
Should I be using play_list()? This seems to be more functionality
then I need since I can provide the playlist/mp3 file. Is there
a way to bypass this and use mpeg_play() directly?
build_playlist takes a int, but I'm not sure what it is looking for.
It indicates that it is the start_index, but I'm not sure how it
all ties together.
This is the information that I am storing in the bookmark file.
1. Bookmarked file name (MP3/M3U)
2. Index (in the case of a booked mark M3U this would be a 0 based
index or 0 in the case of bookmarked MP3).
3. Offset into the MP3.
With this information, I assume the following:
1. Clear out any existing playlists with playlist_clear();
2. Call build_playlist() (again, I'm not sure what the passed in
3. Call mpeg_play(with the above offset).
Does this make sense to do it this way?
> Hi Benjamin,
> If you want to play a track in a directory, you first need to call
> apps/tree.c:build_playlist(). Secondly, your assumptions about
> are not quite correct. If you want to play a track in a directory,
> arguments would be:
> int play_list(char *dir, // Absolute pathname of directory
> the mp3 file)
> char *file, // NULL
> int start_index, // Index, in directory, of the
track > you
> want to play
> bool shuffled_index, // FALSE (only needed for shuffle
> int start_offset, // file offset
> int random_seed, // 0 (only needed for shuffle play)
> int first_index, // 0 (index to first track in
> int queue_resume, // FALSE (only needed for queue
> int queue_resume_index ) // 0 (only needed for queue
> Take a look at apps/tree.c:start_resume() to see how play_list()
is used for
> both directories and playlist files.
Page was last modified "Jan 10 2012" The Rockbox Crew