mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-22 10:23:53 +00:00
Make sure the sound decoders are closed when they're finished with
This commit is contained in:
parent
362e254720
commit
9656456d30
3 changed files with 4 additions and 0 deletions
|
@ -36,6 +36,7 @@ FFmpeg_Decoder::FFmpeg_Decoder()
|
|||
|
||||
FFmpeg_Decoder::~FFmpeg_Decoder()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -118,6 +118,7 @@ MpgSnd_Decoder::MpgSnd_Decoder() : sndFile(NULL), mpgFile(NULL)
|
|||
|
||||
MpgSnd_Decoder::~MpgSnd_Decoder()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue