[Scummvm-cvs-logs] SF.net SVN: scummvm:[51661] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Aug 2 23:20:43 CEST 2010


Revision: 51661
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51661&view=rev
Author:   thebluegr
Date:     2010-08-02 21:20:43 +0000 (Mon, 02 Aug 2010)

Log Message:
-----------
SCI: Silenced some sound related warnings. Added an empty function for kDoSound(Restore), called when restoring games

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kernel.h
    scummvm/trunk/engines/sci/engine/kernel_tables.h
    scummvm/trunk/engines/sci/engine/ksound.cpp
    scummvm/trunk/engines/sci/sound/soundcmd.cpp
    scummvm/trunk/engines/sci/sound/soundcmd.h

Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h	2010-08-02 21:04:09 UTC (rev 51660)
+++ scummvm/trunk/engines/sci/engine/kernel.h	2010-08-02 21:20:43 UTC (rev 51661)
@@ -467,7 +467,7 @@
 
 reg_t kDoSoundInit(EngineState *s, int argc, reg_t *argv);
 reg_t kDoSoundPlay(EngineState *s, int argc, reg_t *argv);
-reg_t kDoSoundDummy(EngineState *s, int argc, reg_t *argv);
+reg_t kDoSoundRestore(EngineState *s, int argc, reg_t *argv);
 reg_t kDoSoundDispose(EngineState *s, int argc, reg_t *argv);
 reg_t kDoSoundMute(EngineState *s, int argc, reg_t *argv);
 reg_t kDoSoundStop(EngineState *s, int argc, reg_t *argv);
@@ -482,6 +482,7 @@
 reg_t kDoSoundSendMidi(EngineState *s, int argc, reg_t *argv);
 reg_t kDoSoundReverb(EngineState *s, int argc, reg_t *argv);
 reg_t kDoSoundSetHold(EngineState *s, int argc, reg_t *argv);
+reg_t kDoSoundDummy(EngineState *s, int argc, reg_t *argv);
 reg_t kDoSoundGetAudioCapability(EngineState *s, int argc, reg_t *argv);
 reg_t kDoSoundSuspend(EngineState *s, int argc, reg_t *argv);
 reg_t kDoSoundSetVolume(EngineState *s, int argc, reg_t *argv);

Modified: scummvm/trunk/engines/sci/engine/kernel_tables.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel_tables.h	2010-08-02 21:04:09 UTC (rev 51660)
+++ scummvm/trunk/engines/sci/engine/kernel_tables.h	2010-08-02 21:20:43 UTC (rev 51661)
@@ -86,7 +86,7 @@
 static const SciKernelMapSubEntry kDoSound_subops[] = {
     { SIG_SOUNDSCI0,       0, MAP_CALL(DoSoundInit),               "o",                    NULL },
     { SIG_SOUNDSCI0,       1, MAP_CALL(DoSoundPlay),               "o",                    NULL },
-    { SIG_SOUNDSCI0,       2, MAP_CALL(DoSoundDummy),              "(o)",                  NULL },
+    { SIG_SOUNDSCI0,       2, MAP_CALL(DoSoundRestore),            "(o)",                  NULL },
     { SIG_SOUNDSCI0,       3, MAP_CALL(DoSoundDispose),            "o",                    NULL },
     { SIG_SOUNDSCI0,       4, MAP_CALL(DoSoundMute),               "(i)",                  NULL },
     { SIG_SOUNDSCI0,       5, MAP_CALL(DoSoundStop),               "o",                    NULL },
@@ -99,7 +99,7 @@
     { SIG_SOUNDSCI0,      12, MAP_CALL(DoSoundStopAll),            "",                     NULL },
     { SIG_SOUNDSCI1EARLY,  0, MAP_CALL(DoSoundMasterVolume),       NULL,                   NULL },
     { SIG_SOUNDSCI1EARLY,  1, MAP_CALL(DoSoundMute),               NULL,                   NULL },
-    { SIG_SOUNDSCI1EARLY,  2, MAP_CALL(DoSoundDummy),              NULL,                   NULL },
+    { SIG_SOUNDSCI1EARLY,  2, MAP_CALL(DoSoundRestore),            NULL,                   NULL },
     { SIG_SOUNDSCI1EARLY,  3, MAP_CALL(DoSoundGetPolyphony),       NULL,                   NULL },
     { SIG_SOUNDSCI1EARLY,  4, MAP_CALL(DoSoundUpdate),             NULL,                   NULL },
     { SIG_SOUNDSCI1EARLY,  5, MAP_CALL(DoSoundInit),               NULL,                   NULL },
@@ -120,7 +120,7 @@
     //  ^^ Longbow demo
     { SIG_SOUNDSCI1LATE,   0, MAP_CALL(DoSoundMasterVolume),       NULL,                   NULL },
     { SIG_SOUNDSCI1LATE,   1, MAP_CALL(DoSoundMute),               NULL,                   NULL },
-    { SIG_SOUNDSCI1LATE,   2, MAP_CALL(DoSoundDummy),              "",                     NULL },
+    { SIG_SOUNDSCI1LATE,   2, MAP_CALL(DoSoundRestore),            "",                     NULL },
     { SIG_SOUNDSCI1LATE,   3, MAP_CALL(DoSoundGetPolyphony),       NULL,                   NULL },
     { SIG_SOUNDSCI1LATE,   4, MAP_CALL(DoSoundGetAudioCapability), "",                     NULL },
     { SIG_SOUNDSCI1LATE,   5, MAP_CALL(DoSoundSuspend),            "i",                    NULL },
@@ -142,7 +142,7 @@
 #ifdef ENABLE_SCI32
     { SIG_SOUNDSCI21,      0, MAP_CALL(DoSoundMasterVolume),       NULL,                   NULL },
     { SIG_SOUNDSCI21,      1, MAP_CALL(DoSoundMute),               NULL,                   NULL },
-    { SIG_SOUNDSCI21,      2, MAP_CALL(DoSoundDummy),              NULL,                   NULL },
+    { SIG_SOUNDSCI21,      2, MAP_CALL(DoSoundRestore),           NULL,                   NULL },
     { SIG_SOUNDSCI21,      3, MAP_CALL(DoSoundGetPolyphony),       NULL,                   NULL },
     { SIG_SOUNDSCI21,      4, MAP_CALL(DoSoundGetAudioCapability), NULL,                   NULL },
     { SIG_SOUNDSCI21,      5, MAP_CALL(DoSoundSuspend),            NULL,                   NULL },

Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp	2010-08-02 21:04:09 UTC (rev 51660)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp	2010-08-02 21:20:43 UTC (rev 51661)
@@ -48,7 +48,7 @@
 
 CREATE_DOSOUND_FORWARD(DoSoundInit)
 CREATE_DOSOUND_FORWARD(DoSoundPlay)
-CREATE_DOSOUND_FORWARD(DoSoundDummy)
+CREATE_DOSOUND_FORWARD(DoSoundRestore)
 CREATE_DOSOUND_FORWARD(DoSoundDispose)
 CREATE_DOSOUND_FORWARD(DoSoundMute)
 CREATE_DOSOUND_FORWARD(DoSoundStop)
@@ -63,6 +63,7 @@
 CREATE_DOSOUND_FORWARD(DoSoundSendMidi)
 CREATE_DOSOUND_FORWARD(DoSoundReverb)
 CREATE_DOSOUND_FORWARD(DoSoundSetHold)
+CREATE_DOSOUND_FORWARD(DoSoundDummy)
 CREATE_DOSOUND_FORWARD(DoSoundGetAudioCapability)
 CREATE_DOSOUND_FORWARD(DoSoundSuspend)
 CREATE_DOSOUND_FORWARD(DoSoundSetVolume)

Modified: scummvm/trunk/engines/sci/sound/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-08-02 21:04:09 UTC (rev 51660)
+++ scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-08-02 21:20:43 UTC (rev 51661)
@@ -147,6 +147,12 @@
 	_music->soundPlay(musicSlot);
 }
 
+reg_t SoundCommandParser::kDoSoundRestore(int argc, reg_t *argv, reg_t acc) {
+	// Called after loading, to restore the playlist
+	// We don't really use or need this
+	return acc;
+}
+
 reg_t SoundCommandParser::kDoSoundDummy(int argc, reg_t *argv, reg_t acc) {
 	warning("cmdDummy invoked");	// not supposed to occur
 	return acc;
@@ -246,7 +252,8 @@
 	} else {	// pause a playlist slot
 		MusicEntry *musicSlot = _music->getSlot(obj);
 		if (!musicSlot) {
-			warning("kDoSound(pause): Slot not found (%04x:%04x)", PRINT_REG(obj));
+			// This happens quite frequently
+			debugC(2, kDebugLevelSound, "kDoSound(pause): Slot not found (%04x:%04x)", PRINT_REG(obj));
 			return acc;
 		}
 

Modified: scummvm/trunk/engines/sci/sound/soundcmd.h
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.h	2010-08-02 21:04:09 UTC (rev 51660)
+++ scummvm/trunk/engines/sci/sound/soundcmd.h	2010-08-02 21:20:43 UTC (rev 51661)
@@ -82,7 +82,7 @@
 
 	reg_t kDoSoundInit(int argc, reg_t *argv, reg_t acc);
 	reg_t kDoSoundPlay(int argc, reg_t *argv, reg_t acc);
-	reg_t kDoSoundDummy(int argc, reg_t *argv, reg_t acc);
+	reg_t kDoSoundRestore(int argc, reg_t *argv, reg_t acc);
 	reg_t kDoSoundMute(int argc, reg_t *argv, reg_t acc);
 	reg_t kDoSoundPause(int argc, reg_t *argv, reg_t acc);
 	reg_t kDoSoundResumeAfterRestore(int argc, reg_t *argv, reg_t acc);
@@ -97,6 +97,7 @@
 	reg_t kDoSoundSendMidi(int argc, reg_t *argv, reg_t acc);
 	reg_t kDoSoundReverb(int argc, reg_t *argv, reg_t acc);
 	reg_t kDoSoundSetHold(int argc, reg_t *argv, reg_t acc);
+	reg_t kDoSoundDummy(int argc, reg_t *argv, reg_t acc);
 	reg_t kDoSoundGetAudioCapability(int argc, reg_t *argv, reg_t acc);
 	reg_t kDoSoundSetVolume(int argc, reg_t *argv, reg_t acc);
 	reg_t kDoSoundSetPriority(int argc, reg_t *argv, reg_t acc);


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