Merge branch 'feat/better-audio-pool' of github.com:VGVentures/pinball into feat/better-audio-pool

pull/461/head
Erick Zanardo 3 years ago
commit 1e46b20464

@ -38,17 +38,17 @@ class PinballAudioPool {
/// Function to play audios.
final PlaySingleAudio playSingleAudio;
/// How long the sound last.
/// How long the sound lasts.
final Duration duration;
final List<_PlayerEntry> _players = [];
/// Loads the pool
/// Loads the pool.
Future<void> load() async {
await preCacheSingleAudio(path);
}
/// Plays the pool
/// Plays the pool.
Future<void> play({double volume = 1}) async {
AudioPlayer? player;
if (_players.length < poolSize) {

Loading…
Cancel
Save