VI (Thanks HeartPiece) and CStaticAudio work

Former-commit-id: 4babadb501a53ed61876f37a6a60fba76de55e02
This commit is contained in:
2023-10-19 19:10:34 -07:00
parent f49069d4e6
commit 392fa91842
11 changed files with 2347 additions and 69 deletions

View File

@@ -0,0 +1,43 @@
#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