Changed default audio device from SDL to OpenAL after a discussion in IRC, we're...
authorJoerg Mueller <nexyon@gmail.com>
Wed, 26 Aug 2009 08:09:29 +0000 (08:09 +0000)
committerJoerg Mueller <nexyon@gmail.com>
Wed, 26 Aug 2009 08:09:29 +0000 (08:09 +0000)
source/blender/blenkernel/intern/sound.c
source/blender/blenloader/intern/readfile.c

index c6f9db6fda97bdd2d47935a13767eedfdfbd581a..f6fb1ddcc5adf5cbb5b7b6c965e89b17566a462d 100644 (file)
@@ -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()
index aaba65b21af068d22628a0e6bf3229ed66abfa8c..877f23aad923f47c7d8742d1f91083692350b0d7 100644 (file)
@@ -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;