Add a TODO.

This commit is contained in:
David Reid
2021-01-15 22:47:23 +10:00
parent 13e03e4169
commit 0c435ae844
+1
View File
@@ -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. */ 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. */ /* Any leftover frames need to silenced for safety. */
if (framesRead < framesToRead) { 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)); 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));