V1.0.4
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 theWebRtcApmModifierfor real-time processing within the audio graph and theNoiseSuppressorcomponent 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 viaAudioEngine.Instance.PlaybackDevicesandAudioEngine.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 passingnullfor the device you don't want to change). This allows seamless transitions between audio input and output sources.
- Use
✨ Improvements and Enhancements
- Improved Playback Speed: The
SoundPlayerBase(and derived players likeSoundPlayer,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
SwitchDevicesmethod toAudioEngineto 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
IDisposableonISoundDataProvider: TheISoundDataProviderinterface now inherits fromIDisposable, and all standard provider implementations (AssetDataProvider,ChunkedDataProvider,MicrophoneDataProvider,NetworkDataProvider,RawDataProvider,StreamDataProvider) correctly implementDispose(). This improves resource management. - Refined SIMD Processing: Improved volume/panning and mixing logic within
SoundComponentusing SIMD instructions for potentially better performance and accuracy. - Encoder/Decoder Access:
CreateEncoderandCreateDecodermethods onAudioEngine.Instanceare now public for easier access to backend-specific implementations.
🐛 Bug Fixes
- Corrected native library loading issues for
libminiaudioacross various platforms and deployment scenarios, resolvingSystem.DllNotFoundException. #1 - Fixed issues related to crackling and distorted audio playback, particularly noticeable with shorter files and specific configurations. #6
- Fixed issues in
AlgorithmicReverbModifierrelated 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
SoundComponentSIMD 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
ISoundDataProvidernow requiresIDisposableimplementation: If you have created custom implementations ofISoundDataProviderin your projects, they must now implement theIDisposableinterface and provide aDispose()method.- WebRTC APM Sample Rate Requirement: When using the new
SoundFlow.Extensions.WebRtc.Apmextension, theAudioEnginemust 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.NoiseSuppressionhas 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 dedicatedSamples/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
NativeLibraryResolverand included.targetsfiles 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