Main: move global variables to struct Instance

More preparations for multi-player support.
This commit is contained in:
Max Kellermann
2013-04-17 22:58:33 +02:00
parent 08dfd263ba
commit b2d3d15e97
12 changed files with 149 additions and 38 deletions

View File

@@ -23,19 +23,24 @@
#include "Playlist.hxx"
#include "PlayerControl.hxx"
struct Instance;
/**
* A partition of the Music Player Daemon. It is a separate unit with
* a playlist, a player, outputs etc.
*/
struct Partition {
Instance &instance;
struct playlist playlist;
player_control pc;
Partition(unsigned max_length,
Partition(Instance &_instance,
unsigned max_length,
unsigned buffer_chunks,
unsigned buffered_before_play)
:playlist(max_length),
:instance(_instance), playlist(max_length),
pc(buffer_chunks, buffered_before_play) {
}