aboutsummaryrefslogtreecommitdiff
path: root/sound/decoders/vorbis.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-28 09:44:21 +0000
committerJohannes Schickel2010-01-28 09:44:21 +0000
commit0417c0ab888fcf674ea1a1138ce7a555a67c796d (patch)
tree309bf39932c6d34f440e79a28ad5202438c1d53c /sound/decoders/vorbis.cpp
parent1c906a1f08f9d1f316c2efd65a347c00e07bc469 (diff)
downloadscummvm-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.cpp4
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;