Description:-
In the generated C and C++ code, soundfile updates are not fully thread-safe yet.
Some parts still have TODOs for a safe state switch.
Because of that, in real-time audio threads, updates can sometimes cause glitches, random behavior, or occasional crashes.
Impact:-
This problem affects multiple backends, not just one.
It can make generated audio code unstable when the host is changing settings, reloading, or reconfiguring, and may lead to sync-related bugs.
Affected Locations/ Files;-
cpp_code_container.cpp
c_code_container.cpp
code_container.hh
Proposed fix:-
1=> Add a real thread-safe switch for soundfile state updates (replace TODO parts).
2=> Use the same safe approach in both C and C++ generated code.
3=> Add tests for fast/repeated updates and concurrent update cases.
4=> Make sure audio performance stays the same in normal realtime compute loops.
Description:-
In the generated C and C++ code, soundfile updates are not fully thread-safe yet.
Some parts still have TODOs for a safe state switch.
Because of that, in real-time audio threads, updates can sometimes cause glitches, random behavior, or occasional crashes.
Impact:-
This problem affects multiple backends, not just one.
It can make generated audio code unstable when the host is changing settings, reloading, or reconfiguring, and may lead to sync-related bugs.
Affected Locations/ Files;-
cpp_code_container.cpp
c_code_container.cpp
code_container.hh
Proposed fix:-
1=> Add a real thread-safe switch for soundfile state updates (replace TODO parts).
2=> Use the same safe approach in both C and C++ generated code.
3=> Add tests for fast/repeated updates and concurrent update cases.
4=> Make sure audio performance stays the same in normal realtime compute loops.