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

On iOS, audio skips when suspending and resuming #2887

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

On iOS, audio skips when suspending and resuming #2887

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.8
Reported for operating system, platform: iOS 11, iPhone/iPod touch

Comments on the original bug report:

On 2018-05-04 17:48:12 +0000, philhassey wrote:

Created attachment 3236
audio thread priority patch

I've noticed that the audio skips really badly during suspending and resuming on iOS. Sometimes it skips other times as well.

This issue is new to versions of SDL2 that use core audio.

I'm using these settings:

want.freq = 44100;
want.format = AUDIO_F32SYS;
want.channels = 2;
want.samples = 1024;

I've attached a patch that sets the audio thread priority to HIGH which largely resolves the issue.

On 2018-05-05 17:37:05 +0000, Sam Lantinga wrote:

The iOS audio code has been changed, can you check the latest version and see if the issue still happens, and if so, can you provide an updated patch?
http://www.libsdl.org/tmp/SDL-2.0.zip

Thanks!

On 2018-05-05 18:30:35 +0000, philhassey wrote:

The coreaudio code contained in SDL-2.0.8-11956 appears to resolve the issue. Thanks!

On 2018-05-06 02:11:32 +0000, Sam Lantinga wrote:

You're welcome!

On 2019-03-25 17:00:33 +0000, Ryan C. Gordon wrote:

Just backed out the code that solved this previously, so this commit should also fix this for 2.0.10, if you find yourself in a position to verify the latest in revision control: https://hg.libsdl.org/SDL/rev/a7b99312d9f3

--ryan.

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

1 participant