diff options
author | Johannes Schickel | 2010-01-28 09:44:21 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-28 09:44:21 +0000 |
commit | 0417c0ab888fcf674ea1a1138ce7a555a67c796d (patch) | |
tree | 309bf39932c6d34f440e79a28ad5202438c1d53c /sound/decoders/vorbis.cpp | |
parent | 1c906a1f08f9d1f316c2efd65a347c00e07bc469 (diff) | |
download | scummvm-rg350-0417c0ab888fcf674ea1a1138ce7a555a67c796d.tar.gz scummvm-rg350-0417c0ab888fcf674ea1a1138ce7a555a67c796d.tar.bz2 scummvm-rg350-0417c0ab888fcf674ea1a1138ce7a555a67c796d.zip |
Fix seek implementation of our Vorbis stream.
svn-id: r47635
Diffstat (limited to 'sound/decoders/vorbis.cpp')
-rw-r--r-- | sound/decoders/vorbis.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/decoders/vorbis.cpp b/sound/decoders/vorbis.cpp index f5ebc112c3..5899eaa1fd 100644 --- a/sound/decoders/vorbis.cpp +++ b/sound/decoders/vorbis.cpp @@ -169,7 +169,9 @@ int VorbisInputStream::readBuffer(int16 *buffer, const int numSamples) { } bool VorbisInputStream::seek(const Timestamp &where) { - int res = ov_pcm_seek(&_ovFile, convertTimeToStreamPos(where, getRate(), isStereo()).totalNumberOfFrames()); + // Vorbisfile uses the sample pair number, thus we always use "false" for the isStereo parameter + // of the convertTimeToStreamPos helper. + int res = ov_pcm_seek(&_ovFile, convertTimeToStreamPos(where, getRate(), false).totalNumberOfFrames()); if (res) { warning("Error seeking in Vorbis stream (%d)", res); _pos = _bufferEnd; |