[X] I made sure that the issue I am raising doesn't already exist
Current bug behaviour
What happened?
I am creating a game on Windows. I am using flame_audio: ^2.10.2 (which depends on audioplayers-6.0.0) for sounds, there is an issue when clearing cache: The audio cache cannot be deleted(Windows only, Android is ok).
From the error log I can see why the file cannot be found is that the file path is wrong, for windows uses backslashes () as directory separators.
Expected behaviour
Be able to delete audio cache for Windows app.
Steps to reproduce
Execute flutter run on the code sample for a Windows App calling AudioCache.clear
Code sample
await FlameAudio.audioCache.load(songName!); // This is ok.
...
FutureOr<void> ClearMusic() async {
if (songName == null) {
return;
}
if (!useAudioPlayer) {
await FlameAudio.bgm.stop();
} else {
await musicPlayer!.stop();
}
await FlameAudio.audioCache.clear(songName!); // Error log.
}
Checklist
Current bug behaviour
What happened?
I am creating a game on Windows. I am using flame_audio: ^2.10.2 (which depends on audioplayers-6.0.0) for sounds, there is an issue when clearing cache: The audio cache cannot be deleted(Windows only, Android is ok).
From the error log I can see why the file cannot be found is that the file path is wrong, for windows uses backslashes () as directory separators.
Expected behaviour
Be able to delete audio cache for Windows app.
Steps to reproduce
Execute
flutter run
on the code sample for a Windows App calling AudioCache.clearCode sample
Affected platforms
Windows
Platform details
Windows 11
AudioPlayers Version
6.0.0
Build mode
debug, release
Audio Files/URLs/Sources
No response
Screenshots
No response
Logs
Related issues / more information
No response
Working on PR
no way