sad

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

commit 5d78b0d76d470f1425c0a0053f54597794a9ea5f
parent 09e86a025fb2a2eedda985558f134b17631aeb2d
Author: sin <sin@2f30.org>
Date:   Sat, 27 Dec 2014 10:12:45 +0000

Rename some functions

Diffstat:
Mcmd.c | 10+++++-----
Mplaylist.c | 14+++++++-------
Msad.c | 2+-
Msad.h | 8++++----
4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/cmd.c b/cmd.c @@ -55,7 +55,7 @@ cmdnext(int fd, char *arg) return; } - play(getnextsong()); + playsong(getnextsong()); dprintf(fd, "OK\n"); } @@ -121,7 +121,7 @@ cmdplay(int fd, char *arg) s = cur; } - play(s); + playsong(s); } static void @@ -140,7 +140,7 @@ cmdprev(int fd, char *arg) return; } - play(getprevsong()); + playsong(getprevsong()); dprintf(fd, "OK\n"); } @@ -160,7 +160,7 @@ cmdstop(int fd, char *arg) return; } - stop(s); + stopsong(s); dprintf(fd, "OK\n"); } @@ -195,7 +195,7 @@ cmdclear(int fd, char *arg) return; } - stop(getcursong()); + stopsong(getcursong()); clearplaylist(); dprintf(fd, "OK\n"); } diff --git a/playlist.c b/playlist.c @@ -167,11 +167,11 @@ clearplaylist(void) } Song * -playnext(void) +playnextsong(void) { Song *s; - stop(playlist.cursong); + stopsong(playlist.cursong); /* default to a repeat/cycle through mode */ s = getnextsong(); s->state = PREPARE; @@ -179,11 +179,11 @@ playnext(void) } Song * -playprev(void) +playprevsong(void) { Song *s; - stop(playlist.cursong); + stopsong(playlist.cursong); /* default to a repeat/cycle through mode */ s = getprevsong(); s->state = PREPARE; @@ -191,15 +191,15 @@ playprev(void) } void -play(Song *new) +playsong(Song *new) { - stop(playlist.cursong); + stopsong(playlist.cursong); new->state = PREPARE; playlist.cursong = new; } void -stop(Song *s) +stopsong(Song *s) { if (s && s->state != NONE) { s->decoder->close(); diff --git a/sad.c b/sad.c @@ -82,7 +82,7 @@ playaudio(void) break; case PLAYING: if ((nbytes = s->decoder->decode(buf, sizeof(buf))) <= 0) { - playnext(); + playnextsong(); } else { output->play(buf, nbytes); } diff --git a/sad.h b/sad.h @@ -65,10 +65,10 @@ void putcursong(Song *); void dumpplaylist(int); void clearplaylist(void); int searchplaylist(int, const char *); -Song *playnext(void); -Song *playprev(void); -void play(Song *); -void stop(Song *); +Song *playnextsong(void); +Song *playprevsong(void); +void playsong(Song *); +void stopsong(Song *); /* wav.c */ extern Decoder wavdecoder;