-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e4aae1
commit ac075ff
Showing
5 changed files
with
424 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef JAUDIO_JASCMDSTACK_H | ||
#define JAUDIO_JASCMDSTACK_H | ||
|
||
#include "JSystem/JSupport/JSUList.h" | ||
|
||
struct JASPortArgs; // TODO | ||
|
||
class JASPortCmd { // Autogenerated | ||
public: | ||
class TPortHead { | ||
public: | ||
void execCommandOnce(); | ||
void execCommandStay(); | ||
private: | ||
JSUList<JASPortCmd> mList; | ||
}; | ||
static void addPortCmdOnce(); | ||
void addPortCmdStay(); | ||
void cancelPortCmdStay(); | ||
void setPortCmd(void (*func)(JASPortArgs *), JASPortArgs *args); | ||
static void execAllCommand(); | ||
|
||
static TPortHead sCommandListOnce; | ||
static TPortHead sCommandListStay; | ||
}; // class JASCmdStack | ||
|
||
#endif // JAUDIO_JASCMDSTACK_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,65 @@ | ||
#ifndef JAUDIO_JASDRIVER_H | ||
#define JAUDIO_JASDRIVER_H | ||
|
||
#include "types.h" | ||
#include <dolphin/ai.h> | ||
|
||
enum JASMixMode | ||
{ | ||
MixMode_Mono, | ||
MixMode_Mono_Wide, | ||
MixMode_Extra, | ||
MixMode_InterLeave | ||
MixMode_InterLeave, | ||
MixMode_Max, // 4 | ||
}; | ||
|
||
enum JASOutputRate | ||
{ | ||
// TODO | ||
OutputRate_32kHz, | ||
OutputRate_48kHz | ||
}; | ||
|
||
typedef s16 *(*JASMixCallBack)(s32); | ||
typedef void (*JASDACCallBack)(s16 *, u32); | ||
typedef void (*JASMixFunc)(s16 *, u32, JASMixCallBack); | ||
|
||
class JASDriver | ||
namespace JASDriver | ||
{ | ||
public: | ||
static void setDSPLevel(f32); | ||
// JASAiCtrl | ||
void initAI(AIDCallback); | ||
void setDSPLevel(f32); | ||
void startDMA(); | ||
void stopDMA(); | ||
void setOutputRate(JASOutputRate); | ||
void updateDac(); | ||
void updateDSP(); | ||
void readDspBuffer(s16 *, u32); | ||
void finishDSPFrame(); | ||
static void registerMixCallback(JASMixCallBack, JASMixMode); | ||
void getDacRate(); | ||
void getSubFrames(); | ||
void getSubFrameCounter(); | ||
static void waitSubFrame(); | ||
|
||
static void setOutputMode(u32); | ||
static u32 getOutputMode(); | ||
|
||
// Inline/Unused | ||
void registerMixCallback(JASMixCallBack, JASMixMode); | ||
f32 getDacRate(); | ||
u32 getSubFrames(); | ||
u32 getSubFrameCounter(); | ||
void waitSubFrame(); | ||
void setSubFrames(u32); | ||
void setNumDSPBuffer(u8); | ||
void registerDacCallback(void (*)(s16 *, u32)); | ||
void registDSPBufCallback(void (*)(s16 *, u32)); | ||
|
||
// JASDriverIF | ||
void setDSPLevel(f32); | ||
void getChannelLevel_dsp(); | ||
void getDSPLevel(); | ||
void setOutputMode(u32); | ||
u32 getOutputMode(); | ||
void waitSubFrame(); | ||
void rejectCallback(s32 (*) (void *), void *); | ||
void registerDspSyncCallback(s32 (*) (void *), void *); | ||
void registerSubFrameCallback(s32 (*) (void *), void *); | ||
void subframeCallback(); | ||
void DSPSyncCallback(); | ||
void updateDacCallback(); | ||
void setChannelLevel(f32); | ||
f32 getChannelLevel(); | ||
void registerUpdateDacCallback(s32 (*) (void *), void *); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef JASPROBE_H | ||
#define JASPROBE_H | ||
|
||
#include "types.h" | ||
|
||
class JASProbe { // Autogenerated | ||
public: | ||
static void start(s32, const char *); // 0x80090c48 | ||
static void stop(s32); // 0x80090cb4 | ||
static JASProbe* sProbeTable[16]; // 0x803faa9c | ||
// Inline/Unused | ||
JASProbe(); | ||
void reset(); | ||
void start(const char *); | ||
void stop(); | ||
void registProbe(s32, JASProbe *); | ||
static const char *sDefaultName; | ||
|
||
char const* mName; | ||
s32 mStartTime; | ||
f32 _08; | ||
f32 _0C; | ||
f32 _10; | ||
f32 _14; | ||
f32 _18[100]; | ||
u32 _1A8; | ||
}; // class JASProbe | ||
|
||
#endif // JASPROBE_H |
Oops, something went wrong.