fix: add channel_count to make_audio_flow_def

MXL reads channel_count (plain integer) to determine grain buffer
geometry, defaulting to 1 if absent. The NMOS IS-04 channels array
is ignored by MXL. Without channel_count, stereo audio grains were
half the required size.

Also: MXL only accepts bit_depth 32 or 64 for audio flows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
JohannesItten
2026-07-01 12:51:13 +03:00
parent fe3b5969ca
commit 72a554a172
+3 -2
View File
@@ -63,8 +63,9 @@ inline std::string make_audio_flow_def(
{"parents", json::array()},
{"grain_rate", {{"numerator", grain_rate_num}, {"denominator", grain_rate_den}}},
{"sample_rate", {{"numerator", sample_rate}, {"denominator", 1}}},
{"channels", ch_arr},
{"bit_depth", bit_depth},
{"channels", ch_arr}, // NMOS IS-04 metadata (ignored by MXL)
{"channel_count", channels}, // MXL uses this for grain buffer geometry
{"bit_depth", bit_depth}, // must be 32 or 64
{"tags", {
{"urn:x-nmos:tag:grouphint/v1.0", json::array({label + ":Audio"})}
}},