flutter_soloud
flutter_soloud copied to clipboard
fix: Missing audio on playing a loaded url
Description
A clear and concise description of what the bug is.
Steps To Reproduce
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected Behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional Context
Add any other context about the problem here. I am loading a url from firebase(printed in the above screenshot then calling play on the fetched url but there is no sound. Here is the exception.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter_soloud/src/soloud.dart': Failed assertion: line 579 pos 11: '_activeSounds E/flutter ( 5630): .where((sound) => sound.soundHash == ret.sound!.soundHash) E/flutter ( 5630): .length == E/flutter ( 5630): 1': Sound is already loaded but missing from _activeSounds. This is probably a bug in flutter_soloud, please file.
Hi @chotixity,
I never tried to use FireBase with SoLoud.instance.loadUrl(). It would be nice to see some relevant code you used.
That error could occur if the same url is used more than once when calling the above loadUrl within about 10ms. Maybe you called it while FireBase was getting chunks of the mp3 file?