AudioManager constructor
AudioManager({
- int sfxPoolCapacity = 6,
ENH-79: how many AudioPlayers playSfx keeps warm and reuses for
one-shot SFX, instead of creating (and disposing) a fresh native
audio channel on every single call — a combo/win-streak casual game
firing 15-20 SFX/second would otherwise open that many concurrent
native channels, which can stutter/drop audio on a low-end Android
device. A burst beyond sfxPoolCapacity still always plays (never
refused/dropped) — ObjectPool just disposes the excess instead of
retaining it, so the pool's resting size never grows past this.
Implementation
AudioManager({this.sfxPoolCapacity = 6});