Removed a ton of DEBUG_PRINT statements.

This commit is contained in:
MeltyPlayer
2022-12-06 16:55:39 -06:00
parent 3a4115e8f6
commit 3937c61765
4 changed files with 0 additions and 37 deletions
-18
View File
@@ -658,11 +658,7 @@ extern void func_sh_802F64C8(void);
* Called from threads: thread5_game_loop * Called from threads: thread5_game_loop
*/ */
void maybe_tick_game_sound(void) { void maybe_tick_game_sound(void) {
DEBUG_PRINT("maybe_tick_game_sound()");
DEBUG_PRINT("- if game loop ticked is false...");
if (sGameLoopTicked != 0) { if (sGameLoopTicked != 0) {
DEBUG_PRINT("- updating game sound");
update_game_sound(); update_game_sound();
sGameLoopTicked = 0; sGameLoopTicked = 0;
} }
@@ -793,17 +789,14 @@ struct SPTask *create_next_audio_frame_task(void) {
return NULL; return NULL;
} }
void create_next_audio_buffer(s16 *samples, u32 num_samples) { void create_next_audio_buffer(s16 *samples, u32 num_samples) {
DEBUG_PRINT("create_next_audio_buffer()");
gAudioFrameCount++; gAudioFrameCount++;
if (sGameLoopTicked != 0) { if (sGameLoopTicked != 0) {
update_game_sound(); update_game_sound();
sGameLoopTicked = 0; sGameLoopTicked = 0;
} }
s32 writtenCmds; s32 writtenCmds;
DEBUG_PRINT("- synthesis execute");
synthesis_execute(gAudioCmdBuffers[0], &writtenCmds, samples, num_samples); synthesis_execute(gAudioCmdBuffers[0], &writtenCmds, samples, num_samples);
gAudioRandom = ((gAudioRandom + gAudioFrameCount) * gAudioFrameCount); gAudioRandom = ((gAudioRandom + gAudioFrameCount) * gAudioFrameCount);
DEBUG_PRINT("- decrease sample dma ttls");
decrease_sample_dma_ttls(); decrease_sample_dma_ttls();
} }
#endif #endif
@@ -813,7 +806,6 @@ void create_next_audio_buffer(s16 *samples, u32 num_samples) {
* Called from threads: thread4_sound, thread5_game_loop (EU only) * Called from threads: thread4_sound, thread5_game_loop (EU only)
*/ */
static void process_sound_request(u32 bits, f32 *pos) { static void process_sound_request(u32 bits, f32 *pos) {
DEBUG_PRINT("# process_sound_request %d\n", bits);
u8 bank; u8 bank;
u8 soundIndex; u8 soundIndex;
u8 counter = 0; u8 counter = 0;
@@ -2630,7 +2622,6 @@ void play_toads_jingle(void) {
* Called from threads: thread5_game_loop * Called from threads: thread5_game_loop
*/ */
void sound_reset(u8 presetId) { void sound_reset(u8 presetId) {
DEBUG_PRINT("sound_reset()");
#ifndef VERSION_JP #ifndef VERSION_JP
if (presetId >= 8) { if (presetId >= 8) {
presetId = 0; presetId = 0;
@@ -2638,35 +2629,26 @@ void sound_reset(u8 presetId) {
} }
#endif #endif
sGameLoopTicked = 0; sGameLoopTicked = 0;
DEBUG_PRINT("- disable all sequence players");
disable_all_sequence_players(); disable_all_sequence_players();
DEBUG_PRINT("- sound init");
sound_init(); sound_init();
#ifdef VERSION_SH #ifdef VERSION_SH
func_802ad74c(0xF2000000, 0); func_802ad74c(0xF2000000, 0);
#endif #endif
#if defined(VERSION_JP) || defined(VERSION_US) #if defined(VERSION_JP) || defined(VERSION_US)
DEBUG_PRINT("- audio reset session");
audio_reset_session(&gAudioSessionPresets[presetId]); audio_reset_session(&gAudioSessionPresets[presetId]);
#else #else
audio_reset_session_eu(presetId); audio_reset_session_eu(presetId);
#endif #endif
DEBUG_PRINT("- os write back dcache all");
osWritebackDCacheAll(); osWritebackDCacheAll();
if (presetId != 7) { if (presetId != 7) {
DEBUG_PRINT("- preloading solve puzzle sequence");
preload_sequence(SEQ_EVENT_SOLVE_PUZZLE, PRELOAD_BANKS | PRELOAD_SEQUENCE); preload_sequence(SEQ_EVENT_SOLVE_PUZZLE, PRELOAD_BANKS | PRELOAD_SEQUENCE);
DEBUG_PRINT("- preloading peach message");
preload_sequence(SEQ_EVENT_PEACH_MESSAGE, PRELOAD_BANKS | PRELOAD_SEQUENCE); preload_sequence(SEQ_EVENT_PEACH_MESSAGE, PRELOAD_BANKS | PRELOAD_SEQUENCE);
DEBUG_PRINT("- preloading star spawn");
preload_sequence(SEQ_EVENT_CUTSCENE_STAR_SPAWN, PRELOAD_BANKS | PRELOAD_SEQUENCE); preload_sequence(SEQ_EVENT_CUTSCENE_STAR_SPAWN, PRELOAD_BANKS | PRELOAD_SEQUENCE);
} }
DEBUG_PRINT("- playing sfx sequence");
seq_player_play_sequence(SEQ_PLAYER_SFX, SEQ_SOUND_PLAYER, 0); seq_player_play_sequence(SEQ_PLAYER_SFX, SEQ_SOUND_PLAYER, 0);
D_80332108 = (D_80332108 & 0xf0) + presetId; D_80332108 = (D_80332108 & 0xf0) + presetId;
gSoundMode = D_80332108 >> 4; gSoundMode = D_80332108 >> 4;
sHasStartedFadeOut = FALSE; sHasStartedFadeOut = FALSE;
DEBUG_PRINT("- done resetting sound");
} }
/** /**
-2
View File
@@ -1,6 +1,5 @@
#include <ultra64.h> #include <ultra64.h>
#include "../../debug_print.h"
#include "heap.h" #include "heap.h"
#include "data.h" #include "data.h"
#include "load.h" #include "load.h"
@@ -253,7 +252,6 @@ void discard_sequence(s32 seqId) {
} }
void *soundAlloc(struct SoundAllocPool *pool, u32 size) { void *soundAlloc(struct SoundAllocPool *pool, u32 size) {
DEBUG_PRINT("soundAlloc()");
u8 *start; u8 *start;
s32 last; s32 last;
s32 i; s32 i;
-4
View File
@@ -144,12 +144,8 @@ SM64_LIB_FN void sm64_audio_init( uint8_t *rom ) {
#define SAMPLES_LOW 528 #define SAMPLES_LOW 528
extern SM64_LIB_FN uint32_t sm64_audio_tick( uint32_t numQueuedSamples, uint32_t numDesiredSamples, int16_t *audio_buffer ) { extern SM64_LIB_FN uint32_t sm64_audio_tick( uint32_t numQueuedSamples, uint32_t numDesiredSamples, int16_t *audio_buffer ) {
DEBUG_PRINT("sm64_tick_audio()");
DEBUG_PRINT("- update game sound");
update_game_sound(); update_game_sound();
DEBUG_PRINT("- create next audio buffer");
u32 num_audio_samples = numQueuedSamples < numDesiredSamples ? SAMPLES_HIGH : SAMPLES_LOW; u32 num_audio_samples = numQueuedSamples < numDesiredSamples ? SAMPLES_HIGH : SAMPLES_LOW;
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
{ {
-13
View File
@@ -1,36 +1,23 @@
#include "load_audio_data.h" #include "load_audio_data.h"
#include "debug_print.h"
#include "decomp/tools/convUtils.h" #include "decomp/tools/convUtils.h"
#include "decomp/audio/load.h" #include "decomp/audio/load.h"
#include "decomp/audio/load_dat.h" #include "decomp/audio/load_dat.h"
extern void load_audio_banks( uint8_t *rom ) { extern void load_audio_banks( uint8_t *rom ) {
DEBUG_PRINT("load_audio_banks()");
DEBUG_PRINT("- malloc");
uint8_t *rom2 = malloc(0x800000); uint8_t *rom2 = malloc(0x800000);
DEBUG_PRINT("- memcpy");
memcpy(rom2, rom, 0x800000); memcpy(rom2, rom, 0x800000);
rom = rom2; rom = rom2;
DEBUG_PRINT("- parse ctl");
gSoundDataADSR = parse_seqfile(rom+0x57B720); //ctl gSoundDataADSR = parse_seqfile(rom+0x57B720); //ctl
DEBUG_PRINT("- parse tbl");
gSoundDataRaw = parse_seqfile(rom+0x593560); //tbl gSoundDataRaw = parse_seqfile(rom+0x593560); //tbl
DEBUG_PRINT("- parse music");
gMusicData = parse_seqfile(rom+0x7B0860); gMusicData = parse_seqfile(rom+0x7B0860);
gBankSetsData = rom+0x7CC621; gBankSetsData = rom+0x7CC621;
DEBUG_PRINT("- memmove");
memmove(gBankSetsData+0x45,gBankSetsData+0x45-1,0x5B); memmove(gBankSetsData+0x45,gBankSetsData+0x45-1,0x5B);
gBankSetsData[0x45]=0x00; gBankSetsData[0x45]=0x00;
DEBUG_PRINT("- ptrs to offsets");
ptrs_to_offsets(gSoundDataADSR); ptrs_to_offsets(gSoundDataADSR);
DEBUG_PRINT("- audio init");
audio_init(); audio_init();
DEBUG_PRINT("- sound init");
sound_init(); sound_init();
DEBUG_PRINT("- sound reset");
sound_reset(0); sound_reset(0);
DEBUG_PRINT("- done with audio init!");
} }