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

Playing stops on Android when playing 2 sounds #49

Closed
ahaboubi opened this issue Oct 16, 2020 · 2 comments
Closed

Playing stops on Android when playing 2 sounds #49

ahaboubi opened this issue Oct 16, 2020 · 2 comments

Comments

@ahaboubi
Copy link

When playing a long sound (e.g. background music), and a second sound is played (like a notification), the first sound is stopped abruptly.

This issue is only present on Android. Works fine on iOS.

I'm using version 1.1.2.

@ukasz123
Copy link
Owner

Immediate solution would be either:

  • set maxStreams in Soundpool constructor - it controls how many sounds can be played simultanously (if that helps then it means there is a bug on iOS).
  • use separate Soundpools for notifications and background sound.

@ahaboubi
Copy link
Author

Setting maxStreams works like a charm!

Thanks.

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