[Scummvm-cvs-logs] SF.net SVN: scummvm: [29223] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Mon Oct 15 11:21:14 CEST 2007
Revision: 29223
http://scummvm.svn.sourceforge.net/scummvm/?rev=29223&view=rev
Author: peres001
Date: 2007-10-15 02:21:13 -0700 (Mon, 15 Oct 2007)
Log Message:
-----------
Now correctly disposing of audio data only when it was allocated on the heap, thus fixing bug #1813367.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/sound.cpp
scummvm/trunk/engines/parallaction/sound.h
Modified: scummvm/trunk/engines/parallaction/sound.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/sound.cpp 2007-10-14 21:35:02 UTC (rev 29222)
+++ scummvm/trunk/engines/parallaction/sound.cpp 2007-10-15 09:21:13 UTC (rev 29223)
@@ -331,12 +331,14 @@
ch->header.volume = 255;
ch->data = res_amigaBeep;
ch->dataSize = 16;
+ ch->dispose = false;
return;
}
Common::ReadStream *stream = _vm->_disk->loadSound(filename);
Audio::A8SVXDecoder decoder(*stream, ch->header, ch->data, ch->dataSize);
decoder.decode();
+ ch->dispose = true;
delete stream;
}
@@ -381,7 +383,7 @@
return;
}
- if (_channels[channel].data) {
+ if (_channels[channel].dispose) {
debugC(1, kDebugAudio, "AmigaSoundMan::stopSfx(%i)", channel);
_mixer->stopHandle(_channels[channel].handle);
free(_channels[channel].data);
Modified: scummvm/trunk/engines/parallaction/sound.h
===================================================================
--- scummvm/trunk/engines/parallaction/sound.h 2007-10-14 21:35:02 UTC (rev 29222)
+++ scummvm/trunk/engines/parallaction/sound.h 2007-10-15 09:21:13 UTC (rev 29223)
@@ -91,6 +91,7 @@
Audio::Voice8Header header;
byte *data;
uint32 dataSize;
+ bool dispose;
Audio::SoundHandle handle;
uint32 flags;
} _channels[NUM_AMIGA_CHANNELS];
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