~ubuntu-branches/debian/jessie/scummvm/jessie

« back to all changes in this revision

Viewing changes to backends/platform/psp/mp3.cpp

  • Committer: Package Import Robot
  • Author(s): Moritz Muehlenhoff
  • Date: 2011-11-05 10:29:43 UTC
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: package-import@ubuntu.com-20111105102943-zfm3dhlvy5b01u7v
Tags: upstream-1.4.0
ImportĀ upstreamĀ versionĀ 1.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * along with this program; if not, write to the Free Software
19
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
20
 *
21
 
 * $URL$
22
 
 * $Id$
23
 
 *
24
21
 */
25
22
 
 
23
// Disable printf override in common/forbidden.h to avoid
 
24
// clashes with pspdebug.h from the PSP SDK.
 
25
// That header file uses
 
26
//   __attribute__((format(printf,1,2)));
 
27
// which gets messed up by our override mechanism; this could
 
28
// be avoided by either changing the PSP SDK to use the equally
 
29
// legal and valid
 
30
//   __attribute__((format(__printf__,1,2)));
 
31
// or by refining our printf override to use a varadic macro
 
32
// (which then wouldn't be portable, though).
 
33
// Anyway, for now we just disable the printf override globally
 
34
// for the PSP port
 
35
#define FORBIDDEN_SYMBOL_EXCEPTION_printf
26
36
 
27
37
#include "common/debug.h"
28
38
#include "common/stream.h"
169
179
// TODO: make parallel function for unloading the 1.50 modules
170
180
 
171
181
Mp3PspStream::Mp3PspStream(Common::SeekableReadStream *inStream, DisposeAfterUse::Flag dispose) :
172
 
        _inStream(inStream),
173
 
        _disposeAfterUse(dispose),
 
182
        _inStream(inStream, dispose),
174
183
        _pcmLength(0),
175
184
        _posInFrame(0),
176
185
        _state(MP3_STATE_INIT),
264
273
 
265
274
        deinitStream();
266
275
        releaseStreamME();      // free the memory used for this stream
267
 
 
268
 
        if (_disposeAfterUse == DisposeAfterUse::YES)
269
 
                delete _inStream;
270
276
}
271
277
 
272
278
void Mp3PspStream::deinitStream() {