We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3868 - Delay after calling SDL_CloseAudioDevice
Summary: Delay after calling SDL_CloseAudioDevice
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: audio (show other bugs)
Version: 2.0.6
Hardware: x86_64 Mac OS X 10.9
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-10 06:06 UTC by Andreas
Modified: 2017-10-14 19:03 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas 2017-10-10 06:06:19 UTC
Calling SDL_CloseAudioDevice with valid SDL_AudioDeviceID causes a delay of multiple (> 10) seconds. The bug was not present in SDL v2.0.5. Affected machine is iMac, early 2009 running Mac OS X v10.9.5. No other hardware or OS tested.
Comment 1 Eric Scrivner 2017-10-12 18:42:00 UTC
Can confirm and reproduce this issue on OS X Sierra. Also, can add that this only happens when AudioSpec.samples < 1024. At 1024 or higher, calling CloseAudioDevice is nearly instantaneous.
Comment 2 Ryan C. Gordon 2017-10-13 05:18:10 UTC
This is fixed now, in https://hg.libsdl.org/SDL/rev/9658d3a4b03a ...if you have a chance, please test the latest in Mercurial, because we're planning to ship a 2.0.7 release very soon with this fix, and I'd like to know it solves your problem.

Thanks!

--ryan.
Comment 3 Andreas 2017-10-14 07:58:44 UTC
Thank you, Ryan! I just compiled the latest SDL2 code and can confirm that the delay is gone.
Comment 4 Eric Scrivner 2017-10-14 19:03:52 UTC
Ryan: Wow, thank you for the quick fix! Downloaded and can also confirm that this issue is no longer happening.