1 2 #ifndef CPC_PLAYER_H__ 3 #define CPC_PLAYER_H__ 4 5 #include "intern.h" 6 #include "file.h" 7 8 struct FileSystem; 9 struct Mixer; 10 11 struct CpcPlayer { 12 13 Mixer *_mix; 14 FileSystem *_fs; 15 File _f; 16 uint32_t _pos; 17 uint32_t _nextPos; 18 uint32_t _restartPos; 19 char _compression[5]; 20 int _samplesLeft; 21 int16_t _sampleL, _sampleR; 22 23 CpcPlayer(Mixer *mixer, FileSystem *fs); 24 ~CpcPlayer(); 25 26 bool playTrack(int num); 27 void stopTrack(); 28 void pauseTrack(); 29 void resumeTrack(); 30 31 bool nextChunk(); 32 int8_t readSampleData(); 33 bool mix(int16_t *buf, int len); 34 static bool mixCallback(void *param, int16_t *buf, int len); 35 }; 36 37 #endif 38