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
|
@ -690,15 +690,16 @@ bool ScalpelEngine::showCityCutscene3DO() {
|
||||||
screen.clear();
|
screen.clear();
|
||||||
bool finished = _events->delay(2500, true);
|
bool finished = _events->delay(2500, true);
|
||||||
|
|
||||||
// rain.aiff seems to be playing in an endless loop until
|
|
||||||
// sherlock logo fades away TODO
|
|
||||||
|
|
||||||
if (finished) {
|
if (finished) {
|
||||||
finished = _events->delay(2500, true);
|
finished = _events->delay(2500, true);
|
||||||
|
|
||||||
// Play intro music
|
// Play intro music
|
||||||
_music->loadSong("prolog");
|
_music->loadSong("prolog");
|
||||||
|
|
||||||
|
// Loop rain.aiff until the Sherlock logo fades away.
|
||||||
|
// TODO: The volume is just a guess.
|
||||||
|
_sound->playAiff("prologue/sounds/rain.aiff", 15, true);
|
||||||
|
|
||||||
// Fade screen to grey
|
// Fade screen to grey
|
||||||
screen._backBuffer1.fill(0xCE59); // RGB565: 25, 50, 25 (grey)
|
screen._backBuffer1.fill(0xCE59); // RGB565: 25, 50, 25 (grey)
|
||||||
screen.fadeIntoScreen3DO(2);
|
screen.fadeIntoScreen3DO(2);
|
||||||
|
@ -763,6 +764,8 @@ bool ScalpelEngine::showCityCutscene3DO() {
|
||||||
if (finished)
|
if (finished)
|
||||||
finished = _music->waitUntilMSec(33600, 0, 0, 2000);
|
finished = _music->waitUntilMSec(33600, 0, 0, 2000);
|
||||||
|
|
||||||
|
_sound->stopAiff();
|
||||||
|
|
||||||
if (finished) {
|
if (finished) {
|
||||||
// Fade to black
|
// Fade to black
|
||||||
screen._backBuffer1.clear();
|
screen._backBuffer1.clear();
|
||||||
|
|
|
@ -168,6 +168,30 @@ bool Sound::playSound(const Common::String &name, WaitType waitType, int priorit
|
||||||
return retval;
|
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) {
|
void Sound::playLoadedSound(int bufNum, WaitType waitType) {
|
||||||
if (IS_SERRATED_SCALPEL) {
|
if (IS_SERRATED_SCALPEL) {
|
||||||
if (_mixer->isSoundHandleActive(_scalpelEffectsHandle) && (_curPriority > _vm->_scene->_sounds[bufNum]._priority))
|
if (_mixer->isSoundHandleActive(_scalpelEffectsHandle) && (_curPriority > _vm->_scene->_sounds[bufNum]._priority))
|
||||||
|
|
|
@ -46,6 +46,7 @@ private:
|
||||||
SherlockEngine *_vm;
|
SherlockEngine *_vm;
|
||||||
Audio::Mixer *_mixer;
|
Audio::Mixer *_mixer;
|
||||||
Audio::SoundHandle _scalpelEffectsHandle;
|
Audio::SoundHandle _scalpelEffectsHandle;
|
||||||
|
Audio::SoundHandle _aiffHandle;
|
||||||
Audio::SoundHandle _tattooEffectsHandle[MAX_MIXER_CHANNELS];
|
Audio::SoundHandle _tattooEffectsHandle[MAX_MIXER_CHANNELS];
|
||||||
Audio::SoundHandle _speechHandle;
|
Audio::SoundHandle _speechHandle;
|
||||||
int _curPriority;
|
int _curPriority;
|
||||||
|
@ -87,6 +88,16 @@ public:
|
||||||
* Play the sound in the specified resource
|
* Play the sound in the specified resource
|
||||||
*/
|
*/
|
||||||
bool playSound(const Common::String &name, WaitType waitType, int priority = 100, const char *libraryFilename = nullptr);
|
bool playSound(const Common::String &name, WaitType waitType, int priority = 100, const char *libraryFilename = nullptr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Play the specified AIFF file. (Used for the 3DO Scalpel intro.)
|
||||||
|
*/
|
||||||
|
void playAiff(const Common::String &name, int volume = Audio::Mixer::kMaxChannelVolume, bool loop = false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop the AIFF sound that was started with playAiff().
|
||||||
|
*/
|
||||||
|
void stopAiff();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Play a previously loaded sound
|
* Play a previously loaded sound
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue