aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.am1
-rw-r--r--src/decode.c2
-rw-r--r--src/decoder_api.c2
-rw-r--r--src/decoder_list.c1
-rw-r--r--src/main.c1
-rw-r--r--src/player.c1
-rw-r--r--src/player.h6
-rw-r--r--src/playerData.c2
-rw-r--r--src/playerData.h3
-rw-r--r--src/player_control.c21
-rw-r--r--src/player_thread.c1
11 files changed, 32 insertions, 9 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index d31783e4..28a949b4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -130,6 +130,7 @@ mpd_SOURCES = \
pcm_utils.c \
permission.c \
player.c \
+ player_control.c \
player_thread.c \
playerData.c \
playlist.c \
diff --git a/src/decode.c b/src/decode.c
index 33f01701..3362077a 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -18,8 +18,8 @@
#include "decode.h"
#include "decoder_internal.h"
+#include "player.h"
-#include "playerData.h"
#include "path.h"
#include "log.h"
#include "ls.h"
diff --git a/src/decoder_api.c b/src/decoder_api.c
index f6119aa0..4ce9ee98 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -20,11 +20,11 @@
#include "decoder_internal.h"
#include "decoder_list.h"
#include "decode.h"
+#include "player.h"
#include "audio.h"
#include "utils.h"
#include "normalize.h"
-#include "playerData.h"
#include "outputBuffer.h"
#include "gcc.h"
diff --git a/src/decoder_list.c b/src/decoder_list.c
index dd2c7973..8bbe4092 100644
--- a/src/decoder_list.c
+++ b/src/decoder_list.c
@@ -18,6 +18,7 @@
#include "decoder_list.h"
#include "decoder_api.h"
+#include "list.h"
extern struct decoder_plugin mp3Plugin;
extern struct decoder_plugin oggvorbisPlugin;
diff --git a/src/main.c b/src/main.c
index 2d9f6239..5a98b7e2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -26,6 +26,7 @@
#include "path.h"
#include "playerData.h"
#include "decode.h"
+#include "player.h"
#include "stats.h"
#include "sig_handlers.h"
#include "audio.h"
diff --git a/src/player.c b/src/player.c
index 4de92fb8..8803cdfd 100644
--- a/src/player.c
+++ b/src/player.c
@@ -20,7 +20,6 @@
#include "player_thread.h"
#include "path.h"
#include "command.h"
-#include "playerData.h"
#include "ack.h"
#include "os_compat.h"
#include "main_notify.h"
diff --git a/src/player.h b/src/player.h
index a4db82dc..a030c02d 100644
--- a/src/player.h
+++ b/src/player.h
@@ -79,7 +79,7 @@ enum player_queue_state {
#define PLAYER_QUEUE_UNLOCKED 0
#define PLAYER_QUEUE_LOCKED 1
-typedef struct _PlayerControl {
+struct player_control {
Notify notify;
volatile enum player_command command;
volatile enum player_state state;
@@ -99,7 +99,9 @@ typedef struct _PlayerControl {
volatile float crossFade;
volatile mpd_uint16 softwareVolume;
volatile double totalPlayTime;
-} PlayerControl;
+};
+
+extern struct player_control pc;
void player_command_finished(void);
diff --git a/src/playerData.c b/src/playerData.c
index d72f2fe1..308fc4b5 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -18,6 +18,7 @@
#include "playerData.h"
#include "decode.h"
+#include "player.h"
#include "outputBuffer.h"
#include "conf.h"
#include "log.h"
@@ -27,7 +28,6 @@
#define DEFAULT_BUFFER_BEFORE_PLAY 10
unsigned int buffered_before_play;
-PlayerControl pc;
void initPlayerData(void)
{
diff --git a/src/playerData.h b/src/playerData.h
index a469ffac..9d2918c8 100644
--- a/src/playerData.h
+++ b/src/playerData.h
@@ -19,10 +19,7 @@
#ifndef PLAYER_DATA_H
#define PLAYER_DATA_H
-#include "player.h"
-
extern unsigned int buffered_before_play;
-extern PlayerControl pc;
void initPlayerData(void);
diff --git a/src/player_control.c b/src/player_control.c
new file mode 100644
index 00000000..1f6aecd9
--- /dev/null
+++ b/src/player_control.c
@@ -0,0 +1,21 @@
+/* the Music Player Daemon (MPD)
+ * Copyright (C) 2008 Max Kellermann <max@duempel.org>
+ * This project's homepage is: http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "player.h"
+
+struct player_control pc;
diff --git a/src/player_thread.c b/src/player_thread.c
index ab7074ad..9cccc1ab 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -17,6 +17,7 @@
*/
#include "player_thread.h"
+#include "player.h"
#include "playerData.h"
#include "decode.h"
#include "audio.h"