summaryrefslogtreecommitdiff
path: root/src/mossrose.c
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-09-03 18:17:53 -0500
committersanine <sanine.not@pm.me>2022-09-03 18:17:53 -0500
commita416cfb6881b8ff99c29ba87c1d940d6143e44b1 (patch)
treea6fc26bed9f1efb34f19d8709569dc40d17366a2 /src/mossrose.c
parentd3ffd2e969b078a04fea2a5a5eb9cc7f26963917 (diff)
only perform atomic operations at the beginning of a callback run
Diffstat (limited to 'src/mossrose.c')
-rw-r--r--src/mossrose.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mossrose.c b/src/mossrose.c
index fb017cd..04770f5 100644
--- a/src/mossrose.c
+++ b/src/mossrose.c
@@ -21,9 +21,13 @@ 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;
+
+ for (int i=0; i<mossrose_global.n_channels; i++)
+ channel_update_shared(mossrose_global.channels + i);
for (int i=0; i<frame_count; i++) {
left = out + 2*i;