mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-06 18:00:44 +00:00
TWINE: use voice volume for speech
This commit is contained in:
parent
cc4e3a30d8
commit
a286db2d3c
@ -94,7 +94,7 @@ void Sound::playSample(int32 index, int32 frequency, int32 repeat, int32 x, int3
|
|||||||
|
|
||||||
uint8 *sampPtr = _engine->_resources->samplesTable[index];
|
uint8 *sampPtr = _engine->_resources->samplesTable[index];
|
||||||
int32 sampSize = _engine->_resources->samplesSizeTable[index];
|
int32 sampSize = _engine->_resources->samplesSizeTable[index];
|
||||||
playSample(channelIdx, index, sampPtr, sampSize, repeat, Resources::HQR_SAMPLES_FILE, DisposeAfterUse::NO);
|
playSample(channelIdx, index, sampPtr, sampSize, repeat, Resources::HQR_SAMPLES_FILE, Audio::Mixer::kPlainSoundType, DisposeAfterUse::NO);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sound::playVoxSample(int32 index) {
|
void Sound::playVoxSample(int32 index) {
|
||||||
@ -122,17 +122,17 @@ void Sound::playVoxSample(int32 index) {
|
|||||||
*sampPtr = 'C';
|
*sampPtr = 'C';
|
||||||
}
|
}
|
||||||
|
|
||||||
playSample(channelIdx, index, sampPtr, sampSize, 1, _engine->_text->currentVoxBankFile.c_str());
|
playSample(channelIdx, index, sampPtr, sampSize, 1, _engine->_text->currentVoxBankFile.c_str(), Audio::Mixer::kSpeechSoundType);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sound::playSample(int channelIdx, int index, uint8 *sampPtr, int32 sampSize, int32 loop, const char *name, DisposeAfterUse::Flag disposeFlag) {
|
bool Sound::playSample(int channelIdx, int index, uint8 *sampPtr, int32 sampSize, int32 loop, const char *name, Audio::Mixer::SoundType soundType, DisposeAfterUse::Flag disposeFlag) {
|
||||||
Common::MemoryReadStream *stream = new Common::MemoryReadStream(sampPtr, sampSize, disposeFlag);
|
Common::MemoryReadStream *stream = new Common::MemoryReadStream(sampPtr, sampSize, disposeFlag);
|
||||||
Audio::SeekableAudioStream *audioStream = Audio::makeVOCStream(stream, DisposeAfterUse::YES);
|
Audio::SeekableAudioStream *audioStream = Audio::makeVOCStream(stream, DisposeAfterUse::YES);
|
||||||
if (audioStream == nullptr) {
|
if (audioStream == nullptr) {
|
||||||
warning("Failed to create audio stream for %s", name);
|
warning("Failed to create audio stream for %s", name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
_engine->_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &samplesPlaying[channelIdx], audioStream, index);
|
_engine->_system->getMixer()->playStream(soundType, &samplesPlaying[channelIdx], audioStream, index);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ private:
|
|||||||
/** Samples playing at a actors position */
|
/** Samples playing at a actors position */
|
||||||
int32 samplesPlayingActors[NUM_CHANNELS]{0};
|
int32 samplesPlayingActors[NUM_CHANNELS]{0};
|
||||||
|
|
||||||
bool playSample(int channelIdx, int index, uint8 *sampPtr, int32 sampSize, int32 loop, const char *name, DisposeAfterUse::Flag disposeFlag = DisposeAfterUse::YES);
|
bool playSample(int channelIdx, int index, uint8 *sampPtr, int32 sampSize, int32 loop, const char *name, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType, DisposeAfterUse::Flag disposeFlag = DisposeAfterUse::YES);
|
||||||
|
|
||||||
bool isChannelPlaying(int32 channel);
|
bool isChannelPlaying(int32 channel);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user