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:
-rw-r--r--source/blender/blenkernel/BKE_sound.h2
-rw-r--r--source/blender/blenkernel/intern/sound.c10
-rw-r--r--source/creator/creator.c6
3 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h
index cbce4663d6f..64ce1983e7d 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -41,6 +41,8 @@ void sound_init();
void sound_exit();
+void sound_disable();
+
struct bSound* sound_new_file(struct Main *main, char* filename);
// XXX unused currently
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;
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 3a9ee9859e8..b6c08582144 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -62,6 +62,7 @@
#include "BKE_scene.h"
#include "BKE_node.h"
#include "BKE_report.h"
+#include "BKE_sound.h"
#include "IMB_imbuf.h" // for quicktime_init
@@ -219,6 +220,7 @@ static void print_help(void)
printf (" -d\t\tTurn debugging on\n");
printf (" -nojoystick\tDisable joystick support\n");
printf (" -noglsl\tDisable GLSL shading\n");
+ printf (" -noaudio\tForce sound system to None\n");
printf (" -h\t\tPrint this help text\n");
printf (" -y\t\tDisable automatic python script execution (pydrivers, pyconstraints, pynodes)\n");
printf (" -P <filename>\tRun the given Python script (filename or Blender Text)\n");
@@ -482,8 +484,10 @@ int main(int argc, char **argv)
SYS_WriteCommandLineInt(syshandle,"nojoystick",1);
if (G.f & G_DEBUG) printf("disabling nojoystick\n");
}
- if (BLI_strcasecmp(argv[a], "-noglsl") == 0)
+ else if (BLI_strcasecmp(argv[a], "-noglsl") == 0)
GPU_extensions_disable();
+ else if (BLI_strcasecmp(argv[a], "-noaudio") == 0)
+ sound_disable();
break;
}
}