diff options
author | Dmitry Iskrich | 2016-06-14 19:47:17 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | bd05d98fa5a60b10831d0356d93a6c22755ddf5e (patch) | |
tree | 74d2e2b17f83814acfa36ab71fbae547d6370b86 /engines/director/sound.cpp | |
parent | 2387e721040335db27a1f8f46a73cdf047c27a6e (diff) | |
download | scummvm-rg350-bd05d98fa5a60b10831d0356d93a6c22755ddf5e.tar.gz scummvm-rg350-bd05d98fa5a60b10831d0356d93a6c22755ddf5e.tar.bz2 scummvm-rg350-bd05d98fa5a60b10831d0356d93a6c22755ddf5e.zip |
DIRECTOR: Add support for to/from MCI play options
Diffstat (limited to 'engines/director/sound.cpp')
-rw-r--r-- | engines/director/sound.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/director/sound.cpp b/engines/director/sound.cpp index ea8b78e1a4..5e32972248 100644 --- a/engines/director/sound.cpp +++ b/engines/director/sound.cpp @@ -67,8 +67,10 @@ void DirectorSound::playAIFF(Common::String filename, uint8 soundChannel) { _mixer->playStream(Audio::Mixer::kSFXSoundType, _sound2, sound); } -void DirectorSound::playMCI(Audio::AudioStream &stream) { - _mixer->playStream(Audio::Mixer::kSFXSoundType, _scriptSound, &stream); +void DirectorSound::playMCI(Audio::AudioStream &stream, uint32 from, uint32 to) { + Audio::SeekableAudioStream *seekStream = dynamic_cast<Audio::SeekableAudioStream *>(&stream); + Audio::SubSeekableAudioStream *subSeekStream = new Audio::SubSeekableAudioStream(seekStream, Audio::Timestamp(from, seekStream->getRate()), Audio::Timestamp(to, seekStream->getRate())); + _mixer->playStream(Audio::Mixer::kSFXSoundType, _scriptSound, subSeekStream); } bool DirectorSound::isChannelActive(uint8 channelID) { |