diff options
Diffstat (limited to 'apps/playlist.h')
-rw-r--r-- | apps/playlist.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/apps/playlist.h b/apps/playlist.h new file mode 100644 index 0000000000..2271403920 --- /dev/null +++ b/apps/playlist.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by wavey@wavey.org | ||
11 | * | ||
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. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #ifndef __PLAYLIST_H__ | ||
21 | #define __PLAYLIST_H__ | ||
22 | |||
23 | /* playlist data */ | ||
24 | |||
25 | #define MAX_PLAYLIST_SIZE 1000 | ||
26 | typedef struct | ||
27 | { | ||
28 | char filename[256]; /* path name of m3u playlist on disk */ | ||
29 | int indices[MAX_PLAYLIST_SIZE]; /* array of indices */ | ||
30 | int index; /* index of *NEXT* track to play */ | ||
31 | int seed; /* random seed */ | ||
32 | int amount; /* number of tracks in the index */ | ||
33 | } playlist_info_t; | ||
34 | |||
35 | void play_list(char *dir, char *file); | ||
36 | |||
37 | void read_entire_file( char *buf, const char *filename ); | ||
38 | void load_playlist( playlist_info_t *playlist, const char *filename ); | ||
39 | void extract_playlist_indices( char *buf, playlist_info_t *playlist ); | ||
40 | void display_current_playlist( playlist_info_t *playlist ); | ||
41 | void get_indices_as_string( char *string, playlist_info_t *playlist ); | ||
42 | void empty_playlist( playlist_info_t *playlist ); | ||
43 | void add_indices_to_playlist( playlist_info_t *playlist ); | ||
44 | void extend_indices( playlist_info_t *playlist, int new_index ); | ||
45 | void randomise_playlist( playlist_info_t *playlist, unsigned int seed ); | ||
46 | int is_unused_random_in_list( int number, int *original_list, int count ); | ||
47 | |||
48 | /**********/ | ||
49 | |||
50 | |||
51 | |||
52 | |||
53 | |||
54 | |||
55 | int create_playlist( void ); | ||
56 | /*int add_to_playlist( track_t *track );*/ | ||
57 | int remove_from_playlist( int index ); | ||
58 | int set_playlist_position( void ); | ||
59 | /*track_t * get_previous_entry_in_playlist( void );*/ | ||
60 | |||
61 | #endif /* __PLAYLIST_H__ */ | ||