prime/include/Kyoto/Audio/CStaticAudioPlayer.hpp

44 lines
1.1 KiB
C++

#ifndef _CSTATICAUDIOPLAYER
#define _CSTATICAUDIOPLAYER
#include <Kyoto/Audio/g721.h>
#include <rstl/auto_ptr.hpp>
#include <rstl/string.hpp>
#include <rstl/vector.hpp>
class CDvdRequest;
typedef void (*FAudioCallback)();
class CStaticAudioPlayer {
public:
CStaticAudioPlayer(const rstl::string& filepath, const int w1, const int w2);
~CStaticAudioPlayer();
const bool IsReady() const;
void StartMixOut();
void StopMixOut();
static void MixCallback();
void DoMix();
static void RunDMACallback(FAudioCallback);
static void CancelDMACallback(FAudioCallback);
void Decode(ushort* bufIn, ushort* bufOut, uint numSamples);
private:
rstl::string x0_filepath;
int x10_rsfRem;
int x14_rsfLength;
int x18_curSamp;
int x1c_loopStartSamp;
int x20_loopEndSamp;
int x24_curBuf;
rstl::auto_ptr< uchar > x28_dmaLeft;
rstl::auto_ptr< uchar > x30_dmaRight;
rstl::vector< rstl::auto_ptr< CDvdRequest > > x38_dvdRequests;
rstl::vector< rstl::auto_ptr< uchar > > x48_buffers;
g72x_state x58_leftState;
g72x_state x8c_rightState;
ushort xc0_volume;
};
#endif // _CSTATICAUDIOPLAYER