SHERLOCK: Play rain sound during 3DO Scalpel intro
This is based on guesswork, particularly with regards to the volume. It sounds pretty close to a YouTube video I saw of the original game, and at least it's not unpleasantly loud.
This commit is contained in:
parent
1fdeb98e70
commit
d227e40e53
3 changed files with 41 additions and 3 deletions
|
@ -168,6 +168,30 @@ bool Sound::playSound(const Common::String &name, WaitType waitType, int priorit
|
|||
return retval;
|
||||
}
|
||||
|
||||
void Sound::playAiff(const Common::String &name, int volume, bool loop) {
|
||||
Common::File *file = new Common::File();
|
||||
if (!file->open(name)) {
|
||||
delete file;
|
||||
return;
|
||||
}
|
||||
Audio::AudioStream *stream;
|
||||
Audio::RewindableAudioStream *audioStream = Audio::makeAIFFStream(file, DisposeAfterUse::YES);
|
||||
if (loop) {
|
||||
Audio::AudioStream *loopingStream = Audio::makeLoopingAudioStream(audioStream, 0);
|
||||
stream = loopingStream;
|
||||
} else {
|
||||
stream = audioStream;
|
||||
}
|
||||
stopAiff();
|
||||
_mixer->playStream(Audio::Mixer::kSFXSoundType, &_aiffHandle, stream, -1, volume);
|
||||
}
|
||||
|
||||
void Sound::stopAiff() {
|
||||
if (_mixer->isSoundHandleActive(_aiffHandle)) {
|
||||
_mixer->stopHandle(_aiffHandle);
|
||||
}
|
||||
}
|
||||
|
||||
void Sound::playLoadedSound(int bufNum, WaitType waitType) {
|
||||
if (IS_SERRATED_SCALPEL) {
|
||||
if (_mixer->isSoundHandleActive(_scalpelEffectsHandle) && (_curPriority > _vm->_scene->_sounds[bufNum]._priority))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue