szync v1.2 Release Notes & Fixes
🛠️ Overview of Changes in Version 1.2
Version 1.2 introduces critical bug fixes, stability improvements, memory and resource leak resolutions, and hardened buffer safety across the entire audio pipeline.
🐛 Critical Bug Fixes & Stability Improvements
-
Atomic Configuration Persistence (Windows File Overwrite Fix)
- Issue: Under Windows,
std::filesystem::renamefailed withERROR_ALREADY_EXISTSwhenever the destination configuration file already existed, causing modified device preferences, volume levels, and window coordinates to be lost on application restarts. - Fix: Switched to atomic overwrite semantics using
MoveFileExW(..., MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH)with automatic directory creation and fallback error recovery insrc/config_manager.h.
- Issue: Under Windows,
-
Eliminated
HMODULEHandle Leak on Loopback Activation- Issue: Dynamic loading of
mmdevapi.dllduring process loopback activation calledFreeLibraryonly on error paths. Successful activations and recurring re-connections leaked module references over time. - Fix: Ensured deterministic module cleanup via
FreeLibraryacross all execution branches insrc/audio_engine.cpp.
- Issue: Dynamic loading of
-
Automatic Stream Start upon Filter / Routing Updates
- Issue: When transitioning a stopped renderer (such as the default output device without filtering) to an isolated application process filter,
UpdateSourceFormatonly resumed playback if the stream was already running, leaving the stream in a perpetual stopped state. - Fix:
AudioCoordinator::EnableDevicenow automatically invokesStart()when an eligible device or filter becomes active.
- Issue: When transitioning a stopped renderer (such as the default output device without filtering) to an isolated application process filter,
-
Unified COM Multi-Threaded Apartment (MTA) Initialization
- Issue:
ComInitRAIIdefaulted toCOINIT_APARTMENTTHREADED(STA), causingRPC_E_CHANGED_MODEerrors and uninitialized COM states (CO_E_NOTINITIALIZED) when called across background threads and audio engines. - Fix: Standardized
ComInitRAIItoCOINIT_MULTITHREADED(MTA) across all routines (GetBaselineFormat,StartInternal, and capture loops).
- Issue:
-
Hardened Ring Buffer & Resampler Safety
- Issue: Zero-frame capacities or zero-channel formats could cause integer underflow (
SIZE_MAX) or modulo-by-zero division crashes inAudioRingBuffer. - Fix: Added minimum capacity thresholds (≥ 1024 frames, ≥ 1 channel) alongside comprehensive bounds and null pointer guards in all buffer, resampler, and matrix processing functions.
- Issue: Zero-frame capacities or zero-channel formats could cause integer underflow (
-
COM Endpoint Notification Callback Error Handling
- Fix: Verified return status on
RegisterEndpointNotificationCallbackinsrc/main.cpp, ensuring the instance is released immediately if registration fails.
- Fix: Verified return status on