diff options
author | Torbjörn Andersson | 2004-04-09 07:24:08 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2004-04-09 07:24:08 +0000 |
commit | 86a546652633b6768656ffe747b56f37931b3cc7 (patch) | |
tree | fc825b3cd3d9c80030645098e928dcbe918262df | |
parent | c2e0647f6a2a17b4d1d8a41573aff9b6ddafe688 (diff) | |
download | scummvm-rg350-86a546652633b6768656ffe747b56f37931b3cc7.tar.gz scummvm-rg350-86a546652633b6768656ffe747b56f37931b3cc7.tar.bz2 scummvm-rg350-86a546652633b6768656ffe747b56f37931b3cc7.zip |
Changed the UNIX line breaks.
Fixed the problem where the lookout music didn't play in the MI1CD intro.
At least, I *think* I fixed it. It worked at home, but I can't test it on
this particular computer.
svn-id: r13515
-rw-r--r-- | sound/flac.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/flac.cpp b/sound/flac.cpp index ccbc386545..18e332ead9 100644 --- a/sound/flac.cpp +++ b/sound/flac.cpp @@ -771,14 +771,17 @@ void FlacTrackInfo::play(SoundMixer *mixer, PlayingSoundHandle *handle, int star if (flac->isStreamDecoderReady()) { const FLAC__StreamMetadata_StreamInfo &info = flac->getStreamInfo(); - flac->setLastSample(static_cast<FLAC__uint64>(startFrame + duration) * (info.sample_rate / 75)); + if (duration) + flac->setLastSample(static_cast<FLAC__uint64>(startFrame + duration) * (info.sample_rate / 75)); + else + flac->setLastSample(0); if (flac->seekAbsolute(static_cast<FLAC__uint64>(startFrame) * (info.sample_rate / 75))) { mixer->playInputStream(handle, flac, true); return; } // startSample is beyond the existing Samples - debug(1, "FlacTrackInfo: Audiostream %s coud not seek to frame %d (ca %d secs)", _file->name(), startFrame, startFrame/75); + debug(1, "FlacTrackInfo: Audiostream %s could not seek to frame %d (ca %d secs)", _file->name(), startFrame, startFrame/75); flac->finish(); } delete flac; |