Fix 'maybe-uninitialized' warning in openal_output

0.6.3
Andrei Kortunov 7 years ago
parent df459199dd
commit e5db5e2651

@ -951,10 +951,11 @@ std::pair<Sound_Handle,size_t> OpenAL_Output::loadSound(const std::string &fname
getALError();
std::vector<char> data;
ALenum format;
ALenum format = AL_NONE;
int srate;
try {
try
{
DecoderPtr decoder = mManager.getDecoder();
// Workaround: Bethesda at some point converted some of the files to mp3, but the references were kept as .wav.
if(decoder->mResourceMgr->exists(fname))
@ -974,7 +975,8 @@ std::pair<Sound_Handle,size_t> OpenAL_Output::loadSound(const std::string &fname
format = getALFormat(chans, type);
if(format) decoder->readAll(data);
}
catch(std::exception &e) {
catch(std::exception &e)
{
std::cerr<< "Failed to load audio from "<<fname<<": "<<e.what() <<std::endl;
}

Loading…
Cancel
Save