scummvm/scummvm — pull request #485 by Akz- (2014-07-26 12:41:17+00:00)
Title: AUDIO: Increment total play time when decoding MP3 data.

This fixes a bug in the implementation of `MP3Stream`. If the playback of a MP3 stream hasn't yet reached the end-of-stream, seeking the stream backwards does not work as expected.

`MP3Stream::seek` attempts to determine whether the position to seek to is before or after the current stream position by comparing the seek position to the value of `_totalTime`. On current master `_totalTime` is, however, never incremented during normal MP3 playback, so it does not match the actual stream position. This causes the method not to rewind the stream even though it should.

I discovered the bug while working on Escape from Monkey Island support for ResidualVM (residualvm/residualvm#972).