diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-02-25 00:08:48 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-02-25 00:08:48 +0000 |
commit | aaf4282654277b26fa7889e9a4b36aa8080fd9e3 (patch) | |
tree | d5135ecf49dbfa508ce3daebe97d5c7a8c4a8b28 /src/player.c | |
parent | 068d307a711bbcefc6868ff97fdf931269d13b44 (diff) | |
download | mpd-aaf4282654277b26fa7889e9a4b36aa8080fd9e3.tar.gz mpd-aaf4282654277b26fa7889e9a4b36aa8080fd9e3.tar.xz mpd-aaf4282654277b26fa7889e9a4b36aa8080fd9e3.zip |
have pause take an optional arugment
git-svn-id: https://svn.musicpd.org/mpd/trunk@43 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/player.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/player.c b/src/player.c index cf09f388b..081219e2d 100644 --- a/src/player.c +++ b/src/player.c @@ -215,6 +215,23 @@ int playerPause(FILE * fp) { return 0; } +int playerSetPause(FILE * fp, int pause) { + PlayerControl * pc = &(getPlayerData()->playerControl); + + if(player_pid<=0) return 0; + + switch(pc->state) { + case PLAYER_STATE_PLAY: + if(pause) playerPause(fp); + break; + case PLAYER_STATE_PAUSE: + if(!pause) playerPause(fp); + break; + } + + return 0; +} + int getPlayerElapsedTime() { return (int)(getPlayerData()->playerControl.elapsedTime+0.5); } |