diff --git a/SConstruct b/SConstruct index 6dda1356d5..2e7d83376b 100644 --- a/SConstruct +++ b/SConstruct @@ -107,7 +107,7 @@ vars.AddVariables( BoolVariable('bundle', 'Set to create bundle', False), BoolVariable('lint', 'Set for lint build (extra warnings)', False), BoolVariable('nowx', 'Set For Building with no WX libs (WIP)', False), - BoolVariable('noal', 'Build without OpenAL', False), + BoolVariable('openal', 'Build with OpenAL', False), BoolVariable('noao', 'Build without AO', False), BoolVariable('wxgl', 'Set For Building with WX GL libs (WIP)', False), BoolVariable('jittest', 'temp don\'t use (WIP)', False), @@ -246,27 +246,25 @@ env['HAVE_SDL'] = conf.CheckSDL('1.0.0') env['HAVE_BLUEZ'] = conf.CheckPKG('bluez') # needed for sound -if env['noao']: - env['HAVE_AO'] = 0 -else: +env['HAVE_AO'] = 0 +if not env['noao']: env['HAVE_AO'] = conf.CheckPKG('ao') -if env['noal']: - env['HAVE_OPENAL'] = 0 -else: + +env['HAVE_OPENAL'] = 0 +if env['openal']: env['HAVE_OPENAL'] = conf.CheckPKG('openal') + env['HAVE_ALSA'] = conf.CheckPKG('alsa') # OpenCL +env['HAVE_OPENCL'] = 0 if env['opencl']: - env['HAVE_OPENCL'] = 1 -else: - env['HAVE_OPENCL'] = 0 + env['HAVE_OPENCL'] = conf.CheckPKG('OpenCL') +env['HAVE_PORTAUDIO'] = 0 if sys.platform != 'darwin': # needed for mic env['HAVE_PORTAUDIO'] = conf.CheckPortaudio(1890) -else: - env['HAVE_PORTAUDIO'] = 0 # sfml env['HAVE_SFML'] = 0 diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp index bce356d7bf..a186c5cbaf 100644 --- a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp +++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp @@ -24,13 +24,13 @@ void AudioCommonConfig::Load(IniFile &file) { file.Get("Config", "EnableThrottle", &m_EnableThrottle, true); file.Get("Config", "Volume", &m_Volume, 75); #ifdef _WIN32 - file.Get("Config", "Backend", &sBackend, "DSound"); + file.Get("Config", "Backend", &sBackend, BACKEND_DIRECTSOUND); #elif defined(__APPLE__) std::string temp; - file.Get("Config", "Backend", &temp, "CoreAudio"); + file.Get("Config", "Backend", &temp, BACKEND_COREAUDIO); strncpy(sBackend, temp.c_str(), 128); -#else - file.Get("Config", "Backend", &sBackend, "AOSound"); +#else // linux + file.Get("Config", "Backend", &sBackend, BACKEND_ALSA); #endif } diff --git a/Source/Core/AudioCommon/Src/SConscript b/Source/Core/AudioCommon/Src/SConscript index a206f5b39b..4adfaaf973 100644 --- a/Source/Core/AudioCommon/Src/SConscript +++ b/Source/Core/AudioCommon/Src/SConscript @@ -22,6 +22,7 @@ if acenv['HAVE_AO']: if acenv['HAVE_ALSA']: files += [ 'AlsaSoundStream.cpp' ] + if sys.platform == 'darwin': files += [ 'CoreAudioSoundStream.cpp' ] acenv['FRAMEWORKS'] = [ 'CoreAudio' ]