aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/sound.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2012-11-17 20:49:07 +1100
committerPaul Gilbert2012-11-17 20:49:07 +1100
commit0fdea57c544c8c1bd1c816262d9319367334eb83 (patch)
treeb08a07a39f490ca8183e24f42295e1f8890b2eae /engines/hopkins/sound.cpp
parent8b0ae07969dbdbeb9ad955ab1f23c570ca300167 (diff)
downloadscummvm-rg350-0fdea57c544c8c1bd1c816262d9319367334eb83.tar.gz
scummvm-rg350-0fdea57c544c8c1bd1c816262d9319367334eb83.tar.bz2
scummvm-rg350-0fdea57c544c8c1bd1c816262d9319367334eb83.zip
HOPKINS: Lots of code implemented for Hopkin's computer
Diffstat (limited to 'engines/hopkins/sound.cpp')
-rw-r--r--engines/hopkins/sound.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp
index 13979c5cd8..519d43b05a 100644
--- a/engines/hopkins/sound.cpp
+++ b/engines/hopkins/sound.cpp
@@ -575,6 +575,33 @@ void SoundManager::CHARGE_SAMPLE(int wavIndex, const Common::String &file) {
}
}
+void SoundManager::PLAY_SAMPLE(int wavIndex, int voiceMode) {
+ if (CARD_SB && !SOUNDOFF && SOUND[wavIndex]._active) {
+ if (SOUND_FLAG)
+ DEL_NWAV(SOUND_NUM);
+ if (voiceMode == 5) {
+ if (VOICE_STAT(1) == 1)
+ STOP_VOICE(1);
+ PLAY_SAMPLE_SDL(1, wavIndex);
+ }
+ if (voiceMode == 6) {
+ if (VOICE_STAT(2) == 1)
+ STOP_VOICE(1);
+ PLAY_SAMPLE_SDL(2, wavIndex);
+ }
+ if (voiceMode == 7) {
+ if (VOICE_STAT(3) == 1)
+ STOP_VOICE(1);
+ PLAY_SAMPLE_SDL(3, wavIndex);
+ }
+ if (voiceMode == 8) {
+ if (VOICE_STAT(1) == 1)
+ STOP_VOICE(1);
+ PLAY_SAMPLE_SDL(1, wavIndex);
+ }
+ }
+}
+
void SoundManager::PLAY_SAMPLE2(int idx) {
if (CARD_SB && !SOUNDOFF && SOUND[idx]._active) {
if (SOUND_FLAG)