[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17109] trunk/blender/source/creator: only set the SDL audio driver to alsa when not running in background mode and when blender is compiled with SDL .
Campbell Barton
ideasman42 at gmail.com
Sun Oct 19 08:12:11 CEST 2008
Revision: 17109
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17109
Author: campbellbarton
Date: 2008-10-19 08:12:11 +0200 (Sun, 19 Oct 2008)
Log Message:
-----------
only set the SDL audio driver to alsa when not running in background mode and when blender is compiled with SDL.
Modified Paths:
--------------
trunk/blender/source/creator/SConscript
trunk/blender/source/creator/creator.c
Modified: trunk/blender/source/creator/SConscript
===================================================================
--- trunk/blender/source/creator/SConscript 2008-10-19 04:02:37 UTC (rev 17108)
+++ trunk/blender/source/creator/SConscript 2008-10-19 06:12:11 UTC (rev 17109)
@@ -22,4 +22,7 @@
if env['WITH_BF_OPENEXR']==1:
defs.append('WITH_OPENEXR')
+if not env['WITH_BF_SDL']:
+ defs += ' DISABLE_SDL'
+
env.BlenderLib ( libname = 'blender_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 1 )
Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c 2008-10-19 04:02:37 UTC (rev 17108)
+++ trunk/blender/source/creator/creator.c 2008-10-19 06:12:11 UTC (rev 17109)
@@ -237,9 +237,11 @@
printf (" $TEMP\t\tStore temporary files here.\n");
#else
printf (" $TMP or $TMPDIR\tStore temporary files here.\n");
- printf (" $SDL_AUDIODRIVER\tLibSDL audio driver - alsa, esd, alsa, dma.\n");
printf (" $BF_TIFF_LIB\t\tUse an alternative libtiff.so for loading tiff image files.\n");
#endif
+#ifndef DISABLE_SDL
+ printf (" $SDL_AUDIODRIVER\tLibSDL audio driver - alsa, esd, alsa, dma.\n");
+#endif
printf (" $IMAGEEDITOR\t\tImage editor executable, launch with the IKey from the file selector.\n");
printf (" $WINEDITOR\t\tText editor executable, launch with the EKey from the file selector.\n");
printf (" $PYTHONHOME\t\tPath to the python directory, eg. /usr/lib/python.\n");
@@ -326,10 +328,6 @@
#ifdef __linux__
#ifdef __alpha__
signal (SIGFPE, fpe_handler);
- #else
- if ( getenv("SDL_AUDIODRIVER") == NULL) {
- setenv("SDL_AUDIODRIVER", "alsa", 1);
- }
#endif
#endif
#if defined(__sgi)
@@ -432,7 +430,7 @@
/* for all platforms, even windos has it! */
if(G.background) signal(SIGINT, blender_esc); /* ctrl c out bg render */
-
+
/* background render uses this font too */
BKE_font_register_builtin(datatoc_Bfont, datatoc_Bfont_size);
@@ -530,6 +528,15 @@
BLI_where_is_temp( btempdir, 1 ); /* call after loading the .B.blend so we can read U.tempdir */
+#ifndef DISABLE_SDL
+#ifdef __linux__
+ /* On linux the default SDL driver dma often would not play
+ * use alsa if none is set */
+ if ( getenv("SDL_AUDIODRIVER") == NULL) {
+ setenv("SDL_AUDIODRIVER", "alsa", 1);
+ }
+#endif
+#endif
}
else {
BPY_start_python(argc, argv);
More information about the Bf-blender-cvs
mailing list