From aa1b43e8fa2774d58401a7c15349f269e25bc2e4 Mon Sep 17 00:00:00 2001 From: TheM14 Date: Thu, 29 Oct 2026 01:42:58 +0800 Subject: [PATCH] Default the nine DBMD configuration trims to automatic --- src/adm_atmos.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/adm_atmos.py b/src/adm_atmos.py index f343310..a9bbb0d 100644 --- a/src/adm_atmos.py +++ b/src/adm_atmos.py @@ -225,6 +225,12 @@ def build_dbmd(object_count=25, joc_binaural_mode=4): # sync (4), count (2), reserved (1), nine 15-byte config trims, # then one trim-bypass byte per track before the headphone modes. # Preserve the existing template's bed fields and trailing bytes. + # The nine configuration trims start at byte 7; the first byte of each + # carries the auto-trim flag in bit 0 (1 = automatic, 0 = manual). The + # default is automatic, so a freshly rendered master opens with automatic + # trims in the renderer. + for layout in range(9): + ob[7 + 15 * layout] |= 1 object_modes = 4 + 2 + 1 + 9 * 15 + object_count for i in range(10, min(object_count, 10 + N_OBJ)): ob[object_modes + i] = (ob[object_modes + i] & 0xF8) | mode