From 9c1f2adb40e034b4129f8b03dbc8fd9bc92f645d Mon Sep 17 00:00:00 2001 From: skyjake Date: Mon, 8 Oct 2012 12:35:25 +0300 Subject: [PATCH] FMOD|Windows: Use the system's configured speaker mode This might help with the 5.1/7.1 and other more refined speaker setups. --- doomsday/plugins/fmod/src/driver_fmod.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doomsday/plugins/fmod/src/driver_fmod.cpp b/doomsday/plugins/fmod/src/driver_fmod.cpp index 19e5ce8bf0..220c5bc5f0 100644 --- a/doomsday/plugins/fmod/src/driver_fmod.cpp +++ b/doomsday/plugins/fmod/src/driver_fmod.cpp @@ -50,6 +50,16 @@ int DS_Init(void) return false; } +#ifdef WIN32 + // Figure out the system's configured speaker mode. + FMOD_SPEAKERMODE speakerMode; + result = fmodSystem->getDriverCaps(0, 0, 0, 0, &speakerMode); + if(result == FMOD_OK) + { + fmodSystem->setSpeakerMode(speakerMode); + } +#endif + // Initialize FMOD. if((result = fmodSystem->init(50, FMOD_INIT_NORMAL | FMOD_INIT_3D_RIGHTHANDED | FMOD_INIT_HRTF_LOWPASS, 0)) != FMOD_OK) {