Skip to content

Commit a49ee84

Browse files
authored
Merge pull request #175 from alnitak/loadMemWinCrash
fix: Call `loadMem` will crash the application #174
2 parents 3573b5a + c2e7482 commit a49ee84

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11

2+
### 3.0.0-pre.1 (3 Feb 2025)
3+
- fix: Call `loadMem` will crash the application #174.
4+
25
### 3.0.0-pre.0 (2 Feb 2025)
36
- fix: clicks and pops when changing waveform frequency #156.
47
- added `Limiter` and `Compressor` filters (see `example/lib/filters/`).
@@ -7,12 +10,12 @@
710
- `s16le` signed 16 bit little endian
811
- `s32le` signed 32 bit little endian
912
- `f32le` float 32 bit little endian
10-
- `opus` Opus codec compressed audio with Ogg container. Usefull for streaming from the Web (ie using OpenAI APIs).
13+
- `opus` Opus codec compressed audio with Ogg container. Useful for streaming from the Web (ie using OpenAI APIs).
1114
- fixed Web Worker initialization non fatal error that could occur on Web.
1215
- fixed sound distortion using single pitchShift filter and changing relative play speed #154.
1316
- fixed the use of `LoadMode.disk` on the Web platform which in some cases caused the `allInstancesFinished` event to not be emitted.
1417
- improved performance on Web, MacOS and iOS.
15-
- get wave and FFT sample is now simpler and faster.
18+
- get wave and FFT samples is now simpler and faster.
1619
- To avoid future incompatibilities when using other WASM compiled plugins, it is now necessary to add a new script to `index.html`:
1720
```
1821
<script src="assets/packages/flutter_soloud/web/libflutter_soloud_plugin.js" defer></script>

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >-
33
A low-level audio plugin for Flutter,
44
mainly meant for games and immersive apps.
55
Based on the SoLoud (C++) audio engine.
6-
version: 3.0.0-pre.0
6+
version: 3.0.0-pre.1
77
issue_tracker: https://github.com/alnitak/flutter_soloud/issues
88
homepage: https://github.com/alnitak/flutter_soloud
99
maintainer: Marco Bavagnoli (@lildeimos)

src/player.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ PlayerErrors Player::loadMem(
302302
{
303303
newSound.get()->sound = std::make_unique<SoLoud::Wav>();
304304
newSound.get()->soundType = TYPE_WAV;
305-
result = static_cast<SoLoud::Wav *>(newSound.get()->sound.get())->loadMem(mem, length, false, true);
305+
result = static_cast<SoLoud::Wav *>(newSound.get()->sound.get())->loadMem(mem, length, true, true);
306306
}
307307
else
308308
{

windows/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,12 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
8282
# in bindings.cpp
8383
add_compile_definitions(LIBOPUS_OGG_AVAILABLE)
8484

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

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

0 commit comments

Comments
 (0)