diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-12-07 23:39:57 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-12-07 23:39:57 +0300 |
commit | f350cde18c2103d6a78e4d5d14f9b57cbaab1a1e (patch) | |
tree | cd8ef1b2a3531fc7982e55c5fa590cac869db2a2 /source/blender/blenkernel/intern/sound.c | |
parent | 16ec4cc18606f21e6215a5ddcd0223e38340ff62 (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.c | 10 |
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; |