mirror of
https://github.com/HarbourMasters/Starship
synced 2026-08-10 03:25:29 -04:00
Some further docs for audio spec and planet paths (#219)
* avoid ub * format * torch * more stuff
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ extern s32 D_ctx_80177B50[7];
|
||||
extern s32 D_ctx_80177B70[7];
|
||||
extern PlanetId D_ctx_80177B90[7];
|
||||
extern s32 D_ctx_80177BB0[7];
|
||||
extern s32 D_ctx_80177BD8[22]; // overruns D_ctx_80177C30?
|
||||
extern s32 gPlanetPathStatus[22]; // overruns D_ctx_80177C30?
|
||||
extern s32 gPrevPlanetTeamShields[6];
|
||||
extern s32 D_ctx_80177C58[6];
|
||||
extern u8 gSoundMode;
|
||||
|
||||
@@ -6,6 +6,47 @@
|
||||
|
||||
#define AUDIO_PLAY_SFX(sfxId, srcPos, token) (Audio_PlaySfx((sfxId),(srcPos),(token),&gDefaultMod,&gDefaultMod,&gDefaultReverb))
|
||||
#define AUDIO_PLAY_BGM(seqId) Audio_PlaySequence(SEQ_PLAYER_BGM, (seqId), 0, -1)
|
||||
#define AUDIO_SET_SPEC(sfxLayout, spec) Audio_SetAudioSpec(0, ((sfxLayout) << 8) | (spec))
|
||||
#define AUDIO_SET_SPEC_ALT(sfxLayout, spec) Audio_SetAudioSpec((sfxLayout), ((sfxLayout) << 8) | (spec))
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SFXCHAN_0,
|
||||
/* 1 */ SFXCHAN_1,
|
||||
/* 2 */ SFXCHAN_2,
|
||||
/* 3 */ SFXCHAN_3
|
||||
} SfxChannelLayout;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ AUDIOSPEC_0,
|
||||
/* 1 */ AUDIOSPEC_1,
|
||||
/* 2 */ AUDIOSPEC_2,
|
||||
/* 3 */ AUDIOSPEC_3,
|
||||
/* 4 */ AUDIOSPEC_4,
|
||||
/* 5 */ AUDIOSPEC_5,
|
||||
/* 6 */ AUDIOSPEC_6,
|
||||
/* 7 */ AUDIOSPEC_7,
|
||||
/* 8 */ AUDIOSPEC_8,
|
||||
/* 9 */ AUDIOSPEC_9,
|
||||
/* 10 */ AUDIOSPEC_10,
|
||||
/* 11 */ AUDIOSPEC_11,
|
||||
/* 12 */ AUDIOSPEC_12,
|
||||
/* 13 */ AUDIOSPEC_13,
|
||||
/* 14 */ AUDIOSPEC_14,
|
||||
/* 15 */ AUDIOSPEC_15,
|
||||
/* 16 */ AUDIOSPEC_16,
|
||||
/* 17 */ AUDIOSPEC_17,
|
||||
/* 18 */ AUDIOSPEC_18,
|
||||
/* 19 */ AUDIOSPEC_19,
|
||||
/* 20 */ AUDIOSPEC_20,
|
||||
/* 21 */ AUDIOSPEC_21,
|
||||
/* 22 */ AUDIOSPEC_22,
|
||||
/* 23 */ AUDIOSPEC_23,
|
||||
/* 24 */ AUDIOSPEC_24,
|
||||
/* 25 */ AUDIOSPEC_25,
|
||||
/* 26 */ AUDIOSPEC_26,
|
||||
/* 27 */ AUDIOSPEC_27,
|
||||
/* 28 */ AUDIOSPEC_28,
|
||||
} AudioSpecID;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SOUNDMODE_STEREO,
|
||||
|
||||
@@ -593,7 +593,7 @@ typedef struct {
|
||||
*/
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 samplingFrequency; // Target sampling rate in Hz
|
||||
/* 0x04 */ u8 unk_04;
|
||||
/* 0x04 */ u8 numBuffers;
|
||||
/* 0x05 */ u8 numNotes;
|
||||
/* 0x06 */ u8 numReverbs;
|
||||
/* 0x08 */ ReverbSettings* reverbSettings;
|
||||
@@ -617,7 +617,7 @@ typedef struct {
|
||||
* processing audio commands. This struct parameterizes that buffer.
|
||||
*/
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 specUnk4;
|
||||
/* 0x00 */ s16 count;
|
||||
/* 0x02 */ u16 samplingFrequency; // Target sampling rate in Hz
|
||||
/* 0x04 */ u16 aiSamplingFrequency; // True sampling rate of the audio interface (AI), see `osAiSetFrequency`
|
||||
/* 0x06 */ s16 samplesPerFrameTarget;
|
||||
|
||||
Reference in New Issue
Block a user