mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 20:59:00 +00:00
AGOS: Added support for Enhanced Soundtrack
This commit is contained in:
parent
27da99f608
commit
9f843b2f6c
@ -60,6 +60,10 @@ struct Surface;
|
||||
class FontSJIS;
|
||||
}
|
||||
|
||||
namespace Audio {
|
||||
class SeekableAudioStream;
|
||||
}
|
||||
|
||||
namespace AGOS {
|
||||
|
||||
enum {
|
||||
@ -586,6 +590,8 @@ protected:
|
||||
int _vgaTickCounter;
|
||||
|
||||
Audio::SoundHandle _modHandle;
|
||||
Audio::SoundHandle _digitalMusicHandle;
|
||||
Audio::SeekableAudioStream *_digitalMusicStream = nullptr;
|
||||
|
||||
Sound *_sound;
|
||||
|
||||
|
@ -251,6 +251,18 @@ void AGOSEngine_Simon2::playMusic(uint16 music, uint16 track) {
|
||||
loadMusic(10, !track10Fix && track > 0, track10Fix || track > 0);
|
||||
}
|
||||
|
||||
#ifdef USE_VORBIS
|
||||
Common::String trackName = Common::String::format("OGG/track%02d", _lastMusicPlayed);
|
||||
|
||||
_digitalMusicStream = Audio::SeekableAudioStream::openStreamFile(trackName.c_str());
|
||||
if (_digitalMusicStream) {
|
||||
_mixer->playStream(Audio::Mixer::kMusicSoundType, &_digitalMusicHandle, _digitalMusicStream);
|
||||
|
||||
debug(1, "AGOSEngine_Simon2::playMusic(): Playing %s", trackName.c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
_midi->play(track);
|
||||
}
|
||||
|
||||
@ -313,7 +325,7 @@ void AGOSEngine_Simon1::playMusic(uint16 music, uint16 track) {
|
||||
_midi->play();
|
||||
} else if (getPlatform() == Common::kPlatformAcorn) {
|
||||
// Acorn floppy version.
|
||||
|
||||
|
||||
// TODO: Add support for Desktop Tracker format in Acorn disk version
|
||||
}
|
||||
}
|
||||
@ -393,6 +405,7 @@ void AGOSEngine::stopMusic() {
|
||||
_midi->stop();
|
||||
}
|
||||
_mixer->stopHandle(_modHandle);
|
||||
_mixer->stopHandle(_digitalMusicHandle);
|
||||
}
|
||||
|
||||
static const byte elvira1_soundTable[100] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user