Skip to content

V1.1.0

Choose a tag to compare

@LSXPrime LSXPrime released this 03 Jun 13:09
· 14 commits to master since this release

SoundFlow v1.1.0 Release Notes

This is a landmark release for SoundFlow, introducing a powerful Non-Destructive Audio Editing and Persistence Engine. This update provides developers with a complete framework for building sophisticated audio editing applications, from simple clip arrangement to complex multi-track projects with effects, time-stretching, and project saving/loading capabilities.

✨ Major New Features

1. The SoundFlow.Editing Module: A Full-Featured Audio Editing Engine

We are thrilled to introduce a comprehensive, non-destructive editing module. This suite of tools allows you to build complex audio timelines programmatically.

  • Composition as a Canvas: The new Composition class acts as your main project container, holding multiple Track objects.
  • Multi-Track Support: Mix and manage several audio Tracks simultaneously. Each track has its own settings for volume, pan, mute, and solo.
  • Audio Segments (Clips): The AudioSegment is the core building block. Place segments on a track's timeline, specifying a start time and duration from any audio source.
  • Advanced Segment Controls: Each segment comes with a rich AudioSegmentSettings object, allowing for:
    • Independent volume, pan, and speed adjustments.
    • Segment-level effects and analyzers.
    • Reversing: Play audio clips backward with a simple IsReversed = true flag.
    • Looping: Repeat segments a specific number of times or to fill a target duration using LoopSettings.
    • Fades: Apply smooth FadeIn and FadeOut effects with Linear, Logarithmic, and S-Curve shapes.

2. Pitch-Preserved Time Stretching & Advanced Speed Control

Manipulating the timing of audio is now more powerful than ever.

  • WSOLA Time Stretching: A new TimeStretchFactor property on AudioSegment allows you to change the duration of an audio clip without altering its pitch. This is perfect for fitting dialogue or music to a specific time slot. Internally, this is powered by a new, high-quality WsolaTimeStretcher component.
  • Target Duration Stretching: You can now set a TargetStretchDuration on a segment, and SoundFlow will automatically calculate the required stretch factor to make it fit perfectly.
  • Classic Speed Control: The SpeedFactor property remains, allowing for classic varispeed effects that adjust both tempo and pitch (like a tape machine).

3. Project Persistence: Save and Load Your Compositions

A complete SoundFlow.Editing.Persistence system has been added, allowing you to save and load entire compositions to and from a file (.sfproj).

  • Save & Load: Use CompositionProjectManager.SaveProjectAsync and LoadProjectAsync to manage your projects.
  • Media Consolidation: When saving, you can opt to "consolidate" all audio assets into a single Assets folder within your project directory, making your projects portable and self-contained.
  • Embed Small Media: For convenience, small audio files (under 1MB) can be embedded directly into the project file as Base64 strings, eliminating the need for external files for short sound effects or jingles.
  • Missing Media Relinking: If a project is loaded and an audio file is missing, the API reports the missing source and provides a RelinkMissingMediaAsync function to point the project to the file's new location.

4. New Sample Project: SoundFlow.Samples.EditingMixer

To showcase these powerful new features, a comprehensive new sample project has been added. Run it to see interactive examples of:

  • Stitching, trimming, and editing a dialogue between two speakers.
  • Replacing and layering audio with generated tones and music.
  • Applying time stretching, speed changes, looping, and fades.
  • Saving a project with media consolidation, loading it back, and relinking missing files.

🚀 Enhancements & Improvements

  • Stream-Based Encoding & Recording: The Recorder and ISoundEncoder interfaces now operate on Stream objects instead of file paths. This is a major flexibility improvement, allowing you to record or encode directly to a MemoryStream, NetworkStream, or any other stream type.
  • Improved Playback Engine: SoundPlayerBase has been significantly refactored to support the new time-stretching and advanced playback capabilities, resulting in more robust and flexible audio playback.
  • Enhanced RawDataProvider: This provider is now significantly more versatile, with new constructors that can accept float[], int[], short[], and byte[] arrays directly, in addition to streams.
  • Robust Resource Management: The core Mixer component is now IDisposable and uses a ConcurrentDictionary for its components, improving thread safety and ensuring proper cleanup of audio resources.
  • Effect Toggling: SoundModifier and AudioAnalyzer classes now have an Enabled property, allowing you to non-destructively toggle effects on and off at any level (segment, track, or master).
  • Performance Optimizations: The audio conversion pipeline for final output has been optimized for better performance.
  • Updated Native Libraries: The underlying native libraries for WebRTC APM and MiniAudio have been updated to their latest versions across all supported platforms.

⚠️ Breaking Changes

This release includes several API changes to improve flexibility and consistency.

  1. Encoder API Uses Stream:

    • AudioEngine.CreateEncoder and the MiniAudioEncoder constructor now require a Stream instead of a string filePath.
    • Before: new MiniAudioEncoder("output.wav", ...)
    • After: new MiniAudioEncoder(new FileStream("output.wav", ...), ...)
    • Reason: This allows encoding to any type of stream, not just files.
  2. Recorder API Uses Stream:

    • The Recorder constructor now takes a Stream instead of a string filePath.
    • Before: new Recorder("recording.wav", ...)
    • After: new Recorder(new FileStream("recording.wav", ...), ...)
    • Reason: Consistent with the Encoder API change, enabling recording to any stream.
  3. ISoundDataProvider.SampleRate Property:

    • The SampleRate property on ISoundDataProvider is now a non-nullable, get-only int (public int SampleRate { get; }). It was previously a settable int?.
    • Reason: The sample rate is an intrinsic property of the audio source and should not be changed after creation. It is now inferred from the audio source or the engine, ensuring more reliable behavior.
  4. Provider Constructor Signatures:

    • Reflecting the change above, constructors for ChunkedDataProvider, NetworkDataProvider, and AssetDataProvider no longer accept a sampleRate parameter.

🌐 New Platform Support

  • FreeBSD: SoundFlow now includes native binaries for FreeBSD on x64 and ARM64 architectures (freebsd-x64 and freebsd-arm64).

What's Changed

  • refactor: Raw audio sample support for AssetDataProvider by @patrick-hovsepian in #43
  • fix: GC hole in MiniAudioDecoder by @Windows10CE in #47
  • feat: Implement advanced audio editing, WSOLA time stretching & project I/O by @LSXPrime in #48
  • feat: Implement stream-based audio encoding by @LSXPrime in #49
  • feat: Add FreeBSD support, refine cross-platform builds, and enhance audio processing by @LSXPrime in #50

New Contributors

Full Changelog: V1.0.4...V1.1.0