diff --git a/fluidsynth/src/rvoice/fluid_rvoice_event.c b/fluidsynth/src/rvoice/fluid_rvoice_event.c index ee4867f8..51d5a80f 100644 --- a/fluidsynth/src/rvoice/fluid_rvoice_event.c +++ b/fluidsynth/src/rvoice/fluid_rvoice_event.c @@ -188,7 +188,7 @@ static int fluid_rvoice_eventhandler_push_LOCAL(fluid_rvoice_eventhandler_t* han event = fluid_ringbuffer_get_inptr(handler->queue, old_queue_stored); if (event == NULL) { - fluid_atomic_int_dec_and_test(&handler->queue_stored); + fluid_atomic_int_add(&handler->queue_stored, -1); FLUID_LOG(FLUID_WARN, "Ringbuffer full, try increasing polyphony!"); return FLUID_FAILED; // Buffer full... }