stored_playlist: moved configuration variables from playlist.c

Don't declare and export variables specific to stored playlists in
playlist.c/playlist.h.
This commit is contained in:
Max Kellermann
2009-01-25 13:53:16 +01:00
parent 85f7e964de
commit 1a59afa388
7 changed files with 32 additions and 19 deletions

View File

@@ -67,17 +67,11 @@
#define PLAYLIST_HASH_MULT 4
#define DEFAULT_PLAYLIST_MAX_LENGTH (1024*16)
#define DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS false
/** random number generator fur shuffling */
static GRand *g_rand;
/** the global playlist object */
static struct playlist playlist;
unsigned playlist_max_length;
bool playlist_saveAbsolutePaths = DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS;
static void playPlaylistOrderNumber(int orderNum);
@@ -110,18 +104,13 @@ void initPlaylist(void)
{
g_rand = g_rand_new();
playlist_max_length = config_get_positive(CONF_MAX_PLAYLIST_LENGTH,
DEFAULT_PLAYLIST_MAX_LENGTH);
queue_init(&playlist.queue, playlist_max_length);
queue_init(&playlist.queue,
config_get_positive(CONF_MAX_PLAYLIST_LENGTH,
DEFAULT_PLAYLIST_MAX_LENGTH));
playlist.queued = -1;
playlist.current = -1;
playlist_saveAbsolutePaths =
config_get_bool(CONF_SAVE_ABSOLUTE_PATHS,
DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS);
event_pipe_register(PIPE_EVENT_TAG, playlist_tag_event);
}