mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 08:48:13 +00:00
proper usage actor talkVolume
svn-id: r12841
This commit is contained in:
parent
e5d9adea02
commit
d474ccf756
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user