[Scummvm-git-logs] scummvm master -> 934487e231062030b7949b03007e2d7ecfa4a181

sev- noreply at scummvm.org
Wed Mar 29 21:57:07 UTC 2023


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:
934487e231 SLUDGE: Small improvements to debug messages and cleanup


Commit: 934487e231062030b7949b03007e2d7ecfa4a181
    https://github.com/scummvm/scummvm/commit/934487e231062030b7949b03007e2d7ecfa4a181
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-29T23:56:36+02:00

Commit Message:
SLUDGE: Small improvements to debug messages and cleanup

Changed paths:
    engines/sludge/sound.cpp


diff --git a/engines/sludge/sound.cpp b/engines/sludge/sound.cpp
index 46fc53cb91e..5381566e1de 100644
--- a/engines/sludge/sound.cpp
+++ b/engines/sludge/sound.cpp
@@ -222,7 +222,7 @@ bool SoundManager::playMOD(int f, int a, int fromTrack) {
 	Common::SeekableReadStream *memImage = readStream->readStream(length);
 
 	if (memImage->size() != (int)length || readStream->err()) {
-		return fatal("Sound reading failed");
+		return fatal("SoundManager::playMOD(): Sound reading failed");
 	}
 	Audio::RewindableAudioStream *mod = nullptr;
 
@@ -324,23 +324,21 @@ int SoundManager::makeSoundAudioStream(int f, Audio::AudioStream *&audiostream,
 
 	Common::SeekableReadStream *readStream = g_sludge->_resMan->getData();
 	uint curr_ptr = readStream->pos();
-		
+
 	uint32 tag = readStream->readUint32BE();
 	readStream->seek(curr_ptr);
 
 	Audio::RewindableAudioStream *stream = nullptr;
-	if (tag == MKTAG('R', 'I', 'F', 'F')) {
+	if (tag == MKTAG('R','I','F','F'))
 		stream = Audio::makeWAVStream(readStream->readStream(length), DisposeAfterUse::NO);
-	}
 
 #ifdef USE_VORBIS
-	if (tag == MKTAG('O', 'g', 'g', 'S')) {
+	if (tag == MKTAG('O','g','g','S'))
 		stream = Audio::makeVorbisStream(readStream->readStream(length), DisposeAfterUse::NO);
-	} 
 #endif
 
 	if (!stream) {
-		warning("Unsupported sound format");
+		warning("SoundManager::makeSoundAudioStream(): Unsupported sound format %s", tag2str(tag));
 		delete stream;
 	}
 




More information about the Scummvm-git-logs mailing list