Skip to content
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

Proper way to parallelize AudioCache playbacks #388

Closed
emvaized opened this issue Jan 16, 2020 · 2 comments
Closed

Proper way to parallelize AudioCache playbacks #388

emvaized opened this issue Jan 16, 2020 · 2 comments

Comments

@emvaized
Copy link

emvaized commented Jan 16, 2020

Hi, dear community!

In my Flutter game there is a grid of elements, every one of which plays a sound when being tapped. My issue is that when too many taps in a queue are being recognized, the whole app just freezes for a few seconds.
When I disable playing sound on tap, this problem seems to doesn't occur.

So what is the proper way to parallelize AudioCache playbacks in such a cases?
Thanks.

@luanpotter
Copy link
Member

Hi @emvaized , please take a look at my last comment here. You should be able to use a similar solution with audio_pool

@emvaized
Copy link
Author

Hi @emvaized , please take a look at my last comment here. You should be able to use a similar solution with audio_pool

Thank you so much! It seems like a perfect solution to the problem, which I puzzled over for a week -- no freezes yet.

I also will take a closer look to this Flame thing -- seems to be pretty useful for game development.
Thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants