- change max threads from 8 to 64, need to keep an eye on stack memory use here.
[blender.git] / source / blender / blenkernel / intern / sound.c
index d8950c7daced33acfcec18c595f32bba538fadb5..3232e2677b53ea255afa38a2ba0a868e40be2ac8 100644 (file)
 #include <config.h>
 #endif
 
+static int sound_disabled = 0;
+
+void sound_disable()
+{
+       sound_disabled = 1;
+}
+
 void sound_init()
 {
-       AUD_Specs specs;
+       AUD_DeviceSpecs specs;
        int device, buffersize;
 
        device = U.audiodevice;
@@ -42,6 +49,9 @@ void sound_init()
        specs.format = U.audioformat;
        specs.rate = U.audiorate;
 
+       if (sound_disabled)
+               device = 0;
+
        if(buffersize < 128)
                buffersize = AUD_DEFAULT_BUFFER_SIZE;
 
@@ -445,7 +455,7 @@ void sound_scrub(struct bContext *C)
        }
 }
 
-AUD_Device* sound_mixdown(struct Scene *scene, AUD_Specs specs, int start, int end, float volume)
+AUD_Device* sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, int end, float volume)
 {
        AUD_Device* mixdown = AUD_openReadDevice(specs);
        SoundHandle *handle;