From bde3e4f1bb7b8f8abca0884a7d994ee1c17a66b1 Mon Sep 17 00:00:00 2001 From: sanine Date: Fri, 26 Aug 2022 12:42:30 -0500 Subject: refactor: move mossrose.h to include/ dir --- src/mossrose.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/mossrose.c') diff --git a/src/mossrose.c b/src/mossrose.c index 02f063a..4f31711 100644 --- a/src/mossrose.c +++ b/src/mossrose.c @@ -1,9 +1,9 @@ #include #include #include -#include "mossrose.h" -#include "mossrose-mutex.h" -#include "mossrose-channel.h" +#include +#include "mutex.h" +#include "channel.h" /* ~~~~~~~~~~~~~~~~ type definitions ~~~~~~~~~~~~~~~~ */ @@ -124,15 +124,18 @@ int mossrose_init(double sample_rate, int n_channels) int mossrose_play(float *left, float *right, size_t len, int channel) { if (channel > 0) { - return mossrose_channel_set(mossrose_global.channels+channel, left, right, len, 1); + if (mossrose_channel_set(mossrose_global.channels+channel, left, right, len, 1) == 0) + return channel; + else + return -1; } else { struct mossrose_channel_t *chan; for (int i=0; i