From 72a554a17202b93f09bc2b3046bbddc2da01c0cd Mon Sep 17 00:00:00 2001 From: JohannesItten Date: Wed, 1 Jul 2026 12:51:13 +0300 Subject: [PATCH] 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 --- shared/FlowDef.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shared/FlowDef.hpp b/shared/FlowDef.hpp index ffd7a1f..cf42119 100644 --- a/shared/FlowDef.hpp +++ b/shared/FlowDef.hpp @@ -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"})} }},