Remove ifdef's default audio device
authorCampbell Barton <ideasman42@gmail.com>
Wed, 12 Sep 2018 09:45:43 +0000 (19:45 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 12 Sep 2018 09:49:25 +0000 (19:49 +1000)
If we want to select an audio device based on build flags,
it should be done as a final step.

source/blender/blenloader/intern/versioning_userdef.c

index e888c23cd0a47fe293e30692dd0f2b5b4e5e8c61..d077784a361e2749ee29dcb3c3d9bd5221e2d6e1 100644 (file)
@@ -135,12 +135,7 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
                if (userdef->audiochannels == 0)
                        userdef->audiochannels = 2;
                if (userdef->audiodevice == 0) {
-#ifdef WITH_OPENAL
-                       userdef->audiodevice = 2;
-#endif
-#ifdef WITH_SDL
-                       userdef->audiodevice = 1;
-#endif
+                       userdef->audiodevice = 2;  /* OpenAL */
                }
                if (userdef->audioformat == 0)
                        userdef->audioformat = 0x24;