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

sometimes sound is interrupted for a few ms #57

Closed
harthorst opened this issue Oct 14, 2018 · 4 comments
Closed

sometimes sound is interrupted for a few ms #57

harthorst opened this issue Oct 14, 2018 · 4 comments

Comments

@harthorst
Copy link

harthorst commented Oct 14, 2018

there are some sound glitches from time to time. in the log I see:

IBufferQueue.c:57: pthread_mutex_lock_timeout_np returned 110

Google says that's a general problem but maybe you have some hints to prevent this. My app is using up to 5% of cpu power and I'm working with SampleEvents only.

@igorski
Copy link
Owner

igorski commented Oct 17, 2018

Hi, this is a tough one to crack as it lies outside of the engine's reach.
The fact that your app is very low on CPU resources would indicate that there is no issue with threading priority, can you do the same check for memory allocation using a profiler (the one in Android Studio is great for this) ? Also, can you verify whether there are other applications in the background that could be generating audio (most other music making applications could be expected to use OpenSL as well). This is also the reason why the ExampleActivity for MWEngine releases the OpenSL callback when suspending the app.

@harthorst
Copy link
Author

Hi. Memory usage is about 29-30MB. I'm also sure the reason for this problem lies outside of the app. After I uninstalled some apps and restarted the phone it was much better.

@igorski igorski closed this as completed Nov 6, 2018
@teotigraphix
Copy link
Contributor

I have this as well testing on Nexus 7 2nd Gen.

I profiled and memory and CPU seem fine, CPU for the app is not even about 5-10%.

This was also with nothing running(apps in background)

@harthorst
Copy link
Author

Just for the record: Increasing buffer size helped a lot.

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

3 participants