Skip to content

Commit 8a7b6bf

Browse files
authored
Merge pull request #439 from alnitak/dev
#### 4.0.0 (3 Apr 2026) - fix: some OGG audio files don't trigger `SoundEventType.handleIsNoMoreValid` - fix: setBufferStream fails to decode small MP3 files under 32 KB #434. Thanks to @chaudharydeepanshu - fix web: `createVoiceGroup` return was interpred as a signed int instead of unsigned because it has always the sign bit flag - fixed switching output devices on macOS and maybe on others platforms, didn't initialize correctly the new one - added some more tests - removed deprecated `equalizerFilter` in favor of `parametricEqFilter` #### 4.0.0-pre.3 (29 Mar 2026) - fix: FFI symbol stripping causing "symbol not found" errors in iOS/macOS when uploading to App Store #431 - fix decreasing volume when adding a bus to another #### 4.0.0-pre.2 (28 Mar 2026) - macOS/iOS fix: check for cmake in path while building - iOS simulator: fix libs linking #### 4.0.0-pre.1 (26 Mar 2026) - macOS fix: build error #### 4.0.0-pre.0 (24 Mar 2026) - added Mixing Bus feature and example https://docs.page/alnitak/flutter_soloud_docs/advanced/mixing_bus - added `getApproximateVolume` to get the approximate volume of a channel of the player - added `autoDispose` parameter to `load*` methods to automatically dispose the sound when it is finished. This eliminates the need to manually call disposeSource - added `playSource` to play a source from assets, URLs, or file and automatically dispose its `AudioSource` when it is finished - added `filters/parametric_eq.dart` example - added parametric equalizer with 1 to 64 bands and FFT window size from 32 to 4096 for quality and performance - added Swift Package Manager support - improved quality and performance of the pitchshift filter #313 - CocoaPods now uses cmake to compile the plugin always in release mode for macOS and iOS - conditional import of `js` and `wasm` only on web (no more included on other platforms) - win fix: UTF8 file name conversion was causing crash or file not found #427 - fixed a possible crash during app shutdown - possible fix for #333 which caused an ANR on Android when stopping/deinit or closing the app - Linux feat: choose to link ogg, opus, vorbis, and flac libraries from the system with `TRY_SYSTEM_LIBS_FIRST=1` environment variable #421. Useful for Rasperry Pi because the precompiled libs are available only for x86_64. - Android fix: elevate audio thread priority on Android #396. Thanks to @djkingCanada - Android: build optimizations --- ***breaking changes*** - bump Flutter version to 3.41.0 and Dart to 3.11.0 - play, play3d, speechText, are now sync - renamed `NO_OPUS_OGG_LIBS` environment variable to `NO_XIPH_LIBS` - renamed `SoLoudOpusOggVorbisLibsNotAvailableException` to `SoLoudXiphLibsNotAvailableException` - renamed `areOpusOggLibsAvailable` to `areXiphLibsAvailable`
2 parents acd8dc5 + 197effd commit 8a7b6bf

405 files changed

Lines changed: 38124 additions & 15556 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ migrate_working_dir/
2828
.dart_tool/
2929
.packages
3030
build/
31+
.build/
32+
.swiftpm/
3133

3234
images/
3335
lib/flutter_soloud_FFIGEN.dart
@@ -45,6 +47,9 @@ web/worker.dart.js.map
4547
**/android/daemon
4648
**/android/android
4749

50+
# CMake build artifacts for iOS/macOS (generated by build_cmake.sh)
51+
**/cmake_build/
52+
4853
# Ignore all the content of xiph folder, but not the scripts
4954
xiph/*
5055
!xiph/build_*

.vscode/c_cpp_properties.json

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
"name": "Linux",
55
"includePath": [
66
"${workspaceFolder}/**",
7-
"${workspaceFolder}/flutter_soloud_ios/ios/Classes/src",
8-
"${workspaceFolder}/flutter_soloud_ios/ios/Classes/src/soloud/include",
97
"${workspaceFolder}/src"
108
],
119
"defines": ["WITH_MINIAUDIO", "DR_MP3_IMPLEMENTATION", "DR_MP3_FLOAT_OUTPUT", "MINIMP3_IMPLEMENTATION"], // to see the code in between "#if defined"
@@ -32,7 +30,8 @@
3230
{
3331
"name": "Win32",
3432
"includePath": [
35-
"${workspaceFolder}/**"
33+
"${workspaceFolder}/**",
34+
"${workspaceFolder}/src"
3635
],
3736
"defines": [
3837
"_DEBUG",
@@ -54,8 +53,6 @@
5453
"name": "MacOS",
5554
"includePath": [
5655
"${workspaceFolder}/**",
57-
"${workspaceFolder}/flutter_soloud_ios/ios/Classes/src",
58-
"${workspaceFolder}/flutter_soloud_ios/ios/Classes/src/soloud/include",
5956
"${workspaceFolder}/src"
6057
],
6158
"defines": ["WITH_MINIAUDIO", "DR_MP3_IMPLEMENTATION", "DR_MP3_FLOAT_OUTPUT"],
@@ -64,21 +61,6 @@
6461
"cppStandard": "c++17",
6562
"intelliSenseMode": "macos-clang-x64",
6663
"configurationProvider": "ms-vscode.cmake-tools"
67-
},
68-
{
69-
"name": "iOS",
70-
"includePath": [
71-
"${workspaceFolder}/**",
72-
"${workspaceFolder}/flutter_soloud_ios/ios/Classes/src",
73-
"${workspaceFolder}/flutter_soloud_ios/ios/Classes/src/soloud/include",
74-
"${workspaceFolder}/src"
75-
],
76-
"defines": ["WITH_MINIAUDIO", "DR_MP3_IMPLEMENTATION", "DR_MP3_FLOAT_OUTPUT"],
77-
"compilerPath": "/usr/bin/clang",
78-
"cStandard": "c17",
79-
"cppStandard": "c++17",
80-
"intelliSenseMode": "ios-clang-arm64",
81-
"configurationProvider": "ms-vscode.cmake-tools"
8264
}
8365
],
8466
"version": 4

.vscode/launch.json

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,32 @@
88
"name": "Flutter debug",
99
"type": "dart",
1010
"request": "launch",
11-
"program": "lib/audio_context/audio_context.dart",
11+
"program": "tests/tests.dart",
1212
"flutterMode": "debug",
1313
// "env": {
14-
// "NO_OPUS_OGG_LIBS": "1"
14+
// "NO_XIPH_LIBS": "1"
1515
// },
1616
"cwd": "${workspaceFolder}/example"
1717
},
1818
{
1919
"name": "Flutter profile",
2020
"type": "dart",
2121
"request": "launch",
22-
"program": "lib/buffer_stream/web_radio.dart",
22+
"program": "lib/mixing_bus/mixing_bus.dart",
2323
"flutterMode": "profile",
2424
// "env": {
25-
// "NO_OPUS_OGG_LIBS": "1"
25+
// "NO_XIPH_LIBS": "1"
2626
// },
2727
"cwd": "${workspaceFolder}/example"
2828
},
2929
{
3030
"name": "Flutter release",
3131
"type": "dart",
3232
"request": "launch",
33-
"program": "lib/buffer_stream/web_radio.dart",
33+
"program": "tests/tests.dart",
3434
"flutterMode": "release",
3535
// "env": {
36-
// "NO_OPUS_OGG_LIBS": "1"
36+
// "NO_XIPH_LIBS": "1"
3737
// },
3838
"cwd": "${workspaceFolder}/example"
3939
},
@@ -88,6 +88,30 @@
8888
"program": "${workspaceFolder}/example/build/linux/x64/debug/bundle/flutter_soloud_example",
8989
"cwd": "${workspaceFolder}"
9090
},
91+
{
92+
// install CodeLLDB extension for macOS debugging
93+
// and remember to replace "-O2 -DNDEBUG" with "-O0 -g" in "target_compile_options" in "macos/CMakeLists.txt"
94+
"name": "Debug native macOS",
95+
"preLaunchTask": "compile macos debug",
96+
"type": "lldb",
97+
"request": "launch",
98+
"program": "${workspaceFolder}/example/build/macos/Build/Products/Debug/flutter_soloud_example.app/Contents/MacOS/flutter_soloud_example",
99+
"cwd": "${workspaceFolder}",
100+
"sourceMap": {
101+
"${workspaceFolder}/example/macos/Flutter/ephemeral/.symlinks/plugins/flutter_soloud": "${workspaceFolder}"
102+
}
103+
},
104+
{
105+
"name": "Debug native macOS test",
106+
"preLaunchTask": "compile macos test debug",
107+
"type": "lldb",
108+
"request": "launch",
109+
"program": "${workspaceFolder}/example/build/macos/Build/Products/Debug/flutter_soloud_example.app/Contents/MacOS/flutter_soloud_example",
110+
"cwd": "${workspaceFolder}",
111+
"sourceMap": {
112+
"${workspaceFolder}/example/macos/Flutter/ephemeral/.symlinks/plugins/flutter_soloud": "${workspaceFolder}"
113+
}
114+
},
91115
{
92116
"name": "Chrome wasm release",
93117
"type": "chrome",

.vscode/tasks.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"tasks": [
44
{
55
"label": "compile linux debug verbose",
6-
"command": "cd ${workspaceFolder}/example; flutter build linux -t lib/buffer_stream/web_radio.dart --debug --verbose",
6+
"command": "cd ${workspaceFolder}/example; flutter build linux -t lib/mixing_bus/mixing_bus.dart --debug --verbose",
77
// "args": ["build", "linux", "--verbose"],
88
"type": "shell"
99
},
1010
{
1111
"label": "compile linux debug",
12-
"command": "cd ${workspaceFolder}/example; flutter build linux -t lib/buffer_stream/websocket.dart --debug",
12+
"command": "cd ${workspaceFolder}/example; flutter build linux -t lib/mixing_bus/mixing_bus.dart --debug",
1313
"type": "shell"
1414
},
1515
{
@@ -19,17 +19,27 @@
1919
},
2020
{
2121
"label": "compile windows debug verbose",
22-
"command": "cd ${workspaceFolder}/example; flutter build windows -t lib/buffer_stream/websocket.dart --debug --verbose",
22+
"command": "cd ${workspaceFolder}/example; flutter build windows -t lib/mixing_bus/mixing_bus.dart --debug --verbose",
2323
"type": "shell"
2424
},
2525
{
2626
"label": "compile windows debug",
27-
"command": "cd ${workspaceFolder}/example; flutter build windows -t lib/main.dart --debug",
27+
"command": "cd ${workspaceFolder}/example; flutter build windows -t lib/buffer_stream/simple_noise_stream.dart --debug",
28+
"type": "shell"
29+
},
30+
{
31+
"label": "compile macos debug",
32+
"command": "cd ${workspaceFolder}/example; flutter build macos -t lib/main.dart --debug",
33+
"type": "shell"
34+
},
35+
{
36+
"label": "compile macos test debug",
37+
"command": "cd ${workspaceFolder}/example; flutter build macos -t tests/tests.dart --debug",
2838
"type": "shell"
2939
},
3040
{
3141
"label": "compile web wasm release",
32-
"command": "cd ${workspaceFolder}/example; flutter run -d chrome --wasm --web-browser-flag '--disable-web-security' -t lib/buffer_stream/web_radio.dart --release",
42+
"command": "cd ${workspaceFolder}/example; flutter run -d chrome --wasm --web-browser-flag '--disable-web-security' -t tests/tests.dart --release",
3343
"type": "shell"
3444
},
3545
{
@@ -38,4 +48,4 @@
3848
"type": "shell"
3949
}
4050
]
41-
}
51+
}

CHANGELOG.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,47 @@
1+
#### 4.0.0 (3 Apr 2026)
2+
- fix: some OGG audio files don't trigger `SoundEventType.handleIsNoMoreValid`
3+
- fix: setBufferStream fails to decode small MP3 files under 32 KB #434. Thanks to @chaudharydeepanshu
4+
- fix web: `createVoiceGroup` return was interpred as a signed int instead of unsigned because it has always the sign bit flag
5+
- fixed switching output devices on macOS and maybe on others platforms, didn't initialize correctly the new one
6+
- added some more tests
7+
- removed deprecated `equalizerFilter` in favor of `parametricEqFilter`
8+
9+
#### 4.0.0-pre.3 (29 Mar 2026)
10+
- fix: FFI symbol stripping causing "symbol not found" errors in iOS/macOS when uploading to App Store #431
11+
- fix decreasing volume when adding a bus to another
12+
13+
#### 4.0.0-pre.2 (28 Mar 2026)
14+
- macOS/iOS fix: check for cmake in path while building
15+
- iOS simulator: fix libs linking
16+
17+
#### 4.0.0-pre.1 (26 Mar 2026)
18+
- macOS fix: build error
19+
20+
#### 4.0.0-pre.0 (24 Mar 2026)
21+
- added Mixing Bus feature and example https://docs.page/alnitak/flutter_soloud_docs/advanced/mixing_bus
22+
- added `getApproximateVolume` to get the approximate volume of a channel of the player
23+
- added `autoDispose` parameter to `load*` methods to automatically dispose the sound when it is finished. This eliminates the need to manually call disposeSource
24+
- added `playSource` to play a source from assets, URLs, or file and automatically dispose its `AudioSource` when it is finished
25+
- added `filters/parametric_eq.dart` example
26+
- added parametric equalizer with 1 to 64 bands and FFT window size from 32 to 4096 for quality and performance
27+
- added Swift Package Manager support
28+
- improved quality and performance of the pitchshift filter #313
29+
- CocoaPods now uses cmake to compile the plugin always in release mode for macOS and iOS
30+
- conditional import of `js` and `wasm` only on web (no more included on other platforms)
31+
- win fix: UTF8 file name conversion was causing crash or file not found #427
32+
- fixed a possible crash during app shutdown
33+
- possible fix for #333 which caused an ANR on Android when stopping/deinit or closing the app
34+
- Linux feat: choose to link ogg, opus, vorbis, and flac libraries from the system with `TRY_SYSTEM_LIBS_FIRST=1` environment variable #421. Useful for Rasperry Pi because the precompiled libs are available only for x86_64.
35+
- Android fix: elevate audio thread priority on Android #396. Thanks to @djkingCanada
36+
- Android: build optimizations
37+
---
38+
***breaking changes***
39+
- bump Flutter version to 3.41.0 and Dart to 3.11.0
40+
- play, play3d, speechText, are now sync
41+
- renamed `NO_OPUS_OGG_LIBS` environment variable to `NO_XIPH_LIBS`
42+
- renamed `SoLoudOpusOggVorbisLibsNotAvailableException` to `SoLoudXiphLibsNotAvailableException`
43+
- renamed `areOpusOggLibsAvailable` to `areXiphLibsAvailable`
44+
145
#### 3.5.4 (22 Mar 2026)
246
- remove wasm/js assets for non-web builds#425. Thanks to @adil192
347

@@ -25,7 +69,7 @@
2569
#### 3.4.9 (21 Jan 2026)
2670
- fix crash when seeking with a negative value #386
2771
- Linux fix: don't use -msse on arm64 builds #395. Thanks to @adil192
28-
- Android fix: enable AAudio with runtime API level check for safe fallback #397. Thanks to djkingCanada
72+
- Android fix: enable AAudio with runtime API level check for safe fallback #397. Thanks to @djkingCanada
2973

3074
#### 3.4.8 (29 Dec 2025)
3175
- fix MP3 stream decoding missing last few seconds of audio #381

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A low-level audio plugin for Flutter.
66
||Linux|Windows|Android|MacOS|iOS|Web|
77
|-|:-:|:-:|:-:|:-:|:-:|:-:|
88
|Support|💙|💙|💙|💙|💙|💙|
9-
|Minimum Version|Any|Any|21|10.15|13.0|Any|
9+
|Minimum Version|Any|Any|21+|10.15+|13.0+|iOS 16.4+</br>Safari 16.4+</br>Chrome 91+</br>Edge 91+</br>Firefox 89+</br>|
1010

1111
## Overview
1212

@@ -19,7 +19,7 @@ A high-performance audio plugin designed primarily for games and immersive appli
1919
- 🔄 Gapless looping
2020
- 🔄 Stream audio with auto-pause for buffering, support for PCM, MP3, Ogg with Opus, Vorbis and FLAC containers
2121
- 📊 Get audio wave and/or FFT audio data in real-time (useful for visualization)
22-
- 🎛️ Rich effects system (reverb, echo, limiter, bassboost, etc.)
22+
- 🎛️ Rich effects system (reverb, echo, limiter, equalizer, pitch shift, etc.)
2323
- ⚙️ Faders for attributes (e.g. fade out for 2 seconds, then stop)
2424
- 🎚️ Oscillators for attributes
2525
- 🌊 Waveform generation and visualization
@@ -34,6 +34,8 @@ A high-performance audio plugin designed primarily for games and immersive appli
3434

3535
If you are looking for a package to visualize audio using shaders or CustomPainter, please check out [audio_flux](https://pub.dev/packages/audio_flux). It uses this plugin for output and [flutter_recorder](https://pub.dev/packages/flutter_recorder) for input.
3636

37+
Also, if you are building using Swift Package Manager (SPM), please check out [iOS and MacOS Configuration](https://docs.page/alnitak/flutter_soloud_docs/get_started/setup#ios-and-macos-configuration).
38+
3739
## Documentation
3840

3941
- [Full Documentation](https://docs.page/alnitak/flutter_soloud_docs)
@@ -46,12 +48,10 @@ void example() async {
4648
final soloud = SoLoud.instance;
4749
await soloud.init();
4850
49-
final source = await soloud.loadAsset('assets/sound.mp3');
50-
final handle = await soloud.play(source);
51+
await soloud.playSource(asset: 'assets/sound.mp3');
5152
52-
// Later...
53-
await soloud.stop(handle);
54-
await soloud.disposeSource(source);
53+
[...]
54+
await soloud.deinit();
5555
}
5656
```
5757

0 commit comments

Comments
 (0)