Removed a ton of DEBUG_PRINT statements.
This commit is contained in:
@@ -658,11 +658,7 @@ extern void func_sh_802F64C8(void);
|
||||
* Called from threads: thread5_game_loop
|
||||
*/
|
||||
void maybe_tick_game_sound(void) {
|
||||
DEBUG_PRINT("maybe_tick_game_sound()");
|
||||
|
||||
DEBUG_PRINT("- if game loop ticked is false...");
|
||||
if (sGameLoopTicked != 0) {
|
||||
DEBUG_PRINT("- updating game sound");
|
||||
update_game_sound();
|
||||
sGameLoopTicked = 0;
|
||||
}
|
||||
@@ -793,17 +789,14 @@ struct SPTask *create_next_audio_frame_task(void) {
|
||||
return NULL;
|
||||
}
|
||||
void create_next_audio_buffer(s16 *samples, u32 num_samples) {
|
||||
DEBUG_PRINT("create_next_audio_buffer()");
|
||||
gAudioFrameCount++;
|
||||
if (sGameLoopTicked != 0) {
|
||||
update_game_sound();
|
||||
sGameLoopTicked = 0;
|
||||
}
|
||||
s32 writtenCmds;
|
||||
DEBUG_PRINT("- synthesis execute");
|
||||
synthesis_execute(gAudioCmdBuffers[0], &writtenCmds, samples, num_samples);
|
||||
gAudioRandom = ((gAudioRandom + gAudioFrameCount) * gAudioFrameCount);
|
||||
DEBUG_PRINT("- decrease sample dma ttls");
|
||||
decrease_sample_dma_ttls();
|
||||
}
|
||||
#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)
|
||||
*/
|
||||
static void process_sound_request(u32 bits, f32 *pos) {
|
||||
DEBUG_PRINT("# process_sound_request %d\n", bits);
|
||||
u8 bank;
|
||||
u8 soundIndex;
|
||||
u8 counter = 0;
|
||||
@@ -2630,7 +2622,6 @@ void play_toads_jingle(void) {
|
||||
* Called from threads: thread5_game_loop
|
||||
*/
|
||||
void sound_reset(u8 presetId) {
|
||||
DEBUG_PRINT("sound_reset()");
|
||||
#ifndef VERSION_JP
|
||||
if (presetId >= 8) {
|
||||
presetId = 0;
|
||||
@@ -2638,35 +2629,26 @@ void sound_reset(u8 presetId) {
|
||||
}
|
||||
#endif
|
||||
sGameLoopTicked = 0;
|
||||
DEBUG_PRINT("- disable all sequence players");
|
||||
disable_all_sequence_players();
|
||||
DEBUG_PRINT("- sound init");
|
||||
sound_init();
|
||||
#ifdef VERSION_SH
|
||||
func_802ad74c(0xF2000000, 0);
|
||||
#endif
|
||||
#if defined(VERSION_JP) || defined(VERSION_US)
|
||||
DEBUG_PRINT("- audio reset session");
|
||||
audio_reset_session(&gAudioSessionPresets[presetId]);
|
||||
#else
|
||||
audio_reset_session_eu(presetId);
|
||||
#endif
|
||||
DEBUG_PRINT("- os write back dcache all");
|
||||
osWritebackDCacheAll();
|
||||
if (presetId != 7) {
|
||||
DEBUG_PRINT("- preloading solve puzzle 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);
|
||||
DEBUG_PRINT("- preloading star spawn");
|
||||
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);
|
||||
D_80332108 = (D_80332108 & 0xf0) + presetId;
|
||||
gSoundMode = D_80332108 >> 4;
|
||||
sHasStartedFadeOut = FALSE;
|
||||
DEBUG_PRINT("- done resetting sound");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <ultra64.h>
|
||||
|
||||
#include "../../debug_print.h"
|
||||
#include "heap.h"
|
||||
#include "data.h"
|
||||
#include "load.h"
|
||||
@@ -253,7 +252,6 @@ void discard_sequence(s32 seqId) {
|
||||
}
|
||||
|
||||
void *soundAlloc(struct SoundAllocPool *pool, u32 size) {
|
||||
DEBUG_PRINT("soundAlloc()");
|
||||
u8 *start;
|
||||
s32 last;
|
||||
s32 i;
|
||||
|
||||
@@ -144,12 +144,8 @@ SM64_LIB_FN void sm64_audio_init( uint8_t *rom ) {
|
||||
#define SAMPLES_LOW 528
|
||||
|
||||
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();
|
||||
|
||||
DEBUG_PRINT("- create next audio buffer");
|
||||
u32 num_audio_samples = numQueuedSamples < numDesiredSamples ? SAMPLES_HIGH : SAMPLES_LOW;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
|
||||
@@ -1,36 +1,23 @@
|
||||
#include "load_audio_data.h"
|
||||
|
||||
#include "debug_print.h"
|
||||
#include "decomp/tools/convUtils.h"
|
||||
#include "decomp/audio/load.h"
|
||||
#include "decomp/audio/load_dat.h"
|
||||
|
||||
extern void load_audio_banks( uint8_t *rom ) {
|
||||
DEBUG_PRINT("load_audio_banks()");
|
||||
DEBUG_PRINT("- malloc");
|
||||
uint8_t *rom2 = malloc(0x800000);
|
||||
|
||||
DEBUG_PRINT("- memcpy");
|
||||
memcpy(rom2, rom, 0x800000);
|
||||
rom = rom2;
|
||||
DEBUG_PRINT("- parse ctl");
|
||||
gSoundDataADSR = parse_seqfile(rom+0x57B720); //ctl
|
||||
DEBUG_PRINT("- parse tbl");
|
||||
gSoundDataRaw = parse_seqfile(rom+0x593560); //tbl
|
||||
DEBUG_PRINT("- parse music");
|
||||
gMusicData = parse_seqfile(rom+0x7B0860);
|
||||
gBankSetsData = rom+0x7CC621;
|
||||
DEBUG_PRINT("- memmove");
|
||||
memmove(gBankSetsData+0x45,gBankSetsData+0x45-1,0x5B);
|
||||
gBankSetsData[0x45]=0x00;
|
||||
DEBUG_PRINT("- ptrs to offsets");
|
||||
ptrs_to_offsets(gSoundDataADSR);
|
||||
|
||||
DEBUG_PRINT("- audio init");
|
||||
audio_init();
|
||||
DEBUG_PRINT("- sound init");
|
||||
sound_init();
|
||||
DEBUG_PRINT("- sound reset");
|
||||
sound_reset(0);
|
||||
DEBUG_PRINT("- done with audio init!");
|
||||
}
|
||||
Reference in New Issue
Block a user