diff options
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/psp/mp3.cpp | 1 | ||||
-rw-r--r-- | backends/platform/psp/mp3.h | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/backends/platform/psp/mp3.cpp b/backends/platform/psp/mp3.cpp index da189c532c..574cf0d719 100644 --- a/backends/platform/psp/mp3.cpp +++ b/backends/platform/psp/mp3.cpp @@ -190,6 +190,7 @@ Mp3PspStream::Mp3PspStream(Common::SeekableReadStream *inStream, DisposeAfterUse findValidHeader(); // get a first header so we can read basic stuff _sampleRate = _header.samplerate; // copy it before it gets destroyed + _stereo = (MAD_NCHANNELS(&_header) == 2); while (_state != MP3_STATE_EOS) findValidHeader(); // get a first header so we can read basic stuff diff --git a/backends/platform/psp/mp3.h b/backends/platform/psp/mp3.h index 983f4cb7f4..71a248ad78 100644 --- a/backends/platform/psp/mp3.h +++ b/backends/platform/psp/mp3.h @@ -61,6 +61,7 @@ protected: Timestamp _length; uint32 _sampleRate; + bool _stereo; mad_timer_t _totalTime; mad_stream _stream; // @@ -110,7 +111,7 @@ public: int readBuffer(int16 *buffer, const int numSamples); bool endOfData() const { return _state == MP3_STATE_EOS; } - bool isStereo() const { return MAD_NCHANNELS(&_header) == 2; } + bool isStereo() const { return _stereo; } int getRate() const { return _sampleRate; } bool seek(const Timestamp &where); |