summaryrefslogtreecommitdiff
path: root/src/mossrose.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mossrose.c')
-rw-r--r--src/mossrose.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mossrose.c b/src/mossrose.c
index 04770f5..cd1b98d 100644
--- a/src/mossrose.c
+++ b/src/mossrose.c
@@ -21,7 +21,6 @@ static int callback(
PaStreamCallbackFlags status_flags,
void *user_data)
{
- printf("frame count: %d\n", frame_count);
float *out = output;
float *left, *right;
float l, r;
@@ -88,11 +87,11 @@ int mossrose_init(double sample_rate, int n_channels, bool init_plibsys)
};
-int mossrose_play(struct mossrose_sound_t *sound, int channel)
+int mossrose_play(struct mossrose_sound_t *sound, int channel, int loops)
{
if (channel >= 0) {
/* play on specified channel */
- if (channel_sound_load(mossrose_global.channels + channel, sound, true) == 0)
+ if (channel_sound_load(mossrose_global.channels + channel, sound, true, loops) == 0)
return channel;
else
return -1;
@@ -101,7 +100,7 @@ int mossrose_play(struct mossrose_sound_t *sound, int channel)
/* play on first available channel */
for (int i=0; i<mossrose_global.n_channels; i++) {
struct channel_t *chan = mossrose_global.channels + i;
- if (channel_sound_load(chan, sound, false) == 0) return i;
+ if (channel_sound_load(chan, sound, false, loops) == 0) return i;
}
return -1;
}