Added jack audio support, building with cmake only currently, feel free to add scons...
[blender-staging.git] / intern / audaspace / intern / AUD_C-API.cpp
index 92a499e84b82b9dc3ecf9be73f6a53be5e377289..d2c8e94c94912e5de77bfcdddac1c01a0884e9c1 100644 (file)
  * ***** END LGPL LICENSE BLOCK *****
  */
 
-/*#define WITH_SDL
-#define WITH_FFMPEG
-#define WITH_OPENAL*/
-
 #include "AUD_NULLDevice.h"
 #include "AUD_I3DDevice.h"
 #include "AUD_StreamBufferFactory.h"
 #include "AUD_OpenALDevice.h"
 #endif
 
+#ifdef WITH_JACK
+#include "AUD_JackDevice.h"
+#endif
+
 #ifdef WITH_FFMPEG
 #include "AUD_FFMPEGFactory.h"
 extern "C" {
@@ -97,6 +97,11 @@ int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize)
                case AUD_OPENAL_DEVICE:
                        dev = new AUD_OpenALDevice(specs, buffersize);
                        break;
+#endif
+#ifdef WITH_JACK
+               case AUD_JACK_DEVICE:
+                       dev = new AUD_JackDevice(specs);
+                       break;
 #endif
                default:
                        return false;
@@ -125,6 +130,9 @@ int* AUD_enumDevices()
 #endif
 #ifdef WITH_OPENAL
        AUD_available_devices[i++] = AUD_OPENAL_DEVICE;
+#endif
+#ifdef WITH_JACK
+       AUD_available_devices[i++] = AUD_JACK_DEVICE;
 #endif
        AUD_available_devices[i++] = AUD_NULL_DEVICE;
        return AUD_available_devices;