[Scummvm-cvs-logs] SF.net SVN: scummvm: [28647] scummvm/trunk/engines/agi

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Fri Aug 17 15:10:58 CEST 2007


Revision: 28647
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28647&view=rev
Author:   buddha_
Date:     2007-08-17 06:10:57 -0700 (Fri, 17 Aug 2007)

Log Message:
-----------
Added a definition for Apple IIGS sound emulation mode, made sound initialization set it when appropriate and instruments loading use it.

Modified Paths:
--------------
    scummvm/trunk/engines/agi/agi.cpp
    scummvm/trunk/engines/agi/sound.cpp
    scummvm/trunk/engines/agi/sound.h

Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp	2007-08-17 11:19:17 UTC (rev 28646)
+++ scummvm/trunk/engines/agi/agi.cpp	2007-08-17 13:10:57 UTC (rev 28647)
@@ -677,13 +677,20 @@
 	//       drivers, and I'm not sure what they are. For now, they might
 	//       as well be called "PC Speaker" and "Not PC Speaker".
 
-	switch (MidiDriver::detectMusicDriver(MDT_PCSPK)) {
-	case MD_PCSPK:
-		_soundemu = SOUND_EMU_PC;
-		break;
-	default:
-		_soundemu = SOUND_EMU_NONE;
-		break;
+	// If used platform is Apple IIGS then we must use Apple IIGS sound emulation
+	// because Apple IIGS AGI games use only Apple IIGS specific sound resources.
+	if (ConfMan.hasKey("platform") &&
+		Common::parsePlatform(ConfMan.get("platform")) == Common::kPlatformApple2GS) {
+		_soundemu = SOUND_EMU_APPLE2GS;
+	} else {
+		switch (MidiDriver::detectMusicDriver(MDT_PCSPK)) {
+		case MD_PCSPK:
+			_soundemu = SOUND_EMU_PC;
+			break;
+		default:
+			_soundemu = SOUND_EMU_NONE;
+			break;
+		}
 	}
 
 	if (ConfMan.hasKey("render_mode")) {

Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp	2007-08-17 11:19:17 UTC (rev 28646)
+++ scummvm/trunk/engines/agi/sound.cpp	2007-08-17 13:10:57 UTC (rev 28647)
@@ -440,6 +440,9 @@
 	case SOUND_EMU_MAC:
 		waveform = waveformMac;
 		break;
+	case SOUND_EMU_APPLE2GS:
+		loadInstruments();
+		break;
 	}
 
 	report("Initializing sound:\n");
@@ -451,8 +454,6 @@
 		report("disabled\n");
 	}
 
-	loadInstruments();
-
 	_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
 
 	return r;

Modified: scummvm/trunk/engines/agi/sound.h
===================================================================
--- scummvm/trunk/engines/agi/sound.h	2007-08-17 11:19:17 UTC (rev 28646)
+++ scummvm/trunk/engines/agi/sound.h	2007-08-17 13:10:57 UTC (rev 28647)
@@ -39,6 +39,7 @@
 #define SOUND_EMU_TANDY	2
 #define SOUND_EMU_MAC	3
 #define SOUND_EMU_AMIGA	4
+#define SOUND_EMU_APPLE2GS 5
 
 #define WAVEFORM_SIZE   64
 #define ENV_ATTACK	10000		/**< envelope attack rate */


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