[Scummvm-cvs-logs] SF.net SVN: scummvm:[52890] scummvm/trunk/backends/platform/psp
bluddy at users.sourceforge.net
bluddy at users.sourceforge.net
Sat Sep 25 22:38:40 CEST 2010
Revision: 52890
http://scummvm.svn.sourceforge.net/scummvm/?rev=52890&view=rev
Author: bluddy
Date: 2010-09-25 20:38:40 +0000 (Sat, 25 Sep 2010)
Log Message:
-----------
PSP: ME MP3: cache stereo status
Bad timing can cause stereo status not to be picked up if at some point a MAD _header is not initialized.
Modified Paths:
--------------
scummvm/trunk/backends/platform/psp/mp3.cpp
scummvm/trunk/backends/platform/psp/mp3.h
Modified: scummvm/trunk/backends/platform/psp/mp3.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/mp3.cpp 2010-09-25 20:32:17 UTC (rev 52889)
+++ scummvm/trunk/backends/platform/psp/mp3.cpp 2010-09-25 20:38:40 UTC (rev 52890)
@@ -190,6 +190,7 @@
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
Modified: scummvm/trunk/backends/platform/psp/mp3.h
===================================================================
--- scummvm/trunk/backends/platform/psp/mp3.h 2010-09-25 20:32:17 UTC (rev 52889)
+++ scummvm/trunk/backends/platform/psp/mp3.h 2010-09-25 20:38:40 UTC (rev 52890)
@@ -61,6 +61,7 @@
Timestamp _length;
uint32 _sampleRate;
+ bool _stereo;
mad_timer_t _totalTime;
mad_stream _stream; //
@@ -110,7 +111,7 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list