Fix an error with node initialization.

This commit is contained in:
David Reid
2026-07-07 07:58:13 +10:00
parent 1cb1c1be00
commit c4bf8a8488
+2 -2
View File
@@ -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. */
}
}