Ticket #1091: sound.txt

File sound.txt, 2.6 KB (added by Kirben, 17 years ago)

Patch

Line 
1Index: scumm/sound.cpp
2===================================================================
3RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
4retrieving revision 1.339
5diff -u -r1.339 sound.cpp
6--- scumm/sound.cpp 25 Jun 2004 12:11:34 -0000 1.339
7+++ scumm/sound.cpp 28 Jun 2004 08:34:26 -0000
8@@ -69,6 +69,7 @@
9 _endOfMouthSync(false),
10 _curSoundPos(0),
11 _overrideFreq(0),
12+ _sndMode(0),
13 _currentCDSound(0),
14 _soundsPaused(false),
15 _sfxMode(0) {
16@@ -567,11 +568,9 @@
17 //
18 // Do any other games than these need this hack?
19 //
20- // HACK: Checking for script 99 in Sam & Max is to keep Conroy's song
21- // from being interrupted.
22
23 if (mode == 1 && (_vm->_gameId == GID_TENTACLE
24- || (_vm->_gameId == GID_SAMNMAX && !_vm->isScriptRunning(99)))) {
25+ || (_vm->_gameId == GID_SAMNMAX && _sndMode == 1))) {
26 id = 777777;
27 _vm->_mixer->stopID(id);
28 }
29@@ -810,7 +809,7 @@
30 }
31 }
32
33-void Sound::talkSound(uint32 a, uint32 b, int mode, int frame) {
34+void Sound::talkSound(uint32 a, uint32 b, int mode, int frame, int sndMode) {
35 if (mode == 1) {
36 _talk_sound_a1 = a;
37 _talk_sound_b1 = b;
38@@ -819,6 +818,7 @@
39 _talk_sound_b2 = b;
40 }
41
42+ _sndMode = sndMode;
43 _talk_sound_frame = frame;
44 _talk_sound_mode |= mode;
45 }
46Index: scumm/sound.h
47===================================================================
48RCS file: /cvsroot/scummvm/scummvm/scumm/sound.h,v
49retrieving revision 1.66
50diff -u -r1.66 sound.h
51--- scumm/sound.h 22 Jun 2004 10:39:46 -0000 1.66
52+++ scumm/sound.h 28 Jun 2004 08:34:26 -0000
53@@ -71,6 +71,7 @@
54 uint _curSoundPos;
55
56 int _overrideFreq;
57+ int _sndMode;
58
59 int _currentCDSound;
60 public:
61@@ -94,7 +95,7 @@
62 void stopSound(int a);
63 void stopAllSounds();
64 void soundKludge(int *list, int num);
65- void talkSound(uint32 a, uint32 b, int mode, int frame);
66+ void talkSound(uint32 a, uint32 b, int mode, int frame, int sndMode = 1);
67 void setupSound();
68 void pauseSounds(bool pause);
69
70Index: scumm/string.cpp
71===================================================================
72RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
73retrieving revision 1.221
74diff -u -r1.221 string.cpp
75--- scumm/string.cpp 7 May 2004 07:33:10 -0000 1.221
76+++ scumm/string.cpp 28 Jun 2004 08:34:28 -0000
77@@ -54,8 +54,10 @@
78 // and setting VAR_V6_SOUNDMODE beforehand. See patch 609791.
79 // FIXME: There are other VAR_V6_SOUNDMODE states, as
80 // mentioned in the patch. FIXME after iMUSE is done.
81- if (_gameId != GID_SAMNMAX || (VAR(VAR_V6_SOUNDMODE) != 2))
82- _sound->talkSound(a, b, 1, -1);
83+ if (_gameId != GID_SAMNMAX || (VAR(VAR_V6_SOUNDMODE) != 2)) {
84+ int sndMode = VAR(VAR_V6_SOUNDMODE);
85+ _sound->talkSound(a, b, 1, -1, sndMode);
86+ }
87 }
88 }
89