forked from bartvdbraak/blender
only set the SDL audio driver to alsa when not running in background mode and when blender is compiled with SDL.
This commit is contained in:
parent
42e287af1c
commit
c6d1ac3af8
@ -22,4 +22,7 @@ if env['WITH_BF_BINRELOC']==1:
|
||||
if env['WITH_BF_OPENEXR']==1:
|
||||
defs.append('WITH_OPENEXR')
|
||||
|
||||
if not env['WITH_BF_SDL']:
|
||||
defs.append('DISABLE_SDL')
|
||||
|
||||
env.BlenderLib ( libname = 'blender_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 1 )
|
||||
|
@ -237,8 +237,10 @@ static void print_help(void)
|
||||
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");
|
||||
@ -326,10 +328,6 @@ int main(int argc, char **argv)
|
||||
#ifdef __linux__
|
||||
#ifdef __alpha__
|
||||
signal (SIGFPE, fpe_handler);
|
||||
#else
|
||||
if ( getenv("SDL_AUDIODRIVER") == NULL) {
|
||||
setenv("SDL_AUDIODRIVER", "alsa", 1);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__sgi)
|
||||
@ -530,6 +528,15 @@ int main(int argc, char **argv)
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user