Fix COMPILE_VSTI guard scope: always read gm.dls into lpGMDLSBuffer#11
Draft
Copilot wants to merge 5 commits into
Draft
Fix COMPILE_VSTI guard scope: always read gm.dls into lpGMDLSBuffer#11Copilot wants to merge 5 commits into
Copilot wants to merge 5 commits into
Conversation
…unk walker
- Add GMDLS_LoopInfo and GMDLS_EnvInfo structs to SynthNode.h with
per-wave loop (loopStart/loopEnd/loopType/sourcePriority) and
optional volume-envelope (attack/decay/sustain/release/validMask)
- Define GMDLS_LoopData[512] and GMDLS_EnvData[512] in SynthNode.cpp
- Replace naive byte-scan-for-'data' in Synth.cpp with a bounded
two-pass RIFF/DLS chunk walker:
Pass 1 LIST('wvpl'): loads PCM samples + wave-level wsmp loops,
clamping loop bounds after upsampling and rejecting invalid loops
Pass 2 LIST('lins'): applies region-level wsmp loops (higher
priority) and art1/art2 EG1 connection blocks (attack/decay/
sustain/release in timecents and hundredths-of-percent units)
- Guard file open with INVALID_HANDLE_VALUE check (defensive fix)
- All existing GMDLS_tick runtime behaviour is unchanged; new metadata
is available for future consumption by sampler defaults or the UI
Copilot
AI
changed the title
feat: extract GM.DLS loop points and EG1 envelope via bounded RIFF chunk walker
feat: replace GM.DLS byte-scan with bounded RIFF chunk walker + extract loop/envelope metadata
Jun 8, 2026
Copilot created this pull request from a session on behalf of
gopher-atz
June 8, 2026 12:18
View session
…SynthNode.h and SynthNode.cpp
Copilot
AI
changed the title
feat: replace GM.DLS byte-scan with bounded RIFF chunk walker + extract loop/envelope metadata
Guard GMDLS extraction code and math include behind COMPILE_VSTI
Jun 8, 2026
Copilot
AI
changed the title
Guard GMDLS extraction code and math include behind COMPILE_VSTI
Fix COMPILE_VSTI guard scope: always read gm.dls into lpGMDLSBuffer
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
#ifdef COMPILE_VSTIguard at line 263 was incorrectly wrapping the entire file-open andReadFileblock, preventinglpGMDLSBufferfrom being populated in non-VSTi builds. Only the new RIFF parsing logic should be conditional onCOMPILE_VSTI.Changes
#ifdef COMPILE_VSTIfrom before theCreateFileA/ReadFile/CloseHandleblock — file reading now occurs under#ifdef _WIN32/#ifndef GMDLS_SKIPonly#ifdef COMPILE_VSTIto guard only the new DLS RIFF parsing logic (thedo { … } while(0)block) that follows the file read