Skip to content

Commit a0c0ed2

Browse files
authored
Merge pull request #176 from alnitak/bufferingType
feat: Buffering preserved and released types
2 parents 9f4a18f + f4605be commit a0c0ed2

File tree

179 files changed

+21317
-2426
lines changed

Some content is hidden

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

179 files changed

+21317
-2426
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "Flutter debug",
99
"type": "dart",
1010
"request": "launch",
11-
"program": "lib/audio_data/audio_data.dart",
11+
"program": "lib/buffer_stream/websocket.dart",
1212
"flutterMode": "debug",
1313
"cwd": "${workspaceFolder}/example"
1414
},

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
{
1111
"label": "compile linux debug",
12-
"command": "cd ${workspaceFolder}/example; flutter build linux -t lib/test.dart --debug",
12+
"command": "cd ${workspaceFolder}/example; flutter build linux -t lib/buffer_stream/websocket.dart --debug",
1313
"type": "shell"
1414
},
1515
{

CHANGELOG.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
2-
### 3.0.0-pre.2 ()
1+
### 3.0.0 (13 Feb 2025)
2+
- `BufferStream` now supports 2 type of buffering:
3+
- `BufferingType.preserved` (default): preserve the data already in the buffer while playing.
4+
- `BufferingType.released`: free the memory of the already played data for longer playback.
5+
- breaking change: splitted [maxBufferSize] to [maxBufferSizeBytes] and [maxBufferSizeDuration] in `SoLoud.setBufferStream`. This gives the user a way to choose the maximum buffer size using bytes or time.
6+
- breaking change: removed `initialized` getter in favor of `isInitialized`
7+
- removed deprecated `timeout` parameter in `SoLoud.init`.
8+
- removed deprecated `filter_params.dart`.
39
- fixed biquad resonant filter `frequency` default parameter #179
410
- fix: on some unclear conditions `isInitialized` returning false on MacOS after engine starts with no error #177
5-
6-
### 3.0.0-pre.1 (3 Feb 2025)
711
- fix: Call `loadMem` will crash the application #174.
812

913
### 3.0.0-pre.0 (2 Feb 2025)

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ On Linux and MacOS theese libraries must be installed if you want to use this ki
5555

5656
if the libraries are not found the plugin will throw an exception when calling `setBufferStream` using Opus format.
5757

58+
The `SoLoud.setBufferStream` supports also `BufferingType.preserved` which behaves the same as a normal `AudioSource`, and `BufferingType.released` which will free the memory of the already played audio for longer playback. The latter will accept to play only one instance of the audio stream at the same time.
59+
|BufferingType.preserved|BufferingType.released|
60+
|------------------------------------|----------------------------------|
61+
|![preserved](https://github.com/user-attachments/assets/e8699bfd-2a40-4832-a7a8-d729d844c48b)|![released](https://github.com/user-attachments/assets/7eb57688-ab0f-4859-813f-d23fff6ca10f)|
62+
|acts as normal leaving the whole audio data available for future re-play|while playing the already listened audio is freed. It can be listened to only once and the sound must be manually disposed|
63+
5864
#### Web platform
5965
To use this plugin on the **Web platform**, please add the following scripts to the `<head>` or `<body>` section of your `index.html`:
6066
```

example/android/app/.cxx/Debug/5p4b6b24/arm64-v8a/.cmake/api/v1/query/client-agp/cache-v2

Whitespace-only changes.

example/android/app/.cxx/Debug/5p4b6b24/arm64-v8a/.cmake/api/v1/query/client-agp/cmakeFiles-v1

Whitespace-only changes.

example/android/app/.cxx/Debug/5p4b6b24/arm64-v8a/.cmake/api/v1/query/client-agp/codemodel-v2

Whitespace-only changes.

0 commit comments

Comments
 (0)