[Scummvm-git-logs] scummvm master -> 024eb036fe1b156adbe6b2da61688a2f4027e41f

SupSuper supsuper at gmail.com
Sun May 23 00:42:17 UTC 2021


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:
024eb036fe PRINCE: Copy audio streams


Commit: 024eb036fe1b156adbe6b2da61688a2f4027e41f
    https://github.com/scummvm/scummvm/commit/024eb036fe1b156adbe6b2da61688a2f4027e41f
Author: SupSuper (supsuper at gmail.com)
Date: 2021-05-22T23:50:42+01:00

Commit Message:
PRINCE: Copy audio streams

Changed paths:
    engines/prince/sound.cpp


diff --git a/engines/prince/sound.cpp b/engines/prince/sound.cpp
index b8a70014d9..e9c312f014 100644
--- a/engines/prince/sound.cpp
+++ b/engines/prince/sound.cpp
@@ -85,7 +85,7 @@ bool PrinceEngine::loadSample(uint32 sampleSlot, const Common::String &streamNam
 		delete sampleStream;
 		error("Can't load sample %s to slot %d", normalizedPath.c_str(), sampleSlot);
 	}
-	_audioStream[sampleSlot] = Audio::makeWAVStream(sampleStream, DisposeAfterUse::NO);
+	_audioStream[sampleSlot] = Audio::makeWAVStream(sampleStream->readStream(sampleStream->size()), DisposeAfterUse::YES);
 	delete sampleStream;
 	return true;
 }
@@ -141,7 +141,7 @@ bool PrinceEngine::loadVoice(uint32 slot, uint32 sampleSlot, const Common::Strin
 
 	debugEngine("SetVoice slot %d time %04x", slot, id);
 	sampleStream->seek(SEEK_SET);
-	_audioStream[sampleSlot] = Audio::makeWAVStream(sampleStream, DisposeAfterUse::NO);
+	_audioStream[sampleSlot] = Audio::makeWAVStream(sampleStream->readStream(sampleStream->size()), DisposeAfterUse::YES);
 	delete sampleStream;
 	return true;
 }




More information about the Scummvm-git-logs mailing list