sad

simple audio daemon
git clone git://git.2f30.org/sad
Log | Files | Refs | LICENSE

commit 3a3a731a2ae835b6fce1d35b19bb15eb4a1c98dc
parent 0e191768e5eee0a767b4de6be3cf5991a5014204
Author: dcat <dcat@iotek.org>
Date:   Thu, 15 Jan 2015 00:17:02 +0100

"%s: %s\n", statevar, infomsg

Diffstat:
Mcmd.c | 10++++++----
Mplaylist.c | 3++-
2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/cmd.c b/cmd.c @@ -25,13 +25,13 @@ cmdstatus(int fd, char *arg) if (!strncmp(arg, "random", 7)) { ok = 1; - dprintf(fd, "%d\n", getplaylistmode() & RANDOM == 1); + dprintf(fd, "random: %d\n", getplaylistmode() & RANDOM == 1); } else if (!strncmp(arg, "repeat", 7)) { ok = 1; - dprintf(fd, "%d\n", getplaylistmode() & REPEAT == 1); + dprintf(fd, "repeat: %d\n", getplaylistmode() & REPEAT == 1); } else if (!strncmp(arg, "single", 7)) { ok = 1; - dprintf(fd, "%d\n", getplaylistmode() & SINGLE == 1); + dprintf(fd, "single: %d\n", getplaylistmode() & SINGLE == 1); } else if (!strncmp(arg, "songid", 7)) { ok = 1; s = getcursong(); @@ -41,11 +41,13 @@ cmdstatus(int fd, char *arg) return; } - dprintf(fd, "%d\n", s->id); + dprintf(fd, "songid: %d\n", s->id); } else if (!strncmp(arg, "playback", 9)) { ok = 1; s = getcursong(); + dprintf(fd, "playback: "); + if (s) switch (s->state) { case PLAYING: diff --git a/playlist.c b/playlist.c @@ -223,7 +223,8 @@ playlistmode(int mode) playlist.mode = mode; } -int getplaylistmode(void) +int +getplaylistmode(void) { return playlist.mode; }