[Scummvm-git-logs] scummvm master -> 30ee90cfc3ad30979856c6d9836069f74afa54bf

sev- noreply at scummvm.org
Sun Jun 15 20:22:16 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
30ee90cfc3 SLUDGE: Support MP3 sound files


Commit: 30ee90cfc3ad30979856c6d9836069f74afa54bf
    https://github.com/scummvm/scummvm/commit/30ee90cfc3ad30979856c6d9836069f74afa54bf
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2025-06-15T22:22:13+02:00

Commit Message:
SLUDGE: Support MP3 sound files

Changed paths:
    engines/sludge/sound.cpp


diff --git a/engines/sludge/sound.cpp b/engines/sludge/sound.cpp
index 9a553481bdb..498b9ebe6e4 100644
--- a/engines/sludge/sound.cpp
+++ b/engines/sludge/sound.cpp
@@ -21,6 +21,7 @@
 
 #include "audio/audiostream.h"
 #include "audio/decoders/wave.h"
+#include "audio/decoders/mp3.h"
 #include "audio/decoders/vorbis.h"
 #include "audio/mods/mod_xm_s3m.h"
 #include "audio/mods/universaltracker.h"
@@ -336,9 +337,11 @@ int SoundManager::makeSoundAudioStream(int f, Audio::AudioStream *&audiostream,
 		stream = Audio::makeVorbisStream(readStream->readStream(length), DisposeAfterUse::NO);
 #endif
 
-	if (!stream) {
-		warning("SoundManager::makeSoundAudioStream(): Unsupported sound format %s", tag2str(tag));
-	}
+#ifdef USE_MAD
+	// TODO: Detect this correctly
+	if (!stream)
+		stream = Audio::makeMP3Stream(readStream->readStream(length), DisposeAfterUse::NO);
+#endif
 
 	g_sludge->_resMan->finishAccess();
 
@@ -349,7 +352,7 @@ int SoundManager::makeSoundAudioStream(int f, Audio::AudioStream *&audiostream,
 		setResourceForFatal(-1);
 	} else {
 		audiostream = nullptr;
-		warning(ERROR_SOUND_ODDNESS);
+		warning("SoundManager::makeSoundAudioStream(): Unsupported sound format %s", tag2str(tag));
 		_soundCache[a].fileLoaded = -1;
 		_soundCache[a].looping = false;
 		return -1;




More information about the Scummvm-git-logs mailing list