From c4bf8a8488b89bdb28267ddae3aaf24708755fd2 Mon Sep 17 00:00:00 2001 From: David Reid Date: Tue, 7 Jul 2026 07:58:13 +1000 Subject: [PATCH] Fix an error with node initialization. --- miniaudio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index b6b68790..2f38f5b0 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -74574,11 +74574,11 @@ static ma_result ma_node_translate_bus_counts(const ma_node_config* pConfig, ma_ /* Some special rules for passthrough nodes. */ if ((pConfig->vtable->flags & MA_NODE_FLAG_PASSTHROUGH) != 0) { - if ((pConfig->vtable->inputBusCount != 0 && pConfig->vtable->inputBusCount != 1) || pConfig->vtable->outputBusCount != 1) { + if ((inputBusCount != 0 && inputBusCount != 1) || outputBusCount != 1) { return MA_INVALID_ARGS; /* Passthrough nodes must have exactly 1 output bus and either 0 or 1 input bus. */ } - if (pConfig->pInputChannels[0] != pConfig->pOutputChannels[0]) { + if (inputBusCount > 0 && pConfig->pInputChannels[0] != pConfig->pOutputChannels[0]) { return MA_INVALID_ARGS; /* Passthrough nodes must have the same number of channels between input and output nodes. */ } }