summaryrefslogtreecommitdiff
path: root/src/audio
diff options
context:
space:
mode:
authorcadmic <cadmic24@gmail.com>2024-08-12 00:07:48 -0700
committerGitHub <noreply@github.com>2024-08-12 03:07:48 -0400
commite6bc4bd8cb66b2e7b946829b3892fd0d2967fde3 (patch)
tree577bcf5f89d620dbea0cac0ccb76e692becee90e /src/audio
parent672728455d2ab5f46953660189523336acf5075d (diff)
Add names to all typedef'd structs, unions, and enums (#2028)
* Add names to all typedef'd structs, unions, and enums * wtf vs code * Use a better regex
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/general.c12
-rw-r--r--src/audio/lib/heap.c2
-rw-r--r--src/audio/lib/load.c4
-rw-r--r--src/audio/lib/seqplayer.c2
-rw-r--r--src/audio/lib/synthesis.c2
-rw-r--r--src/audio/sequence.c2
-rw-r--r--src/audio/sfx.c4
7 files changed, 14 insertions, 14 deletions
diff --git a/src/audio/general.c b/src/audio/general.c
index f0dbfa1f7..3bd7df2a5 100644
--- a/src/audio/general.c
+++ b/src/audio/general.c
@@ -3,7 +3,7 @@
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
-typedef struct {
+typedef struct SfxPlayerState {
/* 0x0 */ f32 vol;
/* 0x4 */ f32 freqScale;
/* 0x8 */ s8 reverb;
@@ -13,7 +13,7 @@ typedef struct {
/* 0xC */ u8 combFilterGain;
} SfxPlayerState;
-typedef enum {
+typedef enum SfxChannelIndex {
/* 0x0 */ SFX_CHANNEL_PLAYER0, // SfxPlayerBank
/* 0x1 */ SFX_CHANNEL_PLAYER1,
/* 0x2 */ SFX_CHANNEL_PLAYER2,
@@ -32,20 +32,20 @@ typedef enum {
/* 0xF */ SFX_CHANNEL_VOICE1
} SfxChannelIndex; // playerIdx = 2
-typedef struct {
+typedef struct FreqLerp {
/* 0x0 */ f32 value;
/* 0x4 */ f32 target;
/* 0x8 */ f32 step;
/* 0xC */ s32 remainingFrames;
} FreqLerp;
-typedef struct {
+typedef struct NatureAmbienceDataIO {
/* 0x0 */ u16 playerIO;
/* 0x2 */ u16 channelMask;
/* 0x4 */ u8 channelIO[3 * 33 + 1];
} NatureAmbienceDataIO; // size = 0x68
-typedef enum {
+typedef enum AudioDebugPage {
/* 0x0 */ PAGE_NON,
/* 0x1 */ PAGE_SOUND_CONTROL,
/* 0x2 */ PAGE_SPEC_INFO, // unused
@@ -66,7 +66,7 @@ typedef enum {
#define SCROLL_PRINT_BUF_SIZE 25
-typedef struct {
+typedef struct OcarinaStick {
s8 x;
s8 y;
} OcarinaStick;
diff --git a/src/audio/lib/heap.c b/src/audio/lib/heap.c
index dcb027d49..2a0f859df 100644
--- a/src/audio/lib/heap.c
+++ b/src/audio/lib/heap.c
@@ -1345,7 +1345,7 @@ void AudioHeap_DiscardSampleCaches(void) {
}
}
-typedef struct {
+typedef struct StorageChange {
u32 oldAddr;
u32 newAddr;
u32 size;
diff --git a/src/audio/lib/load.c b/src/audio/lib/load.c
index 0d2fe051d..149179020 100644
--- a/src/audio/lib/load.c
+++ b/src/audio/lib/load.c
@@ -7,14 +7,14 @@
#define ASYNC_ID(v) ((u8)(v >> 8))
#define ASYNC_LOAD_STATUS(v) ((u8)(v >> 0))
-typedef enum {
+typedef enum SlowLoadState {
/* 0 */ SLOW_LOAD_STATE_WAITING,
/* 1 */ SLOW_LOAD_STATE_START,
/* 2 */ SLOW_LOAD_STATE_LOADING,
/* 3 */ SLOW_LOAD_STATE_DONE
} SlowLoadState;
-typedef struct {
+typedef struct SampleBankRelocInfo {
/* 0x00 */ s32 sampleBankId1;
/* 0x04 */ s32 sampleBankId2;
/* 0x08 */ s32 baseAddr1;
diff --git a/src/audio/lib/seqplayer.c b/src/audio/lib/seqplayer.c
index 80f35bf2d..4caddea4e 100644
--- a/src/audio/lib/seqplayer.c
+++ b/src/audio/lib/seqplayer.c
@@ -21,7 +21,7 @@
#define PROCESS_SCRIPT_END -1
-typedef enum {
+typedef enum PortamentoMode {
/* 0 */ PORTAMENTO_MODE_OFF,
/* 1 */ PORTAMENTO_MODE_1,
/* 2 */ PORTAMENTO_MODE_2,
diff --git a/src/audio/lib/synthesis.c b/src/audio/lib/synthesis.c
index 321bd79a5..b93494de4 100644
--- a/src/audio/lib/synthesis.c
+++ b/src/audio/lib/synthesis.c
@@ -14,7 +14,7 @@
#define DMEM_WET_LEFT_CH 0xC80
#define DMEM_WET_RIGHT_CH 0xE20 // = DMEM_WET_LEFT_CH + DMEM_1CH_SIZE
-typedef enum {
+typedef enum HaasEffectDelaySide {
/* 0 */ HAAS_EFFECT_DELAY_NONE,
/* 1 */ HAAS_EFFECT_DELAY_LEFT, // Delay left channel so that right channel is heard first
/* 2 */ HAAS_EFFECT_DELAY_RIGHT // Delay right channel so that left channel is heard first
diff --git a/src/audio/sequence.c b/src/audio/sequence.c
index e04a5668a..8d16b94a9 100644
--- a/src/audio/sequence.c
+++ b/src/audio/sequence.c
@@ -26,7 +26,7 @@
Audio_ProcessSeqCmd((SEQCMD_OP_SET_SEQPLAYER_VOLUME << 28) | ((u8)(seqPlayerIndex) << 24) | \
((u8)(duration) << 16) | ((u8)((volume)*127.0f)));
-typedef struct {
+typedef struct SeqRequest {
/* 0x0 */ u8 seqId;
/* 0x1 */ u8 priority; // higher values have higher priority
} SeqRequest; // size = 0x2
diff --git a/src/audio/sfx.c b/src/audio/sfx.c
index a11d8dc0e..e2efcd102 100644
--- a/src/audio/sfx.c
+++ b/src/audio/sfx.c
@@ -2,7 +2,7 @@
#include "global.h"
#include "terminal.h"
-typedef struct {
+typedef struct SfxRequest {
/* 0x00 */ u16 sfxId;
/* 0x04 */ Vec3f* pos;
/* 0x08 */ u8 token;
@@ -11,7 +11,7 @@ typedef struct {
/* 0x14 */ s8* reverbAdd;
} SfxRequest; // size = 0x18
-typedef struct {
+typedef struct UnusedBankLerp {
/* 0x00 */ f32 value;
/* 0x04 */ f32 target;
/* 0x08 */ f32 step;