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: Playing a File

RE: Playing a File

From: Benjamin <mailinglists_at_samuraipanda.com>
Date: Thu, 9 Jan 2003 13:15:57 -0800

Thanks Hardeep,
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
variable)
3. Call mpeg_play(with the above offset).

Does this make sense to do it this way?

Thanks,
Ben

> 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
play_list()
> are not quite correct. If you want to play a track in a directory,
the
> arguments would be:
>
> int play_list(char *dir, // Absolute pathname of directory
(NOT
> 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
play)
> int start_offset, // file offset
> int random_seed, // 0 (only needed for shuffle play)
> int first_index, // 0 (index to first track in
playlist)
> int queue_resume, // FALSE (only needed for queue
mode)
> int queue_resume_index ) // 0 (only needed for queue
mode)

> Take a look at apps/tree.c:start_resume() to see how play_list()
is used for
> both directories and playlist files.

> -Hardeep
Received on 2003-01-09

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