From 36b85d4508106752b0595fcb5150fd19f90b8739 Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Wed, 26 Aug 2009 08:09:29 +0000 Subject: [PATCH] Changed default audio device from SDL to OpenAL after a discussion in IRC, we're testing if OpenAL works flawlessly on all plattforms and if so we'll keep it as default device as it supports 3D Audio for the GE what SDL doesn't. --- source/blender/blenkernel/intern/sound.c | 13 +++---------- source/blender/blenloader/intern/readfile.c | 6 +++--- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index c6f9db6fda9..f6fb1ddcc5a 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -34,7 +34,7 @@ void sound_init() { AUD_Specs specs; - int device, buffersize, success; + int device, buffersize; device = U.audiodevice; buffersize = U.mixbufsize; @@ -54,15 +54,8 @@ void sound_init() if(specs.channels <= AUD_CHANNELS_INVALID) specs.channels = AUD_CHANNELS_STEREO; - if(!AUD_init(device, specs, buffersize)) { - if(device == AUD_SDL_DEVICE) - success= AUD_init(AUD_OPENAL_DEVICE, specs, AUD_DEFAULT_BUFFER_SIZE*4); - else - success= AUD_init(AUD_SDL_DEVICE, specs, AUD_DEFAULT_BUFFER_SIZE*4); - - if(!success) - AUD_init(AUD_NULL_DEVICE, specs, buffersize); - } + if(!AUD_init(device, specs, buffersize)) + AUD_init(AUD_NULL_DEVICE, specs, buffersize); } void sound_exit() diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index aaba65b21af..877f23aad92 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -9675,13 +9675,13 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead) bfd->user->uifonts.first= bfd->user->uifonts.last= NULL; bfd->user->uistyles.first= bfd->user->uistyles.last= NULL; - // AUD_XXX + // AUD_XXX that's bad because if the user has saved No Audio, it changes to OpenAL always if(bfd->user->audiochannels == 0) bfd->user->audiochannels = 2; if(bfd->user->audiodevice == 0) - bfd->user->audiodevice = 1; + bfd->user->audiodevice = 2; if(bfd->user->audioformat == 0) - bfd->user->audioformat = 0x12; + bfd->user->audioformat = 0x24; if(bfd->user->audiorate == 0) bfd->user->audiorate = 44100;