diff --git a/src/audio/music_manager.cpp b/src/audio/music_manager.cpp index b1894c58f..2886be1e9 100644 --- a/src/audio/music_manager.cpp +++ b/src/audio/music_manager.cpp @@ -48,6 +48,15 @@ MusicManager::MusicManager() //FIXME: I'm not sure that this code goes here #if HAVE_OGGVORBIS + +#if defined(__APPLE__) && !defined(NDEBUG) + // HACK: On OSX, when OpenAL is initialized, breaking in a debugger causes + // my iTunes music to stop too, which is highly annoying ;) so in debug + // mode, require a restart to enable sound + if (UserConfigParams::m_sfx || UserConfigParams::m_music) + { +#endif + ALCdevice* device = alcOpenDevice ( NULL ); //The default sound device if( device == NULL ) { @@ -70,6 +79,10 @@ MusicManager::MusicManager() m_initialized = true; } } + +#if defined(__APPLE__) && !defined(NDEBUG) + } +#endif alGetError(); //Called here to clear any non-important errors found #endif