From d307a3723313507726d5ebcfda0b5b9cef224d91 Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Fri, 7 Jul 2023 07:55:10 +1000 Subject: [PATCH] Reorganize Audio Files & Name Remaining Audio Files (#1494) * reorganize audio files * audio code files * split audio and libaudio * audio_init_params to audio_configuration * simplify file names * move aisetnextbuf to libaudio * move src/audio -> src/code/audio * adjust makefile comment * reorganize again into internal/external * adjust comment * restructure again --- Makefile | 10 +++--- spec | 36 +++++++++---------- .../audio_external_data.c => audio/data.c} | 0 src/{code/code_800EC960.c => audio/general.c} | 0 src/{libultra/io => audio/lib}/aisetnextbuf.c | 0 src/{code/audio_data.c => audio/lib/data.c} | 0 .../code_800E6840.c => audio/lib/dcache.c} | 0 .../audio_effects.c => audio/lib/effects.c} | 0 src/{code/audio_heap.c => audio/lib/heap.c} | 0 src/{code/audio_load.c => audio/lib/load.c} | 0 .../audio_playback.c => audio/lib/playback.c} | 0 .../lib/seqplayer.c} | 0 .../lib/synthesis.c} | 0 .../code_800E4FE0.c => audio/lib/thread.c} | 0 .../code_800F9280.c => audio/sequence.c} | 0 .../session_config.c} | 0 src/{code/code_800F7260.c => audio/sfx.c} | 0 .../audio_sfx_params.c => audio/sfx_params.c} | 0 .../{code_800C3C20.c => audio_stop_all_sfx.c} | 0 .../{audioMgr.c => audio_thread_manager.c} | 0 20 files changed, 24 insertions(+), 22 deletions(-) rename src/{code/audio_external_data.c => audio/data.c} (100%) rename src/{code/code_800EC960.c => audio/general.c} (100%) rename src/{libultra/io => audio/lib}/aisetnextbuf.c (100%) rename src/{code/audio_data.c => audio/lib/data.c} (100%) rename src/{code/code_800E6840.c => audio/lib/dcache.c} (100%) rename src/{code/audio_effects.c => audio/lib/effects.c} (100%) rename src/{code/audio_heap.c => audio/lib/heap.c} (100%) rename src/{code/audio_load.c => audio/lib/load.c} (100%) rename src/{code/audio_playback.c => audio/lib/playback.c} (100%) rename src/{code/audio_seqplayer.c => audio/lib/seqplayer.c} (100%) rename src/{code/audio_synthesis.c => audio/lib/synthesis.c} (100%) rename src/{code/code_800E4FE0.c => audio/lib/thread.c} (100%) rename src/{code/code_800F9280.c => audio/sequence.c} (100%) rename src/{code/audio_init_params.c => audio/session_config.c} (100%) rename src/{code/code_800F7260.c => audio/sfx.c} (100%) rename src/{code/audio_sfx_params.c => audio/sfx_params.c} (100%) rename src/code/{code_800C3C20.c => audio_stop_all_sfx.c} (100%) rename src/code/{audioMgr.c => audio_thread_manager.c} (100%) diff --git a/Makefile b/Makefile index a645ae3109..3d6f626347 100644 --- a/Makefile +++ b/Makefile @@ -199,12 +199,14 @@ build/src/code/fmodf.o: OPTFLAGS := -g build/src/code/__osMemset.o: OPTFLAGS := -g build/src/code/__osMemmove.o: OPTFLAGS := -g -# Use signed chars instead of unsigned for code_800EC960.c (needed to match AudioDebug_ScrPrt) -build/src/code/code_800EC960.o: CFLAGS += -signed +build/src/audio/%.o: OPTFLAGS := -O2 + +# Use signed chars instead of unsigned for this audio file (needed to match AudioDebug_ScrPrt) +build/src/audio/general.o: CFLAGS += -signed # Put string literals in .data for some audio files (needed to match these files with literals) -build/src/code/code_800F7260.o: CFLAGS += -use_readwrite_const -build/src/code/code_800F9280.o: CFLAGS += -use_readwrite_const +build/src/audio/sfx.o: CFLAGS += -use_readwrite_const +build/src/audio/sequence.o: CFLAGS += -use_readwrite_const build/src/libultra/libc/absf.o: OPTFLAGS := -O2 -g3 build/src/libultra/libc/sqrt.o: OPTFLAGS := -O2 -g3 diff --git a/spec b/spec index c515af7e92..375eb73dc6 100644 --- a/spec +++ b/spec @@ -387,8 +387,8 @@ beginseg include "build/src/code/PreRender.o" include "build/src/code/TwoHeadGfxArena.o" include "build/src/code/TwoHeadArena.o" - include "build/src/code/code_800C3C20.o" - include "build/src/code/audioMgr.o" + include "build/src/code/audio_stop_all_sfx.o" + include "build/src/code/audio_thread_manager.o" include "build/src/code/title_setup.o" include "build/src/code/game.o" include "build/src/code/gamealloc.o" @@ -417,22 +417,22 @@ beginseg include "build/src/code/kanread.o" include "build/src/code/ucode_disas.o" pad_text // audio library aligned to 32 bytes? - include "build/src/code/audio_data.o" - include "build/src/code/audio_synthesis.o" - include "build/src/code/audio_heap.o" - include "build/src/code/audio_load.o" - include "build/src/code/code_800E4FE0.o" - include "build/src/code/code_800E6840.o" - include "build/src/libultra/io/aisetnextbuf.o" - include "build/src/code/audio_playback.o" - include "build/src/code/audio_effects.o" - include "build/src/code/audio_seqplayer.o" - include "build/src/code/code_800EC960.o" - include "build/src/code/audio_sfx_params.o" - include "build/src/code/code_800F7260.o" - include "build/src/code/code_800F9280.o" - include "build/src/code/audio_external_data.o" - include "build/src/code/audio_init_params.o" + include "build/src/audio/lib/data.o" + include "build/src/audio/lib/synthesis.o" + include "build/src/audio/lib/heap.o" + include "build/src/audio/lib/load.o" + include "build/src/audio/lib/thread.o" + include "build/src/audio/lib/dcache.o" + include "build/src/audio/lib/aisetnextbuf.o" + include "build/src/audio/lib/playback.o" + include "build/src/audio/lib/effects.o" + include "build/src/audio/lib/seqplayer.o" + include "build/src/audio/general.o" + include "build/src/audio/sfx_params.o" + include "build/src/audio/sfx.o" + include "build/src/audio/sequence.o" + include "build/src/audio/data.o" + include "build/src/audio/session_config.o" include "build/src/code/logseverity.o" include "build/src/code/gfxprint.o" include "build/src/code/rcp_utils.o" diff --git a/src/code/audio_external_data.c b/src/audio/data.c similarity index 100% rename from src/code/audio_external_data.c rename to src/audio/data.c diff --git a/src/code/code_800EC960.c b/src/audio/general.c similarity index 100% rename from src/code/code_800EC960.c rename to src/audio/general.c diff --git a/src/libultra/io/aisetnextbuf.c b/src/audio/lib/aisetnextbuf.c similarity index 100% rename from src/libultra/io/aisetnextbuf.c rename to src/audio/lib/aisetnextbuf.c diff --git a/src/code/audio_data.c b/src/audio/lib/data.c similarity index 100% rename from src/code/audio_data.c rename to src/audio/lib/data.c diff --git a/src/code/code_800E6840.c b/src/audio/lib/dcache.c similarity index 100% rename from src/code/code_800E6840.c rename to src/audio/lib/dcache.c diff --git a/src/code/audio_effects.c b/src/audio/lib/effects.c similarity index 100% rename from src/code/audio_effects.c rename to src/audio/lib/effects.c diff --git a/src/code/audio_heap.c b/src/audio/lib/heap.c similarity index 100% rename from src/code/audio_heap.c rename to src/audio/lib/heap.c diff --git a/src/code/audio_load.c b/src/audio/lib/load.c similarity index 100% rename from src/code/audio_load.c rename to src/audio/lib/load.c diff --git a/src/code/audio_playback.c b/src/audio/lib/playback.c similarity index 100% rename from src/code/audio_playback.c rename to src/audio/lib/playback.c diff --git a/src/code/audio_seqplayer.c b/src/audio/lib/seqplayer.c similarity index 100% rename from src/code/audio_seqplayer.c rename to src/audio/lib/seqplayer.c diff --git a/src/code/audio_synthesis.c b/src/audio/lib/synthesis.c similarity index 100% rename from src/code/audio_synthesis.c rename to src/audio/lib/synthesis.c diff --git a/src/code/code_800E4FE0.c b/src/audio/lib/thread.c similarity index 100% rename from src/code/code_800E4FE0.c rename to src/audio/lib/thread.c diff --git a/src/code/code_800F9280.c b/src/audio/sequence.c similarity index 100% rename from src/code/code_800F9280.c rename to src/audio/sequence.c diff --git a/src/code/audio_init_params.c b/src/audio/session_config.c similarity index 100% rename from src/code/audio_init_params.c rename to src/audio/session_config.c diff --git a/src/code/code_800F7260.c b/src/audio/sfx.c similarity index 100% rename from src/code/code_800F7260.c rename to src/audio/sfx.c diff --git a/src/code/audio_sfx_params.c b/src/audio/sfx_params.c similarity index 100% rename from src/code/audio_sfx_params.c rename to src/audio/sfx_params.c diff --git a/src/code/code_800C3C20.c b/src/code/audio_stop_all_sfx.c similarity index 100% rename from src/code/code_800C3C20.c rename to src/code/audio_stop_all_sfx.c diff --git a/src/code/audioMgr.c b/src/code/audio_thread_manager.c similarity index 100% rename from src/code/audioMgr.c rename to src/code/audio_thread_manager.c