Skip to content

V1.0.4

Choose a tag to compare

@LSXPrime LSXPrime released this 17 May 15:08
· 21 commits to master since this release

SoundFlow 1.0.4 Release Notes

I am excited to announce the release of SoundFlow 1.0.4! This release introduces a major new extension for advanced audio processing and includes several significant improvements and fixes across the core library and its backend.

⭐ New Features

  • WebRTC Audio Processing Module (APM) Extension:
    A brand new extension package, SoundFlow.Extensions.WebRtc.Apm, is now available. This integrates the high-quality WebRTC Audio Processing Module into SoundFlow, providing advanced real-time and offline audio processing capabilities:

    • Acoustic Echo Cancellation (AEC)
    • Noise Suppression (NS)
    • Automatic Gain Control (AGC - v1 & v2)
    • High Pass Filter (HPF)
    • Pre-Amplifier
      This extension includes the WebRtcApmModifier for real-time processing within the audio graph and the NoiseSuppressor component for convenient offline/batch audio file cleanup. Native binaries for Windows (x86, x64, arm64), macOS (x64, arm64), Linux (arm, arm64, x64), Android (x64, arm64), and iOS (arm64) are included.
  • Comprehensive Audio Device Enumeration: You can now reliably enumerate all available playback and capture audio devices on the system using AudioEngine.Instance.UpdateDevicesInfo(). Access the lists via AudioEngine.Instance.PlaybackDevices and AudioEngine.Instance.CaptureDevices. This provides detailed information about each device, including its name, ID, and whether it's the system default.

  • Flexible Audio Device Switching: Switching the audio engine's active playback and/or capture device is now fully supported.

    • Use AudioEngine.Instance.SwitchDevice(deviceInfo, DeviceType.Playback/Capture) to switch a single device type.
    • Use the new AudioEngine.Instance.SwitchDevices(playbackDeviceInfo, captureDeviceInfo) method to switch both playback and capture devices simultaneously or independently (by passing null for the device you don't want to change). This allows seamless transitions between audio input and output sources.

✨ Improvements and Enhancements

  • Improved Playback Speed: The SoundPlayerBase (and derived players like SoundPlayer, SurroundPlayer) now uses proper linear interpolation for playback speed adjustments, providing significantly smoother audio when changing speed and fixing the audio distortions. This refactoring also includes more robust seeking and looping logic.
  • Enhanced Audio Device Management: Added a new SwitchDevices method to AudioEngine to allow switching both playback and capture devices simultaneously.
  • MiniAudio Backend Optimizations: Updated the native MiniAudio wrapper (miniaudio.dll, libminiaudio.so, libminiaudio.dylib) with low-latency performance profile and shared capture mode (on Windows WASAPI) for potentially better real-time audio performance and compatibility.
  • Unified IDisposable on ISoundDataProvider: The ISoundDataProvider interface now inherits from IDisposable, and all standard provider implementations (AssetDataProvider, ChunkedDataProvider, MicrophoneDataProvider, NetworkDataProvider, RawDataProvider, StreamDataProvider) correctly implement Dispose(). This improves resource management.
  • Refined SIMD Processing: Improved volume/panning and mixing logic within SoundComponent using SIMD instructions for potentially better performance and accuracy.
  • Encoder/Decoder Access: CreateEncoder and CreateDecoder methods on AudioEngine.Instance are now public for easier access to backend-specific implementations.

🐛 Bug Fixes

  • Corrected native library loading issues for libminiaudio across various platforms and deployment scenarios, resolving System.DllNotFoundException. #1
  • Fixed issues related to crackling and distorted audio playback, particularly noticeable with shorter files and specific configurations. #6
  • Fixed issues in AlgorithmicReverbModifier related to parameter clamping, filter reinitialization, and LFO phase handling. #20
  • Fixed issue where adjusting volume could lead to incorrect panning, resulting in audio playing only on one channel. #31
  • Addressed potential issues in SoundComponent SIMD operations related to buffer handling and remainders.
  • Corrected device enumeration logic in the MiniAudio backend for cases where no devices are found.
  • Ensured loop points are clamped to valid sample boundaries within the data provider length.

⚠️ Breaking Changes

  • ISoundDataProvider now requires IDisposable implementation: If you have created custom implementations of ISoundDataProvider in your projects, they must now implement the IDisposable interface and provide a Dispose() method.
  • WebRTC APM Sample Rate Requirement: When using the new SoundFlow.Extensions.WebRtc.Apm extension, the AudioEngine must be initialized with one of the supported sample rates (8000, 16000, 32000, or 48000 Hz). Using other sample rates with the APM modifier/component will result in an error.

📚 Sample and Documentation Updates

  • Documentation Updated: The official documentation site at SoundFlow Docs has been updated to reflect all changes and new features introduced in this release.
  • New 'Noise Suppression' Sample: A new sample project SoundFlow.Samples.NoiseSuppression has been added, demonstrating how to use the WebRTC APM for both real-time microphone processing and offline audio file cleanup.
  • Sample Projects Reorganized: All sample projects (SimplePlayer, SwitchDevices, NoiseSuppression) have been moved into a dedicated Samples/ directory at the repository root for better organization.
  • Licensing Clarification: The README for the WebRTC APM extension clarifies the licensing requirements for both the C# wrapper (MIT) and the underlying native library (BSD 3-Clause).

⚙️ Internal / Build Updates

  • Updated CMake build scripts for the native MiniAudio wrapper to improve platform targeting and native library output naming conventions.
  • Implemented a more robust NativeLibraryResolver and included .targets files to ensure correct loading and packaging of native libraries for all supported runtimes within the NuGet package.

New Contributors

Full Changelog: V1.0.3...V1.0.4