Skip to content

Commit

Permalink
Merge pull request #110 from alnitak/pitch
Browse files Browse the repository at this point in the history
Make filters easier to use and pitchshift filter
  • Loading branch information
filiph authored Aug 23, 2024
2 parents 99bb7f9 + a455ab4 commit a13c85f
Show file tree
Hide file tree
Showing 109 changed files with 3,416 additions and 5,130 deletions.
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
"name": "Flutter debug",
"type": "dart",
"request": "launch",
"program": "lib/main.dart",
"program": "lib/filters/pitchshift.dart",
"flutterMode": "debug",
"cwd": "${workspaceFolder}/example"
},
{
"name": "Flutter profile",
"type": "dart",
"request": "launch",
"program": "lib/main.dart",
"program": "lib/filters/pitchshift.dart",
"flutterMode": "profile",
"cwd": "${workspaceFolder}/example"
},
{
"name": "Flutter release",
"type": "dart",
"request": "launch",
"program": "lib/main.dart",
"program": "lib/filters/pitchshift.dart",
"flutterMode": "release",
"cwd": "${workspaceFolder}/example"
},
Expand Down
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"tasks": [
{
"label": "compile linux debug verbose",
"command": "cd ${workspaceFolder}/example; flutter build linux -t lib/main.dart --debug --verbose",
"command": "cd ${workspaceFolder}/example; flutter build linux -t lib/filters/sound_filter.dart --debug --verbose",
// "args": ["build", "linux", "--verbose"],
"type": "shell"
},
{
"label": "compile linux debug",
"command": "cd ${workspaceFolder}/example; flutter build linux -t lib/main.dart --debug",
"command": "cd ${workspaceFolder}/example; flutter build linux -t lib/filters/sound_filter.dart --debug",
"type": "shell"
},
{
Expand All @@ -29,7 +29,7 @@
},
{
"label": "compile web debug",
"command": "cd ${workspaceFolder}/example; flutter run -d chrome --web-renderer canvaskit --web-browser-flag '--disable-web-security' -t lib/main.dart --release",
"command": "cd ${workspaceFolder}/example; flutter run -d chrome --web-renderer canvaskit --web-browser-flag '--disable-web-security' -t lib/filters/sound_filter.dart --release",
"type": "shell"
}
]
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
### 2.1.0
- added `getPan()`, `setPan()` and `setPanAbsolute()`.
- added support for the Web platform.
- added `getPan()`, `setPan()` and `setPanAbsolute()`.
- added `loadMem()` to read the give audio file bytes buffer (not RAW data). Useful for the Web platform.
- fixed `getFilterParamNames()`.
- added `AudioData` class to manage audio samples.
- added player initialization parameters: sample rate, buffer size, number of channels (mono, stereo, quad, 5.1, 7.1).
- added voice groups.
- it's now possible to set filters not only globally, but also to single audio sources.
- it's now possible to set filters not only globally, but also to single audio sources (not on the web platform).
- fade and oscillate filter parameters.
- experimental capture feature removed.
- now accessing to filter has been simplified with the use of `SoLoud.filters` and `AudioSource.filters` to use global and single sound filters.

### 2.0.2 (23 May 2024)
- Fixed wrong exception raised by `setVolume()` when a handle is no more valid.
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,19 @@ with the [miniaudio](https://miniaud.io/) backend
through [Dart's C interop](https://dart.dev/interop/c-interop) (`dart:ffi`).
In other words, it is calling the C/C++ methods of the underlying audio engine
directly — there are no method channels in use.

#### Web platform
To use this plugin on the **Web platform**, please refer to [WEB_NOTES](https://github.com/alnitak/flutter_soloud/blob/main/WEB_NOTES.md).


#### Stripping iOS symbols
When creating a release archive (IPA), the symbols are [stripped by Xcode](https://docs.flutter.dev/platform-integration/ios/c-interop#stripping-ios-symbols), so the command `flutter build ipa` may throw a `Failed to lookup symbol ... symbol not found error`. To work around this:

1. In Xcode, go to Target Runner > Build Settings > Strip Style
2. Change from All Symbols to Non-Global Symbols



## Example

The following example loads an MP3 asset,
Expand Down Expand Up @@ -209,6 +219,5 @@ For Windows users, SoLoud utilizes *Openmpt* through a DLL, which can be obtaine

#### Web

Work on web support (using WASM) is tracked in
https://github.com/alnitak/flutter_soloud/issues/46.
Please see [WEB_NOTES.md](https://github.com/alnitak/flutter_soloud/blob/main/WEB_NOTES.md).

1 change: 1 addition & 0 deletions WEB_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
## Description

The web platform is now supported, but some testing is welcome.
Please note that filters for single sounds are not supported on the web.

## How to use

Expand Down
2 changes: 2 additions & 0 deletions android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ list(APPEND PLUGIN_SOURCES
"${SRC_DIR}/analyzer.cpp"
"${SRC_DIR}/synth/basic_wave.cpp"
"${SRC_DIR}/filters/filters.cpp"
"${SRC_DIR}/filters/pitch_shift_filter.cpp"
"${SRC_DIR}/filters/smbPitchShift.cpp"
${TARGET_SOURCES}
)

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added example/assets/audio/IveSeenThings.mp3
Binary file not shown.
Binary file removed example/assets/audio/TropicalBeeper.mp3
Binary file not shown.
Binary file removed example/assets/audio/XtrackTure.mp3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed example/assets/audio/police.mp3
Binary file not shown.
Binary file removed example/assets/audio/siren.mp3
Binary file not shown.
Binary file added example/assets/audio/tic-1.wav
Binary file not shown.
Binary file added example/assets/audio/tic-2.wav
Binary file not shown.
69 changes: 0 additions & 69 deletions example/assets/shaders/test1.frag

This file was deleted.

81 changes: 0 additions & 81 deletions example/assets/shaders/test2.frag

This file was deleted.

112 changes: 0 additions & 112 deletions example/assets/shaders/test3.frag

This file was deleted.

Loading

0 comments on commit a13c85f

Please sign in to comment.