[Scummvm-cvs-logs] SF.net SVN: scummvm:[53025] scummvm/branches/branch-1-2-0/engines/queen/ sound.cpp

agent-q at users.sourceforge.net agent-q at users.sourceforge.net
Tue Oct 5 01:12:36 CEST 2010


Revision: 53025
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53025&view=rev
Author:   agent-q
Date:     2010-10-04 23:12:35 +0000 (Mon, 04 Oct 2010)

Log Message:
-----------
FOTAQ: Reverted my earlier commit.  There was no memory leak and I left some printf's in as well.

Modified Paths:
--------------
    scummvm/branches/branch-1-2-0/engines/queen/sound.cpp

Modified: scummvm/branches/branch-1-2-0/engines/queen/sound.cpp
===================================================================
--- scummvm/branches/branch-1-2-0/engines/queen/sound.cpp	2010-10-04 22:44:34 UTC (rev 53024)
+++ scummvm/branches/branch-1-2-0/engines/queen/sound.cpp	2010-10-04 23:12:35 UTC (rev 53025)
@@ -77,7 +77,7 @@
 		else
 			_rate = rate;
 	}
-	virtual ~AudioStreamWrapper() {
+	~AudioStreamWrapper() {
 		delete _stream;
 	}
 	int readBuffer(int16 *buffer, const int numSamples) {
@@ -119,7 +119,6 @@
 	MP3Sound(Audio::Mixer *mixer, QueenEngine *vm) : PCSound(mixer, vm) {}
 protected:
 	void playSoundData(Common::File *f, uint32 size, Audio::SoundHandle *soundHandle) {
-		consolePrintf("Mp3 sound\n");
 		Common::MemoryReadStream *tmp = f->readStream(size);
 		assert(tmp);
 		_mixer->playStream(Audio::Mixer::kSFXSoundType, soundHandle, new AudioStreamWrapper(Audio::makeMP3Stream(tmp, DisposeAfterUse::YES)));
@@ -133,7 +132,6 @@
 	OGGSound(Audio::Mixer *mixer, QueenEngine *vm) : PCSound(mixer, vm) {}
 protected:
 	void playSoundData(Common::File *f, uint32 size, Audio::SoundHandle *soundHandle) {
-		consolePrintf("Ogg sound\n");
 		Common::MemoryReadStream *tmp = f->readStream(size);
 		assert(tmp);
 		_mixer->playStream(Audio::Mixer::kSFXSoundType, soundHandle, new AudioStreamWrapper(Audio::makeVorbisStream(tmp, DisposeAfterUse::YES)));
@@ -147,7 +145,6 @@
 	FLACSound(Audio::Mixer *mixer, QueenEngine *vm) : PCSound(mixer, vm) {}
 protected:
 	void playSoundData(Common::File *f, uint32 size, Audio::SoundHandle *soundHandle) {
-		consolePrintf("Flac sound\n");
 		Common::MemoryReadStream *tmp = f->readStream(size);
 		assert(tmp);
 		_mixer->playStream(Audio::Mixer::kSFXSoundType, soundHandle, new AudioStreamWrapper(Audio::makeFLACStream(tmp, DisposeAfterUse::YES)));
@@ -272,7 +269,6 @@
 }
 
 void PCSound::playSpeech(const char *base) {
-	consolePrintf("Playing speech\n");
 	if (speechOn()) {
 		playSound(base, true);
 	}
@@ -293,18 +289,15 @@
 	}
 	strcat(name, ".SB");
 	if (isSpeech) {
-		consolePrintf("Another speech saple...\n");
 		while (_mixer->isSoundHandleActive(_speechHandle)) {
 			_vm->input()->delay(10);
 		}
 	} else {
-		consolePrintf("Stopping sfx\n");
 		_mixer->stopHandle(_sfxHandle);
 	}
 	uint32 size;
 	Common::File *f = _vm->resource()->findSound(name, &size);
 	if (f) {
-		consolePrintf("Playing sound %d\n", size);
 		playSoundData(f, size, isSpeech ? &_speechHandle : &_sfxHandle);
 		_speechSfxExists = isSpeech;
 	} else {
@@ -336,7 +329,6 @@
 	if (sound) {
 		f->read(sound, size);
 		Audio::Mixer::SoundType type = (soundHandle == &_speechHandle) ? Audio::Mixer::kSpeechSoundType : Audio::Mixer::kSFXSoundType;
-		consolePrintf("Playing sound data %d\n", size);
 
 		Audio::AudioStream *stream = Audio::makeRawStream(sound, size, 11840, Audio::FLAG_UNSIGNED);
 		_mixer->playStream(type, soundHandle, stream);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list