Skip to content

Commit

Permalink
Merge pull request #175 from alnitak/loadMemWinCrash
Browse files Browse the repository at this point in the history
fix: Call `loadMem` will crash the application #174
  • Loading branch information
alnitak authored Feb 3, 2025
2 parents 3573b5a + c2e7482 commit a49ee84
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

### 3.0.0-pre.1 (3 Feb 2025)
- fix: Call `loadMem` will crash the application #174.

### 3.0.0-pre.0 (2 Feb 2025)
- fix: clicks and pops when changing waveform frequency #156.
- added `Limiter` and `Compressor` filters (see `example/lib/filters/`).
Expand All @@ -7,12 +10,12 @@
- `s16le` signed 16 bit little endian
- `s32le` signed 32 bit little endian
- `f32le` float 32 bit little endian
- `opus` Opus codec compressed audio with Ogg container. Usefull for streaming from the Web (ie using OpenAI APIs).
- `opus` Opus codec compressed audio with Ogg container. Useful for streaming from the Web (ie using OpenAI APIs).
- fixed Web Worker initialization non fatal error that could occur on Web.
- fixed sound distortion using single pitchShift filter and changing relative play speed #154.
- fixed the use of `LoadMode.disk` on the Web platform which in some cases caused the `allInstancesFinished` event to not be emitted.
- improved performance on Web, MacOS and iOS.
- get wave and FFT sample is now simpler and faster.
- get wave and FFT samples is now simpler and faster.
- To avoid future incompatibilities when using other WASM compiled plugins, it is now necessary to add a new script to `index.html`:
```
<script src="assets/packages/flutter_soloud/web/libflutter_soloud_plugin.js" defer></script>
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: >-
A low-level audio plugin for Flutter,
mainly meant for games and immersive apps.
Based on the SoLoud (C++) audio engine.
version: 3.0.0-pre.0
version: 3.0.0-pre.1
issue_tracker: https://github.com/alnitak/flutter_soloud/issues
homepage: https://github.com/alnitak/flutter_soloud
maintainer: Marco Bavagnoli (@lildeimos)
Expand Down
2 changes: 1 addition & 1 deletion src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ PlayerErrors Player::loadMem(
{
newSound.get()->sound = std::make_unique<SoLoud::Wav>();
newSound.get()->soundType = TYPE_WAV;
result = static_cast<SoLoud::Wav *>(newSound.get()->sound.get())->loadMem(mem, length, false, true);
result = static_cast<SoLoud::Wav *>(newSound.get()->sound.get())->loadMem(mem, length, true, true);
}
else
{
Expand Down
8 changes: 6 additions & 2 deletions windows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
# in bindings.cpp
add_compile_definitions(LIBOPUS_OGG_AVAILABLE)

# target_compile_options("${PLUGIN_NAME}" PRIVATE -Wall -Wno-error -fPIC) # -ldl -lpthread -lm
target_compile_options("${PLUGIN_NAME}" PRIVATE "/WX-")
target_compile_options(${PLUGIN_NAME} PRIVATE
/W4 # Warning level 4
/WX- # Disable warnings as errors
/arch:SSE2 # Enable SSE2 instructions
/arch:SSE3 # Enable SSE3 instructions
)

# List of absolute paths to libraries that should be bundled with the plugin.
set(flutter_soloud_bundled_libraries
Expand Down

0 comments on commit a49ee84

Please sign in to comment.