diff options
author | Kari Salminen | 2007-08-17 13:10:57 +0000 |
---|---|---|
committer | Kari Salminen | 2007-08-17 13:10:57 +0000 |
commit | aa8db3f74fc6460087a919a79a380b5346d117d6 (patch) | |
tree | b829a8ef77a3e4f24060d3071c8bacc6362c1ada | |
parent | 62d5f0629c7003ffb4f587d7dc3d3af6d80bd57b (diff) | |
download | scummvm-rg350-aa8db3f74fc6460087a919a79a380b5346d117d6.tar.gz scummvm-rg350-aa8db3f74fc6460087a919a79a380b5346d117d6.tar.bz2 scummvm-rg350-aa8db3f74fc6460087a919a79a380b5346d117d6.zip |
Added a definition for Apple IIGS sound emulation mode, made sound initialization set it when appropriate and instruments loading use it.
svn-id: r28647
-rw-r--r-- | engines/agi/agi.cpp | 21 | ||||
-rw-r--r-- | engines/agi/sound.cpp | 5 | ||||
-rw-r--r-- | engines/agi/sound.h | 1 |
3 files changed, 18 insertions, 9 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index ec8c819ab3..d9fe32ba23 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -677,13 +677,20 @@ void AgiEngine::initialize() { // 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")) { diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp index 9b2f88cff6..340e61c009 100644 --- a/engines/agi/sound.cpp +++ b/engines/agi/sound.cpp @@ -440,6 +440,9 @@ int SoundMgr::initSound() { case SOUND_EMU_MAC: waveform = waveformMac; break; + case SOUND_EMU_APPLE2GS: + loadInstruments(); + break; } report("Initializing sound:\n"); @@ -451,8 +454,6 @@ int SoundMgr::initSound() { report("disabled\n"); } - loadInstruments(); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true); return r; diff --git a/engines/agi/sound.h b/engines/agi/sound.h index 80ba3f31e8..708543ec51 100644 --- a/engines/agi/sound.h +++ b/engines/agi/sound.h @@ -39,6 +39,7 @@ namespace Agi { #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 */ |