OSX: Add a framework-check for Jack to avoid crashes

This commit is contained in:
Jens Verwiebe
2011-12-14 06:15:52 +00:00
parent a7823dda69
commit 7d9a8c2308
2 changed files with 14 additions and 0 deletions

View File

@@ -25,6 +25,8 @@ if env['WITH_BF_JACK']:
sources += env.Glob('jack/*.cpp')
incs += ' jack ' + env['BF_JACK_INC']
defs.append('WITH_JACK')
if env['OURPLATFORM'] == 'darwin':
incs += ' ' + env['BF_BOOST_INC']
if env['WITH_BF_SNDFILE']:
sources += env.Glob('sndfile/*.cpp')

View File

@@ -78,6 +78,9 @@
#ifdef WITH_JACK
#include "AUD_JackDevice.h"
#ifdef __APPLE__
#include <boost/filesystem/operations.hpp>
#endif
#endif
@@ -137,8 +140,17 @@ int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize)
#endif
#ifdef WITH_JACK
case AUD_JACK_DEVICE:
#ifdef __APPLE__
if (!boost::filesystem::exists("/Library/Frameworks/Jackmp.framework")){
printf("Warning: Jack Framework not available\n");
break;
} else {
#endif
dev = new AUD_JackDevice("Blender", specs, buffersize);
break;
#ifdef __APPLE__
}
#endif
#endif
default:
return false;