diff --git a/apps/openmw/mwsound/ffmpeg_decoder.cpp b/apps/openmw/mwsound/ffmpeg_decoder.cpp index 5c64e4dd10..41e25e5b6d 100644 --- a/apps/openmw/mwsound/ffmpeg_decoder.cpp +++ b/apps/openmw/mwsound/ffmpeg_decoder.cpp @@ -36,6 +36,7 @@ FFmpeg_Decoder::FFmpeg_Decoder() FFmpeg_Decoder::~FFmpeg_Decoder() { + Close(); } } diff --git a/apps/openmw/mwsound/mpgsnd_decoder.cpp b/apps/openmw/mwsound/mpgsnd_decoder.cpp index 9b51319dd8..dbe1d0a507 100644 --- a/apps/openmw/mwsound/mpgsnd_decoder.cpp +++ b/apps/openmw/mwsound/mpgsnd_decoder.cpp @@ -118,6 +118,7 @@ MpgSnd_Decoder::MpgSnd_Decoder() : sndFile(NULL), mpgFile(NULL) MpgSnd_Decoder::~MpgSnd_Decoder() { + Close(); } } diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openal_output.cpp index ad21aefbe6..f28b09c077 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openal_output.cpp @@ -332,6 +332,7 @@ Sound* OpenAL_Output::playSound(const std::string &fname, float volume, float pi try { buf = LoadBuffer(decoder); + decoder->Close(); alGenSources(1, &src); throwALerror(); } @@ -380,6 +381,7 @@ Sound* OpenAL_Output::playSound3D(const std::string &fname, const float *pos, fl try { buf = LoadBuffer(decoder); + decoder->Close(); alGenSources(1, &src); throwALerror(); }