diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openal_output.cpp index 4aa76cc63..b1359d5f4 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openal_output.cpp @@ -279,34 +279,22 @@ void OpenAL_Sound::update(const float *pos) } -bool OpenAL_Output::init(const std::string &devname) +void OpenAL_Output::init(const std::string &devname) { - if(mContext) - fail("Device already initialized"); + if(mDevice || mContext) + fail("Device already open"); mDevice = alcOpenDevice(devname.c_str()); if(!mDevice) - { - std::cout << "Failed to open \""<init()) + try { + mOutput.reset(new DEFAULT_OUTPUT(*this)); + mOutput->init(); + } + catch(std::exception &e) + { + std::cout <<"Sound init failed: "<