mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-03 08:23:08 -04:00
JAudio field name/comment pass
HUGE thanks to XAYRGA for their work documenting JAudio file formats
This commit is contained in:
@@ -17,6 +17,8 @@ namespace JASDsp {
|
||||
*/
|
||||
class JASAramStream {
|
||||
public:
|
||||
static const int CHANNEL_MAX = 6;
|
||||
|
||||
typedef void (*StreamCallback)(u32, JASAramStream*, void*);
|
||||
|
||||
enum CallbackType {
|
||||
@@ -32,29 +34,29 @@ public:
|
||||
};
|
||||
|
||||
struct Header {
|
||||
/* 0x00 */ u32 tag;
|
||||
/* 0x00 */ u32 tag; // 'STRM'
|
||||
/* 0x04 */ u8 field_0x4[5];
|
||||
/* 0x09 */ u8 format;
|
||||
/* 0x0A */ u8 bits;
|
||||
/* 0x0C */ u16 channels;
|
||||
/* 0x0E */ u16 loop;
|
||||
/* 0x10 */ int field_0x10;
|
||||
/* 0x14 */ u8 field_0x14[4];
|
||||
/* 0x10 */ int mSampleRate;
|
||||
/* 0x14 */ u32 mSampleCount; // unused
|
||||
/* 0x18 */ int loop_start;
|
||||
/* 0x1C */ int loop_end;
|
||||
/* 0x20 */ u32 block_size;
|
||||
/* 0x24 */ u8 field_0x24[4];
|
||||
/* 0x28 */ u8 field_0x28;
|
||||
/* 0x29 */ u8 field_0x29[0x17];
|
||||
/* 0x24 */ u8 _unused2[4];
|
||||
/* 0x28 */ u8 mVolume;
|
||||
/* 0x29 */ u8 _unused3[0x17];
|
||||
}; // Size: 0x40
|
||||
|
||||
struct BlockHeader {
|
||||
/* 0x00 */ u32 tag;
|
||||
/* 0x04 */ u32 field_0x4;
|
||||
/* 0x00 */ u32 tag; // 'BLCK'
|
||||
/* 0x04 */ u32 mSize;
|
||||
/* 0x08 */ struct {
|
||||
s16 field_0x0;
|
||||
s16 field_0x2;
|
||||
} field_0x8[6];
|
||||
s16 mpLast;
|
||||
s16 mpPenult;
|
||||
} mAdpcmContinuationData[CHANNEL_MAX];
|
||||
}; // Size: 0x20
|
||||
|
||||
static void initSystem(u32, u32);
|
||||
@@ -128,14 +130,12 @@ public:
|
||||
|
||||
static u32 getBlockSize() { return sBlockSize; }
|
||||
|
||||
static const int CHANNEL_MAX = 6;
|
||||
|
||||
/* 0x000 */ OSMessageQueue field_0x000;
|
||||
/* 0x020 */ OSMessageQueue field_0x020;
|
||||
/* 0x040 */ void* field_0x040[16];
|
||||
/* 0x080 */ void* field_0x080[4];
|
||||
/* 0x090 */ JASChannel* mChannels[CHANNEL_MAX];
|
||||
/* 0x0A8 */ JASChannel* field_0x0a8;
|
||||
/* 0x0A8 */ JASChannel* mInitialChannel;
|
||||
/* 0x0AC */ bool field_0x0ac;
|
||||
/* 0x0AD */ bool field_0x0ad;
|
||||
/* 0x0AE */ u8 field_0x0ae;
|
||||
@@ -157,17 +157,17 @@ public:
|
||||
/* 0x124 */ int field_0x124;
|
||||
/* 0x128 */ u16 field_0x128;
|
||||
/* 0x12C */ int field_0x12c;
|
||||
/* 0x130 */ s16 field_0x130[CHANNEL_MAX];
|
||||
/* 0x13C */ s16 field_0x13c[CHANNEL_MAX];
|
||||
/* 0x148 */ int field_0x148;
|
||||
/* 0x130 */ s16 mpLasts[CHANNEL_MAX];
|
||||
/* 0x13C */ s16 mpPenults[CHANNEL_MAX];
|
||||
/* 0x148 */ int mAramAddress;
|
||||
/* 0x14C */ u32 field_0x14c;
|
||||
/* 0x150 */ StreamCallback mCallback;
|
||||
/* 0x154 */ void* mCallbackData;
|
||||
/* 0x158 */ u16 field_0x158;
|
||||
/* 0x158 */ u16 mFormat;
|
||||
/* 0x15A */ u16 mChannelNum;
|
||||
/* 0x15C */ u32 mBufCount;
|
||||
/* 0x160 */ u32 field_0x160;
|
||||
/* 0x164 */ u32 field_0x164;
|
||||
/* 0x160 */ u32 mBlocksPerChannel;
|
||||
/* 0x164 */ u32 mSampleRate;
|
||||
/* 0x168 */ bool mLoop;
|
||||
/* 0x16C */ u32 mLoopStart;
|
||||
/* 0x170 */ u32 mLoopEnd;
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
/* 0x194 */ f32 mChannelPan[CHANNEL_MAX];
|
||||
/* 0x1AC */ f32 mChannelFxMix[CHANNEL_MAX];
|
||||
/* 0x1C4 */ f32 mChannelDolby[CHANNEL_MAX];
|
||||
/* 0x1DC */ u16 field_0x1dc[CHANNEL_MAX];
|
||||
/* 0x1DC */ u16 mMixConfig[CHANNEL_MAX];
|
||||
|
||||
static JASTaskThread* sLoadThread;
|
||||
static u8* sReadBuffer;
|
||||
|
||||
@@ -10,21 +10,21 @@ class JKRHeap;
|
||||
|
||||
namespace JASBNKParser {
|
||||
struct TFileHeader {
|
||||
/* 0x0 */ BE(int) id;
|
||||
/* 0x0 */ BE(int) mMagic;
|
||||
/* 0x4 */ BE(u32) mSize;
|
||||
/* 0x8 */ u8 _08[4];
|
||||
/* 0x8 */ BE(u32) mGlobalId;
|
||||
/* 0xC */ BE(u32) mVersion;
|
||||
};
|
||||
|
||||
namespace Ver1 {
|
||||
struct TOsc {
|
||||
/* 0x00 */ BE(u32) id;
|
||||
/* 0x00 */ BE(u32) id; // "Osci"
|
||||
/* 0x04 */ u8 mTarget;
|
||||
/* 0x08 */ BE(f32) _08;
|
||||
/* 0x0C */ BE(u32) mTableOffset;
|
||||
/* 0x10 */ BE(u32) _10;
|
||||
/* 0x14 */ BE(f32) mScale;
|
||||
/* 0x18 */ BE(f32) _18;
|
||||
/* 0x08 */ BE(f32) mRate;
|
||||
/* 0x0C */ BE(u32) mAttackEnvelopeOffset;
|
||||
/* 0x10 */ BE(u32) mReleaseEnvelopeOffset;
|
||||
/* 0x14 */ BE(f32) mScale; // width
|
||||
/* 0x18 */ BE(f32) mVertex;
|
||||
};
|
||||
|
||||
struct TPercData {
|
||||
@@ -36,7 +36,7 @@ namespace JASBNKParser {
|
||||
};
|
||||
|
||||
struct TChunk {
|
||||
/* 0x0 */ BE(u32) mID;
|
||||
/* 0x0 */ BE(u32) mID; // Magic
|
||||
/* 0x4 */ BE(u32) mSize;
|
||||
};
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace JASBNKParser {
|
||||
};
|
||||
|
||||
struct TOffsetData {
|
||||
/* 0x000 */ u8 field_0x20[4];
|
||||
/* 0x000 */ BE(u32) mMagic; // 'BANK'
|
||||
/* 0x004 */ TOffset<TInst> mInstOffset[0x80];
|
||||
/* 0x204 */ u8 field_0x204[0x190];
|
||||
/* 0x394 */ TOffset<TPerc> mPercOffset[12];
|
||||
|
||||
@@ -45,6 +45,9 @@ public:
|
||||
/* 0x14 */ f32 mDolby;
|
||||
};
|
||||
|
||||
#define CHANNEL_WAVE 0
|
||||
#define CHANNEL_OSCILLATOR 2
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
*
|
||||
@@ -52,7 +55,7 @@ public:
|
||||
class JASChannel : public JASPoolAllocObject_MultiThreaded<JASChannel> {
|
||||
public:
|
||||
typedef void (*Callback)(u32, JASChannel*, JASDsp::TChannel*, void*);
|
||||
static const int BUSOUT_CPUCH = 6;
|
||||
static const int BUSOUT_CPUCH = DSP_OUTPUT_CHANNELS;
|
||||
static const int OSC_NUM = 2;
|
||||
|
||||
enum CallbackType {
|
||||
@@ -153,10 +156,14 @@ public:
|
||||
/* 0xD4 */ u32 mKeySweepCount;
|
||||
/* 0xD8 */ u32 mSkipSamples;
|
||||
struct {
|
||||
u32 field_0x0;
|
||||
JASWaveInfo field_0x4;
|
||||
u32 mChannelType; // CHANNEL_WAVE or CHANNEL_OSCILLATOR
|
||||
JASWaveInfo mWaveInfo;
|
||||
} field_0xdc;
|
||||
intptr_t field_0x104;
|
||||
union {
|
||||
u32 mWaveAramAddress;
|
||||
u32 mOscillatorSomething;
|
||||
u32 field_0x104;
|
||||
};
|
||||
|
||||
static OSMessageQueue sBankDisposeMsgQ;
|
||||
static OSMessage sBankDisposeMsg[16];
|
||||
|
||||
@@ -5,9 +5,14 @@
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
*
|
||||
* Responsible for allocating and prioritizing the available hardware DSP channels.
|
||||
*/
|
||||
struct JASDSPChannel {
|
||||
/**
|
||||
* Callback used to update DSP channel information on a regular basis.
|
||||
* Parameters are a CallbackType, hardware channel, and specified user data.
|
||||
* Return -1 to immediately abort playback.
|
||||
*/
|
||||
typedef s32 (*Callback)(u32, JASDsp::TChannel*, void*);
|
||||
|
||||
enum Status {
|
||||
@@ -17,9 +22,24 @@ struct JASDSPChannel {
|
||||
};
|
||||
|
||||
enum CallbackType {
|
||||
/**
|
||||
* Fired on a regular basis during play to update parameters.
|
||||
*/
|
||||
/* 0 */ CB_PLAY,
|
||||
|
||||
/**
|
||||
* Fired once, when the channel starts playing.
|
||||
*/
|
||||
/* 1 */ CB_START,
|
||||
|
||||
/**
|
||||
* Fired once, when the channel naturally finishes playing.
|
||||
*/
|
||||
/* 2 */ CB_STOP,
|
||||
|
||||
/**
|
||||
* Fired once, if the channel is abruptly stopped due to an error or prioritization.
|
||||
*/
|
||||
/* 3 */ CB_DROP,
|
||||
};
|
||||
|
||||
@@ -46,9 +66,13 @@ struct JASDSPChannel {
|
||||
static JASDSPChannel* sDspChannels;
|
||||
|
||||
/* 0x00 */ s32 mStatus;
|
||||
|
||||
/**
|
||||
* Priority of this DSP channel. Used to
|
||||
*/
|
||||
/* 0x04 */ s16 mPriority;
|
||||
/* 0x08 */ u32 mFlags;
|
||||
/* 0x0C */ u32 field_0xc;
|
||||
/* 0x0C */ u32 mUpdateCounter;
|
||||
/* 0x10 */ Callback mCallback;
|
||||
/* 0x14 */ void* mCallbackData;
|
||||
/* 0x18 */ JASDsp::TChannel* mChannel;
|
||||
|
||||
@@ -3,6 +3,16 @@
|
||||
|
||||
#include <types.h>
|
||||
|
||||
/**
|
||||
* Amount of separate audio channels (i.e. individual playbacks, voices) the DSP can mix at once.
|
||||
*/
|
||||
#define DSP_CHANNELS 64
|
||||
|
||||
/**
|
||||
* Amount of audio channels the DSP can calculate outputs for.
|
||||
*/
|
||||
#define DSP_OUTPUT_CHANNELS 6 // Presumed 5.1 surround
|
||||
|
||||
struct JASWaveInfo;
|
||||
|
||||
namespace JASDsp {
|
||||
@@ -29,6 +39,24 @@ namespace JASDsp {
|
||||
u16 field_0x10[8];
|
||||
} FxBuf;
|
||||
|
||||
struct OutputChannelConfig {
|
||||
u16 mBusConnect;
|
||||
u16 mTargetVolume;
|
||||
u16 mCurrentVolume;
|
||||
|
||||
/**
|
||||
* Gets upper 8 bits cleared when audio volume is changed mid-playback.
|
||||
* Presumed to be some kind of progress used by the DSP to calculate position between
|
||||
* mTargetVolume and mCurrentVolume.
|
||||
*/
|
||||
u16 mVolumeProgress;
|
||||
};
|
||||
|
||||
/**
|
||||
* DSP memory for each playback channel ("voice").
|
||||
* The DSP can read and write this memory. It is used as configuration, feedback,
|
||||
* and working memory.
|
||||
*/
|
||||
struct TChannel {
|
||||
void init();
|
||||
void playStart();
|
||||
@@ -36,67 +64,83 @@ namespace JASDsp {
|
||||
void replyFinishRequest();
|
||||
void forceStop();
|
||||
bool isActive() const;
|
||||
|
||||
/**
|
||||
* Check whether the DSP has finished playing this channel.
|
||||
*/
|
||||
bool isFinish() const;
|
||||
void setWaveInfo(JASWaveInfo const&, u32, u32);
|
||||
void setOscInfo(u32);
|
||||
void initAutoMixer();
|
||||
void setAutoMixer(u16, u8, u8, u8, u8);
|
||||
void setPitch(u16);
|
||||
void setMixerInitVolume(u8, s16);
|
||||
void setMixerVolume(u8, s16);
|
||||
void setMixerInitVolume(u8 outputChannel, s16 volume);
|
||||
void setMixerVolume(u8 outputChannel, s16 volume);
|
||||
void setPauseFlag(u8);
|
||||
|
||||
/**
|
||||
* Flushes backing memory of channel out of the data cache.
|
||||
*/
|
||||
void flush();
|
||||
void initFilter();
|
||||
void setFilterMode(u16);
|
||||
void setIIRFilterParam(s16*);
|
||||
void setFIR8FilterParam(s16*);
|
||||
void setDistFilter(s16);
|
||||
void setBusConnect(u8, u8);
|
||||
void setBusConnect(u8 outputChannel, u8 param_1);
|
||||
|
||||
/* 0x000 */ u16 mIsActive;
|
||||
/* 0x002 */ u16 mIsFinished;
|
||||
/* 0x004 */ u16 mPitch;
|
||||
/* 0x006 */ short field_0x006;
|
||||
/* 0x006 */ short _unused1;
|
||||
/* 0x008 */ u16 field_0x008;
|
||||
/* 0x00A */ u8 field_0x00A[0x00C - 0x00A];
|
||||
/* 0x00A */ u8 _unused2[0x00C - 0x00A];
|
||||
/* 0x00C */ s16 mPauseFlag;
|
||||
/* 0x00E */ short field_0x00E;
|
||||
/* 0x010 */ u16 field_0x010[1][4]; // array size unknown
|
||||
/* 0x018 */ u8 field_0x018[0x050 - 0x018];
|
||||
/* 0x050 */ u16 field_0x050;
|
||||
/* 0x052 */ u16 field_0x052;
|
||||
/* 0x054 */ u16 field_0x054;
|
||||
/* 0x056 */ u16 field_0x056;
|
||||
/* 0x058 */ u16 field_0x058;
|
||||
/* 0x05A */ u8 field_0x05A[0x060 - 0x05A];
|
||||
/* 0x060 */ short field_0x060;
|
||||
/* 0x062 */ u8 field_0x062[0x064 - 0x062];
|
||||
/* 0x064 */ u16 field_0x064;
|
||||
/* 0x066 */ short field_0x066;
|
||||
/* 0x068 */ int field_0x068;
|
||||
/* 0x06C */ u8 field_0x06C[0x070 - 0x06C];
|
||||
/* 0x070 */ int field_0x070;
|
||||
/* 0x00E */ short _unused3;
|
||||
/* 0x010 */ OutputChannelConfig mOutputChannels[DSP_OUTPUT_CHANNELS];
|
||||
/* 0x040 */ u8 _unused4[0x050 - 0x040];
|
||||
/* 0x050 */ u16 mAutoMixerPanDolby; // pan is upper 8 bits, dolby lower 8.
|
||||
/* 0x052 */ u16 mAutoMixerFxMix;
|
||||
/* 0x054 */ u16 mAutoMixerInitVolume;
|
||||
/* 0x056 */ u16 mAutoMixerVolume;
|
||||
/* 0x058 */ u16 mAutoMixerBeenSet;
|
||||
/* 0x05A */ u8 _unused5[0x060 - 0x05A];
|
||||
/* 0x060 */ short field_0x060; // Only cleared to zero, presumed used by DSP.
|
||||
/* 0x062 */ u8 _unused6[0x064 - 0x062];
|
||||
/* 0x064 */ u16 mSamplesPerBlock;
|
||||
/* 0x066 */ short field_0x066; // Only cleared to zero, presumed used by DSP.
|
||||
/* 0x068 */ int mSamplePosition; // Only ever initialized by code, name is guess.
|
||||
/* 0x06C */ u8 _unused7[0x070 - 0x06C];
|
||||
/* 0x070 */ int mAramStreamPosition; // Seems written by DSP, used for audio streaming.
|
||||
/* 0x074 */ int field_0x074;
|
||||
/* 0x078 */ short field_0x078[4];
|
||||
/* 0x080 */ short field_0x080[20];
|
||||
/* 0x0A8 */ short field_0x0a8[4];
|
||||
/* 0x0B0 */ u16 field_0x0b0[16];
|
||||
/* 0x0D0 */ u8 field_0x0D0[0x100 - 0x0D0];
|
||||
/* 0x100 */ u16 field_0x100;
|
||||
/* 0x078 */ short field_0x078[4]; // Only cleared to zero, presumed used by DSP.
|
||||
/* 0x080 */ short field_0x080[20]; // Only cleared to zero, presumed used by DSP.
|
||||
/* 0x0A8 */ short field_0x0a8[4]; // Only cleared to zero, presumed used by DSP.
|
||||
/* 0x0B0 */ u16 field_0x0b0[16]; // Only cleared to zero, presumed used by DSP.
|
||||
/* 0x0D0 */ u8 _unused8[0x100 - 0x0D0];
|
||||
/* 0x100 */ u16 mBytesPerBlock;
|
||||
/* 0x102 */ u16 field_0x102;
|
||||
/* 0x104 */ s16 field_0x104;
|
||||
/* 0x106 */ s16 field_0x106;
|
||||
|
||||
/**
|
||||
* Used for decoding ADPCM data around loop edges.
|
||||
*/
|
||||
/* 0x104 */ s16 mpLast;
|
||||
|
||||
/**
|
||||
* Used for decoding ADPCM data around loop edges.
|
||||
*/
|
||||
/* 0x106 */ s16 mpPenult;
|
||||
/* 0x108 */ u16 mFilterMode;
|
||||
/* 0x10A */ u16 mForcedStop;
|
||||
/* 0x10C */ int field_0x10c;
|
||||
/* 0x110 */ u32 field_0x110;
|
||||
/* 0x114 */ u32 field_0x114;
|
||||
/* 0x118 */ u32 field_0x118;
|
||||
/* 0x11C */ int field_0x11c;
|
||||
/* 0x110 */ u32 mLoopStartSample;
|
||||
/* 0x114 */ u32 mEndSample;
|
||||
/* 0x118 */ u32 mWaveAramAddress;
|
||||
/* 0x11C */ int mSampleCount;
|
||||
/* 0x120 */ s16 fir_filter_params[8];
|
||||
/* 0x130 */ u8 field_0x130[0x148 - 0x130];
|
||||
/* 0x130 */ u8 _unused9[0x148 - 0x130];
|
||||
/* 0x148 */ s16 iir_filter_params[8];
|
||||
/* 0x158 */ u8 field_0x158[0x180 - 0x158];
|
||||
/* 0x158 */ u8 _unused10[0x180 - 0x158];
|
||||
};
|
||||
|
||||
void boot(void (*)(void*));
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include "JSystem/JAudio2/JASCallback.h"
|
||||
|
||||
#define JAS_OUTPUT_MONO OS_SOUND_MODE_MONO
|
||||
#define JAS_OUTPUT_STEREO OS_SOUND_MODE_STEREO
|
||||
#define JAS_OUTPUT_SURROUND 2
|
||||
|
||||
typedef s32 (*DriverCallback)(void*);
|
||||
|
||||
namespace JASDriver {
|
||||
|
||||
@@ -9,10 +9,21 @@
|
||||
*
|
||||
*/
|
||||
struct JASOscillator {
|
||||
enum EnvelopeMode {
|
||||
/* 0x0 */ ENVELOPE_LINEAR,
|
||||
/* 0x1 */ ENVELOPE_SQUARE,
|
||||
/* 0x2 */ ENVELOPE_SQUARE_ROOT,
|
||||
/* 0x3 */ ENVELOPE_SAMPLE_CELL,
|
||||
|
||||
ENVELOPE_LOOP = 0xD,
|
||||
ENVELOPE_HOLD = 0xE,
|
||||
ENVELOPE_STOP = 0xF,
|
||||
};
|
||||
|
||||
struct Point {
|
||||
/* 0x0 */ BE(s16) _0;
|
||||
/* 0x2 */ BE(s16) _2;
|
||||
/* 0x4 */ BE(s16) _4;
|
||||
/* 0x0 */ BE(s16) mEnvelopeMode; // EnvelopeMode
|
||||
/* 0x2 */ BE(s16) mTime;
|
||||
/* 0x4 */ BE(s16) mValue;
|
||||
};
|
||||
|
||||
struct EffectParams {
|
||||
@@ -37,11 +48,11 @@ struct JASOscillator {
|
||||
|
||||
struct Data {
|
||||
/* 0x00 */ u32 mTarget;
|
||||
/* 0x04 */ f32 _04;
|
||||
/* 0x04 */ f32 mRate;
|
||||
/* 0x08 */ const Point* mTable;
|
||||
/* 0x0C */ const Point* rel_table;
|
||||
/* 0x10 */ f32 mScale;
|
||||
/* 0x14 */ f32 _14;
|
||||
/* 0x10 */ f32 mScale; // aka width
|
||||
/* 0x14 */ f32 mVertex;
|
||||
};
|
||||
|
||||
enum Target {
|
||||
@@ -75,9 +86,9 @@ struct JASOscillator {
|
||||
/* 0x08 */ f32 _08;
|
||||
/* 0x0C */ f32 _0C;
|
||||
/* 0x10 */ f32 _10;
|
||||
/* 0x14 */ u16 _14;
|
||||
/* 0x14 */ u16 mCurPoint;
|
||||
/* 0x16 */ u16 mDirectRelease;
|
||||
/* 0x18 */ u8 _18;
|
||||
/* 0x18 */ u8 mEnvelopeMode; // EnvelopeMode
|
||||
/* 0x1A */ u16 _1A;
|
||||
/* 0x1C */ int _1C;
|
||||
|
||||
|
||||
@@ -31,26 +31,28 @@ public:
|
||||
|
||||
struct TWave {
|
||||
/* 0x00 */ u8 _00;
|
||||
/* 0x01 */ u8 _01;
|
||||
/* 0x02 */ u8 _02;
|
||||
/* 0x04 */ BE(f32) _04;
|
||||
/* 0x08 */ BE(u32) mOffset;
|
||||
/* 0x0C */ BE(u32) _0C;
|
||||
/* 0x10 */ BE(u32) _10;
|
||||
/* 0x14 */ BE(u32) _14;
|
||||
/* 0x18 */ BE(u32) _18;
|
||||
/* 0x1C */ BE(u32) _1C;
|
||||
/* 0x20 */ BE(s16) _20;
|
||||
/* 0x22 */ BE(s16) _22;
|
||||
/* 0x01 */ u8 mWaveFormat;
|
||||
/* 0x02 */ u8 mBaseKey;
|
||||
/* 0x04 */ BE(f32) mSampleRate;
|
||||
/* 0x08 */ BE(u32) mAWOffsetStart;
|
||||
/* 0x0C */ BE(u32) mAWOffsetEnd;
|
||||
/* 0x10 */ BE(u32) mLoopFlags;
|
||||
/* 0x14 */ BE(u32) mLoopStartSample;
|
||||
/* 0x18 */ BE(u32) mLoopEndSample;
|
||||
/* 0x1C */ BE(u32) mSampleCount;
|
||||
/* 0x20 */ BE(s16) mpLast;
|
||||
/* 0x22 */ BE(s16) mpPenult;
|
||||
};
|
||||
|
||||
struct TWaveArchive {
|
||||
/* 0x00 */ char mFileName[0x74]; // unknown length
|
||||
/* 0x00 */ char mFileName[0x70];
|
||||
/* 0x70 */ BE(u32) mWaveCount;
|
||||
/* 0x74 */ TOffset<TWave> mWaveOffsets[0];
|
||||
};
|
||||
|
||||
struct TWaveArchiveBank {
|
||||
/* 0x0 */ u8 _00[8];
|
||||
/* 0x0 */ BE(u32) mMagic; // 'WINF'
|
||||
/* 0x0 */ BE(u32) mArchiveCounts;
|
||||
/* 0x8 */ TOffset<TWaveArchive> mArchiveOffsets[0];
|
||||
};
|
||||
|
||||
@@ -66,14 +68,17 @@ public:
|
||||
};
|
||||
|
||||
struct TCtrlGroup {
|
||||
/* 0x0 */ u8 _00[8];
|
||||
/* 0x0 */ BE(u32) mMagic; // 'WBCT'
|
||||
/* 0x4 */ u32 mUnknown;
|
||||
/* 0x8 */ BE(u32) mGroupCount;
|
||||
/* 0xC */ TOffset<TCtrlScene> mCtrlSceneOffsets[0];
|
||||
};
|
||||
|
||||
/** @fabricated */
|
||||
struct THeader {
|
||||
/* 0x00 */ u8 _00[0xC];
|
||||
/* 0x00 */ BE(u32) mMagic; // 'WSYS'
|
||||
/* 0x04 */ BE(u32) mSize;
|
||||
/* 0x08 */ BE(u32) mId;
|
||||
/* 0x0C */ BE(u32) mWaveTableSize;
|
||||
/* 0x10 */ TOffset<TWaveArchiveBank> mArchiveBankOffset;
|
||||
/* 0x14 */ TOffset<TCtrlGroup> mCtrlGroupOffset;
|
||||
|
||||
@@ -5,27 +5,32 @@
|
||||
|
||||
class JASWaveArc;
|
||||
|
||||
#define WAVE_FORMAT_ADPCM4 0
|
||||
#define WAVE_FORMAT_ADPCM2 1
|
||||
#define WAVE_FORMAT_PCM8 2
|
||||
#define WAVE_FORMAT_PCM16 3
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
*
|
||||
*/
|
||||
struct JASWaveInfo {
|
||||
JASWaveInfo() {
|
||||
field_0x01 = 0x3c;
|
||||
mBaseKey = 0x3c;
|
||||
field_0x20 = &one;
|
||||
}
|
||||
|
||||
/* 0x00 */ u8 field_0x00;
|
||||
/* 0x01 */ u8 field_0x01;
|
||||
/* 0x02 */ u8 field_0x02;
|
||||
/* 0x04 */ f32 field_0x04;
|
||||
/* 0x08 */ int field_0x08;
|
||||
/* 0x0C */ int field_0x0c;
|
||||
/* 0x10 */ u32 field_0x10;
|
||||
/* 0x14 */ int field_0x14;
|
||||
/* 0x18 */ int field_0x18;
|
||||
/* 0x1C */ s16 field_0x1c;
|
||||
/* 0x1E */ s16 field_0x1e;
|
||||
/* 0x00 */ u8 mWaveFormat;
|
||||
/* 0x01 */ u8 mBaseKey;
|
||||
/* 0x02 */ u8 mLoopFlag;
|
||||
/* 0x04 */ f32 mSampleRate;
|
||||
/* 0x08 */ int mOffsetStart;
|
||||
/* 0x0C */ int mOffsetLength;
|
||||
/* 0x10 */ u32 mLoopStartSample;
|
||||
/* 0x14 */ int mLoopEndSample;
|
||||
/* 0x18 */ int mSampleCount;
|
||||
/* 0x1C */ s16 mpLast;
|
||||
/* 0x1E */ s16 mpPenult;
|
||||
/* 0x20 */ const u32* field_0x20;
|
||||
|
||||
static u32 one;
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
/* 0x10 */ int audioThreadPriority_;
|
||||
/* 0x14 */ int dvdThreadId_;
|
||||
/* 0x18 */ int audioThreadId_;
|
||||
/* 0x1C */ int field_0x1c;
|
||||
/* 0x1C */ int mJasTrackPoolSize;
|
||||
/* 0x20 */ int field_0x20;
|
||||
/* 0x24 */ int aramBlockSize_;
|
||||
/* 0x28 */ int aramChannelNum_;
|
||||
@@ -38,10 +38,10 @@ public:
|
||||
JAU_JAIInitializer();
|
||||
void initJAInterface();
|
||||
|
||||
int field_0x0;
|
||||
int field_0x4;
|
||||
int field_0x8;
|
||||
int field_0xc;
|
||||
int mJaiSePoolSize;
|
||||
int mJaiSeqPoolSize;
|
||||
int mJaiStreamPoolSize;
|
||||
int mJaiSoundChildPoolSize;
|
||||
};
|
||||
|
||||
#endif /* JAUINITIALIZER_H */
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <types.h>
|
||||
|
||||
void DSPReleaseHalt2(u32 msg);
|
||||
void DsetupTable(u32 param_0, u32 param_1, u32 param_2, u32 param_3, u32 param_4);
|
||||
void DsetupTable(u32 channelCount, u32 channelBufferAddress, u32 param_2, u32 param_3, u32 param_4);
|
||||
void DsetMixerLevel(f32 level);
|
||||
void DsyncFrame2ch(u32 param_0, u32 param_1, u32 param_2);
|
||||
void DsyncFrame4ch(u32 param_0, u32 param_1, u32 param_2, u32 param_3, u32 param_4);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <types.h>
|
||||
|
||||
void DspBoot(void (*)(void*));
|
||||
void DspBoot(void (*requestCallback)(void*));
|
||||
void DspFinishWork(u16 param_0);
|
||||
int DSPSendCommands2(u32* msgs, u32 param_1, void (*param_2)(u16));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user