summaryrefslogtreecommitdiff
path: root/apps/playlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist.h')
-rw-r--r--apps/playlist.h61
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
26typedef 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
35void play_list(char *dir, char *file);
36
37void read_entire_file( char *buf, const char *filename );
38void load_playlist( playlist_info_t *playlist, const char *filename );
39void extract_playlist_indices( char *buf, playlist_info_t *playlist );
40void display_current_playlist( playlist_info_t *playlist );
41void get_indices_as_string( char *string, playlist_info_t *playlist );
42void empty_playlist( playlist_info_t *playlist );
43void add_indices_to_playlist( playlist_info_t *playlist );
44void extend_indices( playlist_info_t *playlist, int new_index );
45void randomise_playlist( playlist_info_t *playlist, unsigned int seed );
46int is_unused_random_in_list( int number, int *original_list, int count );
47
48/**********/
49
50
51
52
53
54
55int create_playlist( void );
56/*int add_to_playlist( track_t *track );*/
57int remove_from_playlist( int index );
58int set_playlist_position( void );
59/*track_t * get_previous_entry_in_playlist( void );*/
60
61#endif /* __PLAYLIST_H__ */