mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 21:45:32 +00:00
Fix 'maybe-uninitialized' warning in openal_output
This commit is contained in:
parent
df459199dd
commit
e5db5e2651
1 changed files with 5 additions and 3 deletions
|
@ -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…
Reference in a new issue