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 2715

Summary: Audio Subsystem doesn't initialize on OSX
Product: SDL Reporter: Alexander Ames <alexander.ames>
Component: audioAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.3   
Hardware: x86   
OS: Mac OS X 10.8   

Description Alexander Ames 2014-09-03 22:25:35 UTC
When compiling on OSX, the audio subsystem fails to initialize. This appears to be due to the fact that in SDL_AUDIO_DRIVER_COREAUDIO is never set in the CMakeLists file. This variable is needed so that the generated config file will have the #define set for it which is needed by SDL_audio.c. Without that #define set, the list of AudioBootstraps will not include COREAUDIO_bootstrap and thus fail to initialize. 

I suspect that this whole section of the CMakeLists file is intended to be rewritten due to the comments in the file ("TODO: rework this for proper MacOS X, iOS and Darwin support"), but I didn't see an existing bug filed for this problem so I went ahead and filed one. 

As a temporary workaround, I've added this to my own CMakeLists.txt:

if(APPLE)
  set(SDL_AUDIO_DRIVER_COREAUDIO 1)
endif(APPLE)
Comment 1 Ryan C. Gordon 2015-02-19 06:16:00 UTC
This was just fixed recently in revision control.

--ryan.