proper usage actor talkVolume

svn-id: r12841
This commit is contained in:
Paweł Kołodziejski 2004-02-13 06:43:10 +00:00
parent e5d9adea02
commit d474ccf756
2 changed files with 10 additions and 7 deletions

View File

@ -282,7 +282,16 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType,
bits = _sound->getBits(_track[l].soundHandle);
channels = _sound->getChannels(_track[l].soundHandle);
freq = _sound->getFreq(_track[l].soundHandle);
if ((soundId == kTalkSoundID) && (soundType == IMUSE_BUNDLE)) {
if (_vm->_actorToPrintStrFor != 0xFF && _vm->_actorToPrintStrFor != 0) {
Actor *a = _vm->derefActor(_vm->_actorToPrintStrFor, "IMuseDigital::startSound");
freq = (freq * a->talkFrequency) / 256;
_track[l].pan = a->talkPan;
_track[l].vol = a->talkVolume * 1000;
}
}
assert(bits == 8 || bits == 12 || bits == 16);
assert(channels == 1 || channels == 2);
assert(0 < freq && freq <= 65535);

View File

@ -1078,18 +1078,12 @@ void ScummEngine_v8::o8_actorOps() {
break;
case 0x87: // SO_ACTOR_VOLUME Set volume of actor speech
a->talkVolume = pop();
_imuseDigital->setVolume(kTalkSoundID, a->talkVolume);
break;
case 0x88: // SO_ACTOR_FREQUENCY Set frequency of actor speech
a->talkFrequency = pop();
break;
case 0x89: // SO_ACTOR_PAN
// 0 = left, 64 = middle, 127 = right.
a->talkPan = pop();
if (_actorToPrintStrFor == a->number) {
_imuseDigital->setPan(kTalkSoundID, a->talkPan);
}
break;
default:
error("o8_actorOps: default case 0x%x", subOp);