From 0c435ae8447cc8f1df5634904674ff8698d67dbc Mon Sep 17 00:00:00 2001 From: David Reid Date: Fri, 15 Jan 2021 22:47:23 +1000 Subject: [PATCH] Add a TODO. --- research/miniaudio_engine.h | 1 + 1 file changed, 1 insertion(+) diff --git a/research/miniaudio_engine.h b/research/miniaudio_engine.h index 2d5ac9e2..97db4f8b 100644 --- a/research/miniaudio_engine.h +++ b/research/miniaudio_engine.h @@ -3446,6 +3446,7 @@ static ma_result ma_node_read_pcm_frames(ma_node* pNode, ma_uint32 outputBusInde framesRead = 0; /* Just for safety, but I don't think it's really needed. */ } + /* TODO: Minor optimization opportunity here. If no frames were read and the buffer is already filled with silence, no need to re-silence it. */ /* Any leftover frames need to silenced for safety. */ if (framesRead < framesToRead) { ma_silence_pcm_frames(ppFramesIn[iInputBus] + (framesRead * ma_node_get_input_channels(pNodeBase, iInputBus)), (framesToRead - framesRead), ma_format_f32, ma_node_get_input_channels(pNodeBase, iInputBus));