You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import'dart:developer';
import'package:flame_audio/flame_audio.dart';
final $audio =AudioService();
classAudioService {
Future<void> setup() async {
final assets = ['tick.m4a'];
awaitFlameAudio.audioCache.loadAll(assets);
for (final x in assets) {
// this is required to remove drift on first play, loadAll isn't enoughFlameAudio.play(x, volume:0);
}
log(name:'audio', 'warmed up');
}
voidplayTick() =>FlameAudio.play('tick.m4a');
}
The text was updated successfully, but these errors were encountered:
FlameAudio.audioCache.loadAll(..)
does not improve first play jitterYou have to play each of them with a volume of 0 to remove first play jitter
tick.m4a.zip
The text was updated successfully, but these errors were encountered: