1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 by wavey@wavey.org
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef __PLAYLIST_H__
21 #define __PLAYLIST_H__
25 #include "applimits.h"
31 char filename
[MAX_PATH
]; /* path name of m3u playlist on disk */
32 int dirlen
; /* Length of the path to the playlist file */
33 int indices
[MAX_PLAYLIST_SIZE
]; /* array of indices */
34 int index
; /* index of *NEXT* track to play */
35 int seed
; /* random seed */
36 int amount
; /* number of tracks in the index */
37 bool in_ram
; /* True if the playlist is RAM-based */
40 extern struct playlist_info playlist
;
41 extern bool playlist_shuffle
;
43 int play_list(char *dir
, char *file
, int start_index
,
44 bool shuffled_index
, int start_offset
, int random_seed
);
45 char* playlist_next(int steps
, int* id
);
46 void randomise_playlist( unsigned int seed
);
47 void sort_playlist(bool start_current
);
48 void empty_playlist(void);
49 void add_indices_to_playlist(void);
50 void playlist_clear(void);
51 int playlist_add(char *filename
);
53 #endif /* __PLAYLIST_H__ */