[Scummvm-git-logs] scummvm master -> 90636b367eb655699de8414ba855045627eec63f

dreammaster dreammaster at scummvm.org
Tue Sep 26 01:41:55 CEST 2017


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:
90636b367e TITANIC: Free wave files on game exit like original does


Commit: 90636b367eb655699de8414ba855045627eec63f
    https://github.com/scummvm/scummvm/commit/90636b367eb655699de8414ba855045627eec63f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-09-25T19:41:46-04:00

Commit Message:
TITANIC: Free wave files on game exit like original does

Changed paths:
    engines/titanic/sound/qmixer.cpp
    engines/titanic/sound/qmixer.h
    engines/titanic/sound/sound.cpp
    engines/titanic/sound/sound.h


diff --git a/engines/titanic/sound/qmixer.cpp b/engines/titanic/sound/qmixer.cpp
index a1091a9..f373b19 100644
--- a/engines/titanic/sound/qmixer.cpp
+++ b/engines/titanic/sound/qmixer.cpp
@@ -241,11 +241,6 @@ void QMixer::qsWaveMixPump() {
 
 /*------------------------------------------------------------------------*/
 
-QMixer::ChannelEntry::~ChannelEntry() {
-	for (Common::List<SoundEntry>::iterator i = _sounds.begin(); i != _sounds.end(); ++i)
-		delete (*i)._waveFile;
-}
-
 byte QMixer::ChannelEntry::getRawVolume() const {
 	// Emperically decided adjustment divisor for distances
 	const double ADJUSTMENT_FACTOR = 5.0;
diff --git a/engines/titanic/sound/qmixer.h b/engines/titanic/sound/qmixer.h
index c6d7fcd..2241521 100644
--- a/engines/titanic/sound/qmixer.h
+++ b/engines/titanic/sound/qmixer.h
@@ -204,7 +204,6 @@ class QMixer {
 		ChannelEntry() : _volume(0), _panRate(0), _volumeChangeStart(0),
 			_volumeChangeEnd(0), _volumeStart(0), _volumeEnd(0),
 			_distance(0.0), _resetDistance(true) {}
-		~ChannelEntry();
 
 		/**
 		 * Calculates the raw volume level to pass to ScummVM playStream, taking
diff --git a/engines/titanic/sound/sound.cpp b/engines/titanic/sound/sound.cpp
index befe1a8..3c5801e 100644
--- a/engines/titanic/sound/sound.cpp
+++ b/engines/titanic/sound/sound.cpp
@@ -26,6 +26,12 @@
 
 namespace Titanic {
 
+CSoundItem::~CSoundItem() {
+	delete _waveFile;
+}
+
+/*------------------------------------------------------------------------*/
+
 CSound::CSound(CGameManager *owner, Audio::Mixer *mixer) :
 		_gameManager(owner), _soundManager(mixer) {
 	g_vm->_movieManager.setSoundManager(&_soundManager);
diff --git a/engines/titanic/sound/sound.h b/engines/titanic/sound/sound.h
index c767a3d..ee2b8cc 100644
--- a/engines/titanic/sound/sound.h
+++ b/engines/titanic/sound/sound.h
@@ -52,6 +52,7 @@ public:
 	CSoundItem(File *dialogueFile, int speechId) : ListItem(), _waveFile(nullptr),
 		_dialogueFileHandle(dialogueFile), _speechId(speechId), _active(false),
 		_disposeAfterUse(DisposeAfterUse::NO) {}
+	virtual ~CSoundItem();
 };
 
 class CSoundItemList : public List<CSoundItem> {





More information about the Scummvm-git-logs mailing list