aboutsummaryrefslogtreecommitdiffstats
path: root/src/player.h
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2007-06-01 18:10:13 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2007-06-01 18:10:13 +0000
commit6d7e0eb1664d14ae3d1d229acfcccf46abf947db (patch)
treea382eb8e90af2b2cc1de8b74d85118249ab93eaf /src/player.h
parent88638f4821842f76062397559614f36b717ffdbb (diff)
downloadmpd-6d7e0eb1664d14ae3d1d229acfcccf46abf947db.tar.gz
mpd-6d7e0eb1664d14ae3d1d229acfcccf46abf947db.tar.xz
mpd-6d7e0eb1664d14ae3d1d229acfcccf46abf947db.zip
Tell the player process (and thus also the decode process) to quit when
playback is stopped completely. This means the player process will no longer have to wake up 100 times per second to see if it's been told to start playing (the main process will just spawn a new player process when it needs to). On the downside, this means an extra pair of forks() and the re-initializing of the player and decode processes each time playback is restarted. git-svn-id: https://svn.musicpd.org/mpd/trunk@6446 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/player.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/player.h b/src/player.h
index b62fab2ea..ce7eebc9b 100644
--- a/src/player.h
+++ b/src/player.h
@@ -57,6 +57,7 @@
#define PLAYER_METADATA_STATE_WRITE 2
typedef struct _PlayerControl {
+ volatile mpd_sint8 quit;
volatile mpd_sint8 stop;
volatile mpd_sint8 play;
volatile mpd_sint8 pause;
@@ -121,6 +122,8 @@ int getPlayerError(void);
int playerInit(void);
+int playerQuit(int fd);
+
int queueSong(Song * song);
int getPlayerQueueState(void);