aboutsummaryrefslogtreecommitdiff
path: root/sound/mp3.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-05 20:14:28 +0000
committerJohannes Schickel2010-01-05 20:14:28 +0000
commit920dac2f9d271889ffdc6c05313c89a6077ec2d2 (patch)
tree5ca24942081a5171605aea463febd5a06860d5ac /sound/mp3.cpp
parente9a94ecb9b6eb20cb7cdc4f838df3f9b049d2de6 (diff)
downloadscummvm-rg350-920dac2f9d271889ffdc6c05313c89a6077ec2d2.tar.gz
scummvm-rg350-920dac2f9d271889ffdc6c05313c89a6077ec2d2.tar.bz2
scummvm-rg350-920dac2f9d271889ffdc6c05313c89a6077ec2d2.zip
Remove unsafe getTotalPlayTime from AudioStream.
svn-id: r47037
Diffstat (limited to 'sound/mp3.cpp')
-rw-r--r--sound/mp3.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/mp3.cpp b/sound/mp3.cpp
index 332fe20d59..faebf347e1 100644
--- a/sound/mp3.cpp
+++ b/sound/mp3.cpp
@@ -93,11 +93,6 @@ public:
bool endOfData() const { return _state == MP3_STATE_EOS; }
bool isStereo() const { return MAD_NCHANNELS(&_frame.header) == 2; }
int getRate() const { return _frame.header.samplerate; }
- int32 getTotalPlayTime() const {
- if (!_numLoops)
- return kUnknownPlayTime;
- return _totalPlayTime * _numLoops;
- }
bool seek(const Timestamp &where);
// TODO: Maybe we can have a more precise implementation of this
@@ -167,7 +162,7 @@ MP3InputStream::MP3InputStream(Common::SeekableReadStream *inStream, bool dispos
_totalPlayTime = mad_timer_count(length, MAD_UNITS_MILLISECONDS);
if (mad_timer_sign(length) < 0)
- _totalPlayTime = kUnknownPlayTime;
+ _totalPlayTime = 0;
// Decode the first chunk of data. This is necessary so that _frame
// is setup and isStereo() and getRate() return correct results.