From c50b038397ae76e00735cde1d1f8c39af09be340 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Mon, 26 Dec 2016 19:29:47 +0100 Subject: [PATCH] [misc] Move STOB and BTOS macros to misc.h --- src/misc.h | 5 +++++ src/outputs/alsa.c | 1 + src/outputs/fifo.c | 1 + 3 files changed, 7 insertions(+) diff --git a/src/misc.h b/src/misc.h index 2a3172b5..c358dde9 100644 --- a/src/misc.h +++ b/src/misc.h @@ -10,6 +10,11 @@ #include #include +/* Samples to bytes, bytes to samples */ +#define STOB(s) ((s) * 4) +#define BTOS(b) ((b) / 4) + + struct onekeyval { char *name; char *value; diff --git a/src/outputs/alsa.c b/src/outputs/alsa.c index 9e54c158..20a902c4 100644 --- a/src/outputs/alsa.c +++ b/src/outputs/alsa.c @@ -32,6 +32,7 @@ #include #include +#include "misc.h" #include "conffile.h" #include "logger.h" #include "player.h" diff --git a/src/outputs/fifo.c b/src/outputs/fifo.c index 9199d276..dd44ceb8 100644 --- a/src/outputs/fifo.c +++ b/src/outputs/fifo.c @@ -33,6 +33,7 @@ #include +#include "misc.h" #include "conffile.h" #include "logger.h" #include "player.h"