Fix bug playing assets in LoopingAudioSource

This commit is contained in:
Ryan Heise 2020-08-25 02:42:58 +10:00
parent 1bf6a4aa6d
commit 60760d1010
1 changed files with 6 additions and 0 deletions

View File

@ -1418,6 +1418,12 @@ class LoopingAudioSource extends AudioSource {
this.count,
}) : super();
@override
Future<void> _setup(AudioPlayer player) async {
await super._setup(player);
await child._setup(player);
}
@override
List<IndexedAudioSource> get sequence =>
List.generate(count, (i) => child).expand((s) => s.sequence).toList();