Skip to content

Get rid of AudioIsolate #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"type": "cppvsdbg",
"request": "launch",
"args": [],
"program": "${workspaceFolder}/example/build/windows/runner/Debug/flutter_soloud_example.exe",
"program": "${workspaceFolder}/example/build/windows/x64/runner/Debug/flutter_soloud_example.exe",
"cwd": "${workspaceFolder}"
},
{
Expand All @@ -51,7 +51,7 @@
"type": "cppvsdbg",
"request": "launch",
"args": [],
"program": "${workspaceFolder}/example/build/windows/runner/Debug/flutter_soloud_example.exe",
"program": "${workspaceFolder}/example/build/windows/x64//runner/Debug/flutter_soloud_example.exe",
"cwd": "${workspaceFolder}"
},
{
Expand All @@ -70,6 +70,14 @@
"request": "launch",
"program": "${workspaceFolder}/example/build/linux/x64/debug/bundle/flutter_soloud_example",
"cwd": "${workspaceFolder}"
},
{
"name": "Debug native Linux test",
"preLaunchTask": "compile linux test debug",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/example/build/linux/x64/debug/bundle/flutter_soloud_example",
"cwd": "${workspaceFolder}"
}
]
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"executor": "cpp",
"io_context": "cpp",
"netfwd": "cpp",
"timer": "cpp"
"timer": "cpp",
"text_encoding": "cpp"
}
}
6 changes: 6 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
// "args": ["build", "linux"],
"type": "shell"
},
{
"label": "compile linux test debug",
"command": "cd ${workspaceFolder}/example; flutter build linux -t tests/tests.dart --debug",
// "args": ["build", "linux"],
"type": "shell"
},
{
"label": "compile windows debug verbose",
"command": "cd ${workspaceFolder}/example; flutter build windows -t lib/main.dart --debug --verbose",
Expand Down
32 changes: 16 additions & 16 deletions example/pubspec.lock
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ packages:
dependency: "direct main"
description:
name: cupertino_icons
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
source: hosted
version: "1.0.6"
version: "1.0.8"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -82,10 +82,10 @@ packages:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da
sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f"
url: "https://pub.dev"
source: hosted
version: "2.0.17"
version: "2.0.19"
flutter_soloud:
dependency: "direct main"
description:
Expand Down Expand Up @@ -187,26 +187,26 @@ packages:
dependency: "direct main"
description:
name: path_provider
sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.3"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d
url: "https://pub.dev"
source: hosted
version: "2.2.2"
version: "2.2.4"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f"
sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16
url: "https://pub.dev"
source: hosted
version: "2.3.2"
version: "2.4.0"
path_provider_linux:
dependency: transitive
description:
Expand Down Expand Up @@ -312,10 +312,10 @@ packages:
dependency: "direct main"
description:
name: star_menu
sha256: cba4c073663e0cc716d51b86c2e375aa04f2343bc0cddf33c6c01a9562127e21
sha256: b3147a753f2db3f4830a4d6f63bf56c96cde8bd0ff54d3464934b7726e4efa3a
url: "https://pub.dev"
source: hosted
version: "3.1.6"
version: "3.1.9"
stream_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -384,18 +384,18 @@ packages:
dependency: transitive
description:
name: web
sha256: "1d9158c616048c38f712a6646e317a3426da10e884447626167240d45209cbad"
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
url: "https://pub.dev"
source: hosted
version: "0.5.0"
version: "0.5.1"
win32:
dependency: transitive
description:
name: win32
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb"
url: "https://pub.dev"
source: hosted
version: "5.2.0"
version: "5.5.0"
xdg_directories:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions example/tests/tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ Future<void> testSynchronousDeinit() async {

/// Try init-play-deinit and again init-play without disposing the sound
await SoLoud.instance.init();
SoLoud.instance.setGlobalVolume(0.2);

await loadAsset();
await SoLoud.instance.play(currentSound!);
Expand Down
7 changes: 6 additions & 1 deletion example/windows/flutter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
# https://github.com/flutter/flutter/issues/57146.
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")

# Set fallback configurations for older versions of the flutter tool.
if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
set(FLUTTER_TARGET_PLATFORM "windows-x64")
endif()

# === Flutter Library ===
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")

Expand Down Expand Up @@ -92,7 +97,7 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
windows-x64 $<CONFIG>
${FLUTTER_TARGET_PLATFORM} $<CONFIG>
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
Expand Down
2 changes: 1 addition & 1 deletion lib/flutter_soloud.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
library flutter_soloud;

export 'src/audio_source.dart';
export 'src/enums.dart' hide PlayerErrors;
export 'src/enums.dart' hide PlayerErrors, PlayerStateNotification;
export 'src/exceptions/exceptions.dart';
export 'src/filter_params.dart';
export 'src/soloud.dart';
Expand Down
Loading