-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Game starts lagging after 5 minutes of playback on all devices. #16
Comments
Bro Audio player is leaking, like Bullet sound leaks , Please change or optimize audio player. Suggest quick solution soon. |
I got the solution, Use soundpool: ^2.4.1 Library instead of Flame audio. to play quick fire sounds. |
//Here is the update code of AudioPlayerCoponent with sound pool class AudioPlayerComponent extends Component static bool soundEffect = true; static final Map<String, int> _audioPools = {}; static final audiosForPool = ['assets/audio/laser1.wav', 'assets/audio/powerUp6.wav', 'assets/audio/laserSmall_001.wav']; // This method initializes the pool for a specific sound file if it hasn't been initialized yet.
} @OverRide
} void playBgm(String filename) {
} static Future playSfx(String filename) async { void stopBgm() { |
Game starts lagging after 5 minutes of playback on all devices, On low end devices lags start faster and high end devices it takes some time. Please fix this issue and teach us about the same.
The text was updated successfully, but these errors were encountered: