[Scummvm-git-logs] scummvm master -> 3d0f922f7bdb1388f797aa55a8a4f67ea7f7960b
dreammaster
dreammaster at scummvm.org
Sat Sep 3 16:49:19 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3d0f922f7b TITANIC: Further conversion of free flags to DisposeAfterUse
Commit: 3d0f922f7bdb1388f797aa55a8a4f67ea7f7960b
https://github.com/scummvm/scummvm/commit/3d0f922f7bdb1388f797aa55a8a4f67ea7f7960b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-09-03T10:49:03-04:00
Commit Message:
TITANIC: Further conversion of free flags to DisposeAfterUse
Changed paths:
engines/titanic/sound/proximity.cpp
engines/titanic/sound/proximity.h
engines/titanic/sound/sound.cpp
engines/titanic/sound/sound_manager.cpp
diff --git a/engines/titanic/sound/proximity.cpp b/engines/titanic/sound/proximity.cpp
index 517f222..ee1cd3e 100644
--- a/engines/titanic/sound/proximity.cpp
+++ b/engines/titanic/sound/proximity.cpp
@@ -31,7 +31,7 @@ CProximity::CProximity() : _channelVolume(100), _balance(0),
_azimuth(0.0), _range(0.5), _elevation(0),
_posX(0.0), _posY(0.0), _posZ(0.0),
_hasVelocity(false), _velocityX(0), _velocityY(0), _velocityZ(0),
- _freeSoundFlag(false), _endTalkerFn(nullptr), _talker(nullptr),
+ _disposeAfterUse(DisposeAfterUse::NO), _endTalkerFn(nullptr), _talker(nullptr),
_soundDuration(0), _soundType(Audio::Mixer::kPlainSoundType) {
}
diff --git a/engines/titanic/sound/proximity.h b/engines/titanic/sound/proximity.h
index 06fd2b1..2f07452 100644
--- a/engines/titanic/sound/proximity.h
+++ b/engines/titanic/sound/proximity.h
@@ -54,7 +54,7 @@ public:
double _velocityX;
double _velocityY;
double _velocityZ;
- bool _freeSoundFlag;
+ DisposeAfterUse::Flag _disposeAfterUse;
CEndTalkerFn _endTalkerFn;
TTtalker *_talker;
uint _soundDuration;
diff --git a/engines/titanic/sound/sound.cpp b/engines/titanic/sound/sound.cpp
index 998a0a9..3288c4f 100644
--- a/engines/titanic/sound/sound.cpp
+++ b/engines/titanic/sound/sound.cpp
@@ -163,8 +163,7 @@ int CSound::playSound(const CString &name, CProximity &prox) {
if (prox._soundType != Audio::Mixer::kPlainSoundType)
waveFile->_soundType = prox._soundType;
- activateSound(waveFile, prox._freeSoundFlag ? DisposeAfterUse::YES :
- DisposeAfterUse::NO);
+ activateSound(waveFile, prox._disposeAfterUse);
return _soundManager.playSound(*waveFile, prox);
}
@@ -211,7 +210,7 @@ int CSound::playSpeech(CDialogueFile *dialogueFile, int speechId, CProximity &pr
return -1;
prox._soundDuration = waveFile->getDuration();
- activateSound(waveFile, prox._freeSoundFlag ? DisposeAfterUse::YES : DisposeAfterUse::NO);
+ activateSound(waveFile, prox._disposeAfterUse);
return _soundManager.playSound(*waveFile, prox);
}
diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp
index fb55e7d..1fb0c73 100644
--- a/engines/titanic/sound/sound_manager.cpp
+++ b/engines/titanic/sound/sound_manager.cpp
@@ -419,7 +419,7 @@ int QSoundManager::playWave(CWaveFile *waveFile, int iChannel, uint flags, CProx
return slot._handle;
} else {
_sounds.flushChannel(waveFile, iChannel);
- if (prox._freeSoundFlag)
+ if (prox._disposeAfterUse == DisposeAfterUse::YES)
delete waveFile;
return 0;
}
More information about the Scummvm-git-logs
mailing list