22#ifndef SOUND_MP3_PSP_H
23#define SOUND_MP3_PSP_H
25#include "common/ptr.h"
26#include "common/types.h"
27#include "common/scummsys.h"
30class SeekableReadStream;
36class SeekableAudioStream;
46 #define MAX_SAMPLES_PER_FRAME 1152 * 2
47 int16 _pcmSamples[MAX_SAMPLES_PER_FRAME] __attribute__((aligned(64)));
48 byte _codecInBuffer[3072] __attribute__((aligned(64)));
49 unsigned long _codecParams[65]__attribute__((aligned(64)));
62 mad_timer_t _totalTime;
66 static bool _decoderInit;
67 static bool _decoderFail;
70 BUFFER_SIZE = 5 * 8192
74 byte _buf[BUFFER_SIZE + MAD_BUFFER_GUARD];
77 void readMP3DataIntoBuffer();
79 static bool loadStartAudioModule(
const char *modname,
int partition);
81 void findValidHeader();
83 void updatePcmLength();
86 static bool initDecoder();
87 static bool stopDecoder();
91 void releaseStreamME();
98 static inline bool isOkToCreateStream() {
109 bool endOfData()
const {
return _state == MP3_STATE_EOS; }
bool endOfData() const
Definition: mp3.h:109
Timestamp getLength() const
Definition: mp3.h:114
bool seek(const Timestamp &where)
int readBuffer(int16 *buffer, const int numSamples)
int getRate() const
Definition: mp3.h:111
bool isStereo() const
Definition: mp3.h:110
Definition: audiostream.h:212
Definition: timestamp.h:83
Definition: algorithm.h:29