From 72bc5bc043c1c4fee25ca89edba486bdd19118b1 Mon Sep 17 00:00:00 2001 From: David Reid Date: Thu, 7 Jan 2021 20:44:38 +1000 Subject: [PATCH] Update ma_node_output_bus_set_volume() to allow amplification. --- research/miniaudio_engine.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/research/miniaudio_engine.h b/research/miniaudio_engine.h index 87e2a9d1..ca49a7cd 100644 --- a/research/miniaudio_engine.h +++ b/research/miniaudio_engine.h @@ -2787,9 +2787,8 @@ static ma_result ma_node_output_bus_set_volume(ma_node_output_bus* pOutputBus, f { MA_ASSERT(pOutputBus != NULL); - /* Returning an error if outside the 0..1 range for consistency with how it's handled with ma_device_set_master_volume(). */ - if (volume < 0.0f || volume > 1.0f) { - return MA_INVALID_ARGS; + if (volume < 0.0f) { + volume = 0.0f; } c89atomic_exchange_f32(&pOutputBus->volume, volume);