Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2009-12-07 23:39:57 +0300
committerMartin Poirier <theeth@yahoo.com>2009-12-07 23:39:57 +0300
commitf350cde18c2103d6a78e4d5d14f9b57cbaab1a1e (patch)
treecd8ef1b2a3531fc7982e55c5fa590cac869db2a2 /source/blender/blenkernel/intern/sound.c
parent16ec4cc18606f21e6215a5ddcd0223e38340ff62 (diff)
-noaudio option to force the sound system to None.
Useful when openAL is not setup properly (*cough* pulseaudio *cough) and prevents startup. This doesn't actually affect the userpref option, so you can set it to whatever you want, save userprefs and restart.
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r--source/blender/blenkernel/intern/sound.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index d8950c7dace..74c6afdc018 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -31,6 +31,13 @@
#include <config.h>
#endif
+static int sound_disabled = 0;
+
+void sound_disable()
+{
+ sound_disabled = 1;
+}
+
void sound_init()
{
AUD_Specs specs;
@@ -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;