Open Horschig opened 11 months ago
When having played an audio file with releasemode release, the file handle is inaccessible e.g. for overwriting the file.
release
Releasing should properly release the file handle, allowing all file access including overwriting the played file.
flutter run
Windows
Windows 11 (10.0.22621)
^1.1.1
debug
See here for zipped assets: soundfiles.zip
Cannot upload raw wav files btw:
(sorry for the potato language):
my relevant logs
Rebo on Discord thoughtto have solved it with: https://github.com/bluefireteam/audioplayers/pull/1517/files#diff-9bd303c19c9f1e11702b5b6541381f0910cca3c459576aa8a215b0c880a0ab79R342
no way
Note that we haven't implemented the ReleasMode.release properly, see the parity table. Calling release on the player manually may should work.
ReleasMode.release
This should be easy to implement though.
Checklist
Current bug behaviour
When having played an audio file with releasemode
release
, the file handle is inaccessible e.g. for overwriting the file.Expected behaviour
Releasing should properly release the file handle, allowing all file access including overwriting the played file.
Steps to reproduce
flutter run
on the code audiotestappx.zipCode sample
Code sample
In main.dart, call ```dart ... await MyWaveBuilder.exampleAppend(); final Directory tempDir = await getTemporaryDirectory(); final String tempFile = '${tempDir.absolute.path}/out.wav'; MyAudioPlayer.play(tempFile); ``` MyWaveBuilder: ```dart import 'dart:io'; import 'dart:math'; import 'package:wave_builder/wave_builder.dart'; import 'package:path_provider/path_provider.dart'; class MyWaveBuilder { /// Create 1 bar of a 4 random beats static FutureAffected platforms
Windows
Platform details
Windows 11 (10.0.22621)
AudioPlayers Version
^1.1.1
Build mode
debug
Audio Files/URLs/Sources
See here for zipped assets: soundfiles.zip
Cannot upload raw wav files btw:
Screenshots
(sorry for the potato language):
Logs
Full Logs
``` my full logs or a link to a gist ``` Flutter doctor: ``` Output of: flutter doctor -v ```Related issues / more information
Rebo on Discord thoughtto have solved it with: https://github.com/bluefireteam/audioplayers/pull/1517/files#diff-9bd303c19c9f1e11702b5b6541381f0910cca3c459576aa8a215b0c880a0ab79R342
Working on PR
no way