mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 23:21:20 -04:00
Make sure the sound decoders are closed when they're finished with
This commit is contained in:
parent
362e254720
commit
9656456d30
@ -36,6 +36,7 @@ FFmpeg_Decoder::FFmpeg_Decoder()
|
|||||||
|
|
||||||
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()
|
MpgSnd_Decoder::~MpgSnd_Decoder()
|
||||||
{
|
{
|
||||||
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -332,6 +332,7 @@ Sound* OpenAL_Output::playSound(const std::string &fname, float volume, float pi
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
buf = LoadBuffer(decoder);
|
buf = LoadBuffer(decoder);
|
||||||
|
decoder->Close();
|
||||||
alGenSources(1, &src);
|
alGenSources(1, &src);
|
||||||
throwALerror();
|
throwALerror();
|
||||||
}
|
}
|
||||||
@ -380,6 +381,7 @@ Sound* OpenAL_Output::playSound3D(const std::string &fname, const float *pos, fl
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
buf = LoadBuffer(decoder);
|
buf = LoadBuffer(decoder);
|
||||||
|
decoder->Close();
|
||||||
alGenSources(1, &src);
|
alGenSources(1, &src);
|
||||||
throwALerror();
|
throwALerror();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user