Skip to content

OwnAudioSharp Version 2.3.2

Choose a tag to compare

@ModernMube ModernMube released this 13 Dec 13:45
· 995 commits to master since this release

OwnAudioSharp v2.3.2 Release Notes

Date: December 13, 2025
Focus: Synchronization Stability, Multi-track Performance, and Glitch-Free Playback

🚀 Key Highlights

This release represents a major stability upgrade for the synchronization engine. It resolves critical issues with multi-track playback (tested with 22+ simultaneous tracks), eliminates drift loops, and ensures seamless tempo/pitch transitions. The architecture has been refined to strictly adhere to the "GhostTrack Master Pattern."

🛠️ Major Improvements

1. Synchronization Architecture Refinement

  • GhostTrack Master Clock Fix: Fixed a critical bug where the GhostTrack (master clock) was not advancing because it wasn't part of the active mix list. The mix loop now manually advances all active GhostTracks, ensuring the time reference moves correctly.
  • Conflict Resolution: Removed the legacy CheckAndResyncAllGroups logic from AudioMixer. Synchronization is now exclusively handled by individual FileSource instances observing the GhostTrack, eliminating conflicting correction loops.

2. "Soft Sync" Implementation

  • Non-Destructive Correction: Implemented a new "Soft Sync" mechanism in FileSource. Minor lags (drifts) are now corrected by skipping samples within the memory buffer instead of triggering a destructive Seek() operation.
  • Eliminated Sync Loops: Prevents the "Drift -> Seek -> Buffer Clear -> Silence -> Drift" loop that caused stuttering under high load.

3. Precision Timing & Tempo Logic

  • Tempo-Scaled Position Tracking: Fixed a logic error where source position was tracked using wall-clock time instead of audio-time. SamplePosition is now correctly scaled by the current Tempo factor, preventing false drift detection during speed changes.
  • Accurate Underrun Accounting: When buffer underruns occur (inserting silence), the system now correctly advances the internal position counters, ensuring the source doesn't "fall behind" simply because it was loading data.

4. Stability & Buffering

  • Buffer Size Increase: Increased default mixer buffer from 512 to 4096 frames to provide sufficient headroom for high track counts (22+) and handle OS-level IO fluctuations without dropouts.
  • Startup Protection: Enhanced Play() pre-buffering logic to wait up to 1000ms for sufficient data, preventing immediate underruns/resyncs upon starting playback.
  • Underrun Continuity: ReadSamples now returns the full requested frame count even during underruns (filling the rest with silence), preventing the engine from falsely detecting "End of Stream" and stopping playback.

5. Seamless Effect Transitions

  • SoundTouch Flushing: Fixed audio jumps/glitches when resetting Tempo/Pitch to default (1.0/0). The system now properly flushes and drains the SoundTouch internal buffers before switching back to bypass mode, ensuring no audio data is lost or skipped.

🐛 Bug Fixes

  • Fixed: Playback position stuck at 00:00 despite audio playing (GhostTrack clock fix).
  • Fixed: Audio stuttering/jumping when changing Tempo or Pitch.
  • Fixed: Playback stopping immediately upon start due to false "End of Stream".
  • Fixed: Catastrophic sync failure when playing 20+ tracks simultaneously.

📦 Upgrade Guide

No breaking API changes. This update is a drop-in replacement for v2.3.1.

dotnet add package OwnAudioSharp --version 2.3.2