Skip to content

Tags: LSXPrime/SoundFlow

Tags

v1.4.1

Toggle v1.4.1's commit message
Release version v1.4.1

v1.4.0

Toggle v1.4.0's commit message
Release version v1.4.0

v1.3.0

Toggle v1.3.0's commit message
feat: Implement FFmpeg codecs, MIDI, Metadata, and Synthesis engine (#97

)

This major update introduces pluggable codecs, full MIDI support, a
synthesis engine, and robust metadata handling.

Codecs:
- Create `SoundFlow.Codecs.FFMpeg` wrapping native FFmpeg libraries.
- Implement `ICodecFactory` architecture in `AudioEngine` to support
  dynamic codec registration.
- Add support for decoding/encoding MP3, AAC, OGG, FLAC, and ALAC,
   as well as codecs like AC3, Opus, and PCM, and more using FFmpeg.

MIDI & Synthesis:
- Create `SoundFlow.Midi.PortMidi` for cross-platform MIDI I/O.
- Implement `MidiManager`, `MidiTrack`, `MidiSegment`, and a routing
  graph for MIDI signals.
- Add `Synthesizer` component with polyphonic `Voice` architecture.
- Implement SoundFont 2 (.sf2) parsing and playback via `SoundFontBank`.
- Add MPE (MIDI Polyphonic Expression) support.
- Add `ArpeggiatorModifier`, `Sequencer`, and `MidiRecorder`.

Metadata:
- Implement `SoundMetadataReader` and `SoundMetadataWriter`.
- Add support for reading/writing ID3v2, Vorbis Comments, RIFF chunks,
  and MP4/M4A atoms.
- Refactor `AssetDataProvider` and `StreamDataProvider` to auto-detect
  formats via metadata headers.

Core & Utils:
- Add `ChannelMixer` with SIMD (AVX/SSE) acceleration.
- Add centralized `Log` utility.
- Add `[ControllableParameter]` attribute for real-time MIDI mapping
  system (`MidiMappingManager`).
- Update `CompositionProjectManager` to persist MIDI tracks, mappings,
  and tempo maps.
- Add error handling to miniaudio audio-thread callbacks and logging,
  to prevent crashes.

Native:
- Restructure `Native` directory into isolated backend projects.
- Add CMake build scripts for `ffmpeg-codec` and `portmidi`.
- Add .targets files for correct native binary distribution in NuGet.

V1.2.1

Toggle V1.2.1's commit message
feat(network): implement buffered stream for networked playback

Improves reliability of network audio playback by introducing a
buffering layer. This prevents network stutters from directly
impacting the audio thread, avoiding crashes or failures.

- Adds `BufferedNetworkStream`, a thread-safe circular buffer that
  downloads and caches audio data in a background task.
- Updates `DirectStreamProvider` to use `BufferedNetworkStream` for
  large or chunked network sources.
- Optimizes `MiniAudioEngine` device enumeration to reduce memory
  allocations by reusing the device info array on refresh.
- Adds `ReadIntoArray` extension to efficiently marshal native data
  into pre-allocated managed arrays, reducing GC pressure.

V1.2.0

Toggle V1.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
refactor(core): overhaul audio engine and device architecture (#72)

This commit introduces a major architectural refactoring to move away from a singleton-based (`AudioEngine.Instance`) model to a device-centric, instance-based architecture. This fundamental change enables true multi-device input and output, allowing applications to manage and switch between multiple playback and capture devices simultaneously and independently.

This refactor also includes several new features, performance improvements, and critical bug fixes that are built upon the new architecture.

### Key Changes & Features

- **Multi-Device Architecture**: The global `AudioEngine.Instance` and `Mixer.Master` have been removed. The new design introduces `AudioPlaybackDevice`, `AudioCaptureDevice`, and `FullDuplexDevice` abstractions, each managing its own audio graph and `MasterMixer`.
- **Explicit Context**: Core components now receive `AudioEngine` and `AudioFormat` context via their constructors, removing implicit dependencies on global state.
- **Device Switching API**: A new, robust `Engine.SwitchDevice()` API allows for seamless hot-swapping of active audio devices while preserving their state (e.g., attached components or event subscribers).
- **New `VoiceIsolationEffect`**: Adds an experimental modifier that acts as a band-pass filter to help isolate human speech frequencies.
- **New `MultiEngines` Sample**: A new sample project is included to demonstrate and test the new multi-device capabilities.

### Fixes & Performance Improvements

- **fix(network)**: Refactored `NetworkDataProvider` to use a chunked streaming and decoding model, resolving excessive memory usage. Memory consumption for a 15-minute audio file is reduced from ~1GB to ~20MB.
- **fix(recording)**: Corrects a critical audio format conversion bug that produced garbled audio when recording to formats other than F32.
- **refactor(native)**: Unified the FFT implementations in `MathHelper` for Scalar, SSE, and AVX paths to ensure consistent behavior. The SIMD paths are now toggleable via static properties for easier debugging.
- **refactor(interop)**: The native device configuration layer now uses a comprehensive DTO, allowing for more granular control over backend-specific settings (WASAPI, ALSA, etc.).

BREAKING CHANGE: This is a fundamental architectural change that affects the entire public API.

- `AudioEngine.Instance` is removed. An `AudioEngine` must now be instantiated (e.g., `new MiniAudioEngine()`).
- Audio is no longer played by adding components to `Mixer.Master`. Users must first initialize a device (e.g., `engine.InitializePlaybackDevice(...)`) and then add components to the device's `MasterMixer`.
- Constructors for nearly all `SoundComponent`, `ISoundDataProvider`, `SoundModifier`, and `AudioAnalyzer` derivatives have changed. They now require an `AudioEngine` and/or `AudioFormat` instance to be passed in.
- The global `AudioEngine.OnAudioProcessed` event is removed. Events for processed audio are now available on a per-device basis (e.g., `AudioCaptureDevice.OnAudioProcessed`).
- The previous `SwitchDevice` API is replaced with new, more explicit methods on the `AudioEngine` instance that return a new device object.

V1.1.2

Toggle V1.1.2's commit message
fix(core): Address memory consumption and enhance FFT reliability

- Refactored NetworkDataProvider to use a chunked streaming and decoding model, resolving excessive memory usage. Memory consumption for a 15-minute audio file is reduced from ~1GB to ~20MB.
- Unified the FFT implementations in MathHelper for Scalar, SSE, and AVX paths to ensure consistent behavior. The SIMD paths are now toggleable via static properties for easier debugging.
- Enhanced accuracy of FFT operations through improved window function generation, cosine approximations, and proper IFFT scaling.
- Optimized core FFT operations including bit reversal and complex multiplication for improved performance.

V1.1.1

Toggle V1.1.1's commit message
fix: Stabilize audio playback, streaming, and native library loading

- Resolves `ArgumentOutOfRangeException` during frequent seeks by refining time-stretcher buffer management.
- Optimizes 1.0x playback by directly reading data, bypassing time-stretching.
- Corrects mono panning volume calculation using constant power.
- Enhances network stream reliability by preventing premature stops and adding read timeouts.
- Improves native library loading robustness across all platforms.
- Adds audio sample clamping to prevent clipping.

V1.1.0

Toggle V1.1.0's commit message
feat: update version to 1.1.0 and improve documentation

- Bump package version from 1.0.4 to 1.1.0 in SoundFlow.csproj
- Update README.md with enhanced feature descriptions:
  * Add details about non-destructive audio editing features
  * Improve cross-platform compatibility description
  * Add documentation for Composition and Track components
  * Clean up formatting and improve clarity

V1.0.4

Toggle V1.0.4's commit message
refactor: Rework core playback, backend, and add APM extension

Implement fractional sample rate playback, improve device handling,
add the WebRTC Audio Processing Module (APM) as an extension.

This commit introduces significant changes across multiple areas:

- Core Engine Playback (`SoundPlayerBase`):
  - Reworked audio generation logic to use fractional sample position.
  - Implemented robust linear interpolation for flexible playback speed.
  - Improved buffering and seek handling for better audio continuity, accuracy and fix distortions.
  - Made `CreateEncoder` and `CreateDecoder` public on `AudioEngine`.

- MiniAudio Backend (`MiniAudioEngine`, `Native`):
  - Refactored device initialization and switching to handle both playback and capture devices simultaneously.
  - Added `SwitchDevices` method for changing both devices at once.
  - Configured miniaudio device init for low latency and disabled WASAPI SRC auto-conversion.
  - Fixed issues in device enumeration info handling.

- WebRTC APM Extension (`SoundFlow.Extensions.WebRtc.Apm`):
  - Added a new extension package integrating the WebRTC Audio Processing Module.
  - Provides `WebRtcApmModifier` for real-time processing (AEC, NS, AGC, HPF, Pre-Amp).
  - Includes `NoiseSuppressor` component for offline/batch noise suppression.
  - Added necessary native libraries for cross-platform support via runtimes.

- Build System and CI (`.github/workflows`, `Native/CMakeLists.txt`, `Src/SoundFlow.targets`):
  - Overhauled GitHub Actions workflow for native library builds, simplifying Windows setup and standardizing artifact handling.
  - Added `.targets` files for improved NuGet package native library distribution.
  - Updated native CMake build files for better platform targeting and project structure.

- Other Improvements:
  - Refactored Algorithmic Reverb modifier for improved robustness and clarity.
  - Added `IDisposable` interface to `ISoundDataProvider` and implemented it across built-in providers.
  - Added `Volume` property to `ISoundPlayer`.
  - Added new utility math functions (`Mod`, `PrincipalAngle`).
  - Added a new sample project (`SoundFlow.Samples.NoiseSuppression`) and updated existing samples.
  - Added GitHub issue templates for structured bug reports, feature requests, etc.

V1.0.3

Toggle V1.0.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Modernized collection initialization syntax (#3)

* Modernized collection initialization syntax

* Sealed a few classes
Those were (presumably) not intended to be inherited