From 2f0af42261ca048d20034e7273a32b92494aa545 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 22 Mar 2012 23:51:00 -0700 Subject: [PATCH] Use the ALC_ENUMERATE_ALL_EXT extension with OpenAL when available --- apps/openmw/mwsound/openal_output.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openal_output.cpp index 456ee534c..b9a32d57c 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openal_output.cpp @@ -363,7 +363,10 @@ std::vector OpenAL_Output::enumerate() std::vector devlist; const ALCchar *devnames; - devnames = alcGetString(NULL, ALC_DEVICE_SPECIFIER); + if(alcIsExtensionPresent(NULL, "ALC_ENUMERATE_ALL_EXT")) + devnames = alcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER); + else + devnames = alcGetString(NULL, ALC_DEVICE_SPECIFIER); while(devnames && *devnames) { devlist.push_back(devnames); @@ -380,7 +383,10 @@ void OpenAL_Output::init(const std::string &devname) mDevice = alcOpenDevice(devname.c_str()); if(!mDevice) fail("Failed to open \""+devname+"\""); - std::cout << "Opened \""<