mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Merge pull request #1304 from Azaezel/alpha41/audiofix2
guiaudio crashfix on exit
This commit is contained in:
commit
2bbd5db767
1 changed files with 28 additions and 28 deletions
|
|
@ -150,6 +150,9 @@ void GuiAudioCtrl::initPersistFields()
|
||||||
|
|
||||||
void GuiAudioCtrl::_update()
|
void GuiAudioCtrl::_update()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (testCondition() && isAwake())
|
||||||
|
{
|
||||||
bool useTrackDescriptionOnly = (mUseTrackDescriptionOnly && getSoundProfile());
|
bool useTrackDescriptionOnly = (mUseTrackDescriptionOnly && getSoundProfile());
|
||||||
|
|
||||||
if (getSoundProfile())
|
if (getSoundProfile())
|
||||||
|
|
@ -160,8 +163,10 @@ void GuiAudioCtrl::_update()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( mSoundPlaying && !mSoundPlaying->isPlaying())
|
||||||
|
{
|
||||||
// The rest only applies if we have a source.
|
// The rest only applies if we have a source.
|
||||||
if (mSoundPlaying && !useTrackDescriptionOnly)
|
if (!useTrackDescriptionOnly)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Set the volume irrespective of the profile.
|
// Set the volume irrespective of the profile.
|
||||||
|
|
@ -180,10 +185,6 @@ void GuiAudioCtrl::_update()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isAwake())
|
|
||||||
{
|
|
||||||
if (testCondition() && mSoundPlaying && !mSoundPlaying->isPlaying())
|
|
||||||
{
|
|
||||||
mSoundPlaying->play();
|
mSoundPlaying->play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -191,7 +192,6 @@ void GuiAudioCtrl::_update()
|
||||||
{
|
{
|
||||||
if (mSoundPlaying != NULL)
|
if (mSoundPlaying != NULL)
|
||||||
{
|
{
|
||||||
mSoundPlaying->stop();
|
|
||||||
SFX_DELETE(mSoundPlaying);
|
SFX_DELETE(mSoundPlaying);
|
||||||
setProcessTicks(false);
|
setProcessTicks(false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue