added stopAll in Imuse
svn-id: r5064
This commit is contained in:
parent
c49e3e3eb8
commit
7d6ebdc289
4 changed files with 21 additions and 1 deletions
|
@ -4862,6 +4862,7 @@ void IMuseDigital::handler() {
|
||||||
if (_channel[l]._toBeRemoved == true) {
|
if (_channel[l]._toBeRemoved == true) {
|
||||||
_channel[l]._used = false;
|
_channel[l]._used = false;
|
||||||
free(_channel[l]._data);
|
free(_channel[l]._data);
|
||||||
|
memset(&_channel[l], 0, sizeof(channel));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5043,8 +5044,19 @@ void IMuseDigital::startSound(int sound) {
|
||||||
|
|
||||||
void IMuseDigital::stopSound(int sound) {
|
void IMuseDigital::stopSound(int sound) {
|
||||||
debug(1, "IMuseDigital::stopSound(%d)", sound);
|
debug(1, "IMuseDigital::stopSound(%d)", sound);
|
||||||
for (int32 l = 0; l < MAX_DIGITAL_CHANNELS;l ++) {
|
for (int32 l = 0; l < MAX_DIGITAL_CHANNELS; l++) {
|
||||||
if ((_channel[l]._idSound == sound) && (_channel[l]._used == true)) {
|
if ((_channel[l]._idSound == sound) && (_channel[l]._used == true)) {
|
||||||
|
if (_channel[l]._isLoop == false)
|
||||||
|
_channel[l]._toBeRemoved = true;
|
||||||
|
else
|
||||||
|
_channel[l]._isLoop = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void IMuseDigital::stopAll() {
|
||||||
|
for (int32 l = 0; l < MAX_DIGITAL_CHANNELS; l++) {
|
||||||
|
if (_channel[l]._used == true) {
|
||||||
_channel[l]._toBeRemoved = true;
|
_channel[l]._toBeRemoved = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,6 +110,7 @@ public:
|
||||||
void handler();
|
void handler();
|
||||||
void startSound(int sound);
|
void startSound(int sound);
|
||||||
void stopSound(int sound);
|
void stopSound(int sound);
|
||||||
|
void stopAll();
|
||||||
int32 doCommand(int a, int b, int c, int d, int e, int f, int g, int h);
|
int32 doCommand(int a, int b, int c, int d, int e, int f, int g, int h);
|
||||||
int getSoundStatus(int sound);
|
int getSoundStatus(int sound);
|
||||||
};
|
};
|
||||||
|
|
|
@ -111,6 +111,10 @@ bool Scumm::loadState(int slot, bool compat)
|
||||||
_current_version = hdr.ver;
|
_current_version = hdr.ver;
|
||||||
memcpy(_saveLoadName, hdr.name, sizeof(hdr.name));
|
memcpy(_saveLoadName, hdr.name, sizeof(hdr.name));
|
||||||
|
|
||||||
|
if (_imuseDigital) {
|
||||||
|
_imuseDigital->stopAll();
|
||||||
|
}
|
||||||
|
|
||||||
_sound->pauseSounds(true);
|
_sound->pauseSounds(true);
|
||||||
|
|
||||||
CHECK_HEAP openRoom(-1);
|
CHECK_HEAP openRoom(-1);
|
||||||
|
|
|
@ -2714,6 +2714,9 @@ void Scumm::o6_miscOps()
|
||||||
grabCursor(args[1], args[2], args[3], args[4]);
|
grabCursor(args[1], args[2], args[3], args[4]);
|
||||||
break;
|
break;
|
||||||
case 6: {
|
case 6: {
|
||||||
|
if (_imuseDigital) {
|
||||||
|
_imuseDigital->stopAll();
|
||||||
|
}
|
||||||
uint32 speed;
|
uint32 speed;
|
||||||
if (strcmp((char*)getStringAddressVar(VAR_VIDEONAME), "sq3.san") == 0)
|
if (strcmp((char*)getStringAddressVar(VAR_VIDEONAME), "sq3.san") == 0)
|
||||||
speed = 71;
|
speed = 71;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue