mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-15 06:18:33 +00:00
SCI: kDoAudio now also clips volume and adjusts to mixer volume
svn-id: r46852
This commit is contained in:
parent
f3ca535038
commit
44dc3f9bfb
@ -131,9 +131,12 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv) {
|
||||
case kSciAudioRate:
|
||||
s->_audio->setAudioRate(argv[1].toUint16());
|
||||
break;
|
||||
case kSciAudioVolume:
|
||||
mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, argv[1].toUint16());
|
||||
case kSciAudioVolume: {
|
||||
int16 volume = argv[1].toUint16();
|
||||
volume = CLIP<int16>(volume, 0, AUDIO_VOLUME_MAX);
|
||||
mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, volume * 2);
|
||||
break;
|
||||
}
|
||||
case kSciAudioLanguage:
|
||||
// In SCI1.1: tests for digital audio support
|
||||
if (getSciVersion() == SCI_VERSION_1_1)
|
||||
|
@ -51,6 +51,8 @@ enum AudioSyncCommands {
|
||||
kSciAudioSyncStop = 2
|
||||
};
|
||||
|
||||
#define AUDIO_VOLUME_MAX 127
|
||||
|
||||
class Resource;
|
||||
class ResourceId;
|
||||
class ResourceManager;
|
||||
|
Loading…
x
Reference in New Issue
Block a user