25 #include "backends/platform/psp/thread.h" 33 typedef void (* callbackFunc)(
void *userData, byte *samples,
int len);
35 _numOfChannels(0), _numOfSamples(0), _callback(0),
36 _bufferToPlay(0), _bufferToFill(0),
37 _init(
false), _paused(
true) {
38 for (
int i=0; i<NUM_BUFFERS; i++)
41 ~PspAudio() { close(); }
43 void nextBuffer(
int &bufferIdx);
44 bool open(uint32 freq, uint32 numOfChannels, uint32 numOfSamples, callbackFunc callback,
void *userData);
46 uint32 getFrequency() {
return FREQUENCY; }
47 void pause() { _paused =
true; }
48 void unpause() { _paused =
false; }
49 virtual void threadFunction();
53 uint32 _numOfChannels;
55 callbackFunc _callback;
57 byte *_buffers[NUM_BUFFERS];