mirror of https://github.com/pmret/papermario.git
all files named
This commit is contained in:
parent
c1004f63ed
commit
0fce8b65d2
|
@ -540,22 +540,6 @@ f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by);
|
|||
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz);
|
||||
void add_vec2D_polar(f32* x, f32* y, f32 r, f32 theta);
|
||||
|
||||
//TODO -- remove these and use audio/public.h instead
|
||||
|
||||
enum AuResult bgm_set_track_volumes(s32 playerIndex, s16 trackVolSet);
|
||||
enum AuResult bgm_clear_track_volumes(s32 playerIndex, s16 trackVolSet);
|
||||
enum AuResult bgm_set_variation(s32 playerIndex, s16 arg1);
|
||||
void bgm_quiet_max_volume(void);
|
||||
void bgm_reset_max_volume(void);
|
||||
void bgm_reset_volume(void);
|
||||
s32 bgm_init_music_players(void);
|
||||
s32 bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume);
|
||||
void bgm_set_battle_song(s32, s32);
|
||||
void bgm_push_battle_song(void);
|
||||
s32 bgm_adjust_proximity(s32 playerIndex, s32 arg1, s16 arg2);
|
||||
void func_801491E4(Matrix4f mtx, s32, s32, s32, s32, s32 alpha);
|
||||
s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s16 arg4, s16 arg5);
|
||||
|
||||
#include "audio/public.h"
|
||||
|
||||
void basic_window_update(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, f32* scaleX, f32* scaleY,
|
||||
|
@ -606,8 +590,6 @@ void update_scripts(void);
|
|||
void update_messages(void);
|
||||
void update_entities(void);
|
||||
void func_80138198(void);
|
||||
void bgm_update_music_settings(void);
|
||||
b32 bgm_is_any_song_playing(void);
|
||||
void update_ambient_sounds(void);
|
||||
void update_windows(void);
|
||||
void player_render_interact_prompts(void);
|
||||
|
@ -623,12 +605,8 @@ void render_curtains(void);
|
|||
void fio_init_flash(void);
|
||||
void func_80028838(void);
|
||||
void clear_screen_overlays(void);
|
||||
void bgm_reset_sequence_players(void);
|
||||
void reset_ambient_sounds(void);
|
||||
void poll_rumble(void);
|
||||
void bgm_pop_song(void);
|
||||
void bgm_push_song(s32 songID, s32 variation);
|
||||
void bgm_pop_battle_song(void);
|
||||
s32 play_ambient_sounds(s32 fadeInTime, s32 fadeOutTime);
|
||||
s32 get_fortress_key_count(void);
|
||||
s32 subtract_fortress_keys(s32 amt);
|
||||
|
|
97
src/audio.h
97
src/audio.h
|
@ -77,9 +77,10 @@ typedef u8* WaveData;
|
|||
|
||||
#define AU_SONG_NONE -1
|
||||
|
||||
#define MUS_QUEUE_SIZE 16
|
||||
#define SFX_QUEUE_SIZE 16
|
||||
|
||||
#define BGM_SEGMENT_LABEL 3
|
||||
#define BGM_COMP_LABEL 3
|
||||
|
||||
#define AU_SEMITONE 100 // cents
|
||||
#define AU_OCTAVE (12 * AU_SEMITONE)
|
||||
|
@ -152,20 +153,20 @@ typedef enum BGMVariation {
|
|||
|
||||
typedef enum BGMPlayerState {
|
||||
BGM_PLAY_STATE_IDLE = 0,
|
||||
BGM_STATE_PLAY_SUBSEG = 1,
|
||||
BGM_PLAY_STATE_NEXT_SUBSEG = 2,
|
||||
BGM_PLAY_STATE_ACTIVE = 1,
|
||||
BGM_PLAY_STATE_FETCH = 2,
|
||||
BGM_PLAY_STATE_INIT = 3,
|
||||
BGM_PLAY_STATE_STOP = 4
|
||||
} BGMPlayerState;
|
||||
|
||||
typedef enum SegmentControlCommands {
|
||||
BGM_SEGMENT_END = 0,
|
||||
BGM_SEGMENT_SUBSEG = 1,
|
||||
BGM_SEGMENT_START_LOOP = 3,
|
||||
BGM_SEGMENT_WAIT = 4,
|
||||
BGM_SEGMENT_END_LOOP = 5,
|
||||
BGM_SEGMENT_6 = 6,
|
||||
BGM_SEGMENT_7 = 7
|
||||
BGM_COMP_END = 0,
|
||||
BGM_COMP_PLAY_PHRASE = 1,
|
||||
BGM_COMP_START_LOOP = 3,
|
||||
BGM_COMP_WAIT = 4,
|
||||
BGM_COMP_END_LOOP = 5,
|
||||
BGM_COMP_6 = 6,
|
||||
BGM_COMP_7 = 7
|
||||
} SegmentControlCommands;
|
||||
|
||||
typedef enum BGMSpecialSubops {
|
||||
|
@ -399,16 +400,16 @@ typedef union SeqArgs {
|
|||
u16 value;
|
||||
} SegTrackTune;
|
||||
struct { // cmd F0
|
||||
u8 amount;
|
||||
u8 delay;
|
||||
u8 speed;
|
||||
u8 time;
|
||||
u8 depth;
|
||||
} TrackTremolo;
|
||||
struct { // cmd F1
|
||||
u8 value;
|
||||
} TrackTremoloSpeed;
|
||||
} TrackTremoloRate;
|
||||
struct { // cmd F2
|
||||
u8 time;
|
||||
} TrackTremoloTime;
|
||||
u8 value;
|
||||
} TrackTremoloDepth;
|
||||
// no args for F3 (TrackTremoloStop)
|
||||
struct { // cmd F4
|
||||
u8 pan0;
|
||||
|
@ -821,7 +822,7 @@ typedef struct AuVoice {
|
|||
typedef struct BGMFileInfo {
|
||||
/* 0x10 */ u8 timingPreset;
|
||||
/* 0x11 */ char pad_11[3];
|
||||
/* 0x14 */ u16 segments[4];
|
||||
/* 0x14 */ u16 compositions[4];
|
||||
/* 0x1C */ u16 drums;
|
||||
/* 0x1E */ u16 drumCount;
|
||||
/* 0x20 */ u16 instruments;
|
||||
|
@ -1034,7 +1035,7 @@ typedef struct BGMPlayerTrack {
|
|||
/* 0x08 */ AuFilePos prevReadPos;
|
||||
/* 0x0C */ Instrument* instrument;
|
||||
/* 0x10 */ EnvelopeData envelope;
|
||||
/* 0x18 */ s16_16 subTrackVolume; // stored as 16.16, but used as 11.21 (>> 21) or 8.24 (>> 24) depending on context
|
||||
/* 0x18 */ s8_24 subTrackVolume;
|
||||
/* 0x1C */ s16_16 subTrackVolumeStep;
|
||||
/* 0x20 */ s16_16 subTrackVolumeTarget;
|
||||
/* 0x24 */ s32 subTrackVolumeTime;
|
||||
|
@ -1045,7 +1046,7 @@ typedef struct BGMPlayerTrack {
|
|||
/* 0x34 */ s16 proxVolumeTarget;
|
||||
/* 0x36 */ s16 proxVolumeTime;
|
||||
/* 0x38 */ s16 segTrackTune;
|
||||
/* 0x3A */ s16 trackTremoloAmount;
|
||||
/* 0x3A */ s16 tremoloDelay;
|
||||
/* 0x3C */ char unk_3C[0x2];
|
||||
/* 0x3E */ s16 detourLength;
|
||||
/* 0x40 */ SoundPlayChange changed;
|
||||
|
@ -1060,17 +1061,17 @@ typedef struct BGMPlayerTrack {
|
|||
/* 0x4E */ u8 unk_4E;
|
||||
/* 0x4F */ u8 unk_4F;
|
||||
/* 0x50 */ u8 unk_50;
|
||||
/* 0x51 */ u8 unk_51;
|
||||
/* 0x52 */ u8 firstVoice; // voice idx start
|
||||
/* 0x53 */ u8 lastVoice; // voice idx end, exclusive
|
||||
/* 0x51 */ u8 polyVoiceCount; /// number of polyphonic voices for this track
|
||||
/* 0x52 */ u8 firstVoice; /// voice idx start
|
||||
/* 0x53 */ u8 lastVoice; /// voice idx end, exclusive
|
||||
/* 0x54 */ u8 polyphonicIdx;
|
||||
/* 0x55 */ u8 trackTremoloSpeed;
|
||||
/* 0x56 */ u8 trackTremoloTime;
|
||||
/* 0x55 */ u8 tremoloRate;
|
||||
/* 0x56 */ u8 tremoloDepth;
|
||||
/* 0x57 */ u8 randomPanAmount;
|
||||
/* 0x58 */ u8 isDrumTrack;
|
||||
/* 0x59 */ u8 parentTrackIdx;
|
||||
/* 0x5A */ u8 unk_5A;
|
||||
/* 0x5B */ s8 subtrackBusID;
|
||||
/* 0x59 */ u8 linkedTrackID;
|
||||
/* 0x5A */ u8 muted; /// prevents notes from this track from being assigned voices, implemented for linked track pairs
|
||||
/* 0x5B */ s8 busID;
|
||||
/* 0x5C */ u8 index;
|
||||
/* 0x5D */ char unk_5D[0x3];
|
||||
} BGMPlayerTrack; // size = 0x60;
|
||||
|
@ -1079,14 +1080,14 @@ typedef struct SeqNote {
|
|||
/* 0x00 */ Instrument* ins;
|
||||
/* 0x00 */ f32 pitchRatio;
|
||||
/* 0x08 */ s16 volume;
|
||||
/* 0x0A */ s16 adjustedPitch;
|
||||
/* 0x0C */ s32 noteLength;
|
||||
/* 0x10 */ u16 tremoloAmount;
|
||||
/* 0x12 */ u8 tremoloTime;
|
||||
/* 0x12 */ u8 unk_13;
|
||||
/* 0x14 */ s16 unk_14;
|
||||
/* 0x16 */ u8 noteVelocity;
|
||||
/* 0x17 */ u8 unk_note_17;
|
||||
/* 0x0A */ s16 detune;
|
||||
/* 0x0C */ s32 length; /// attack + sustain time
|
||||
/* 0x10 */ u16 tremoloDelay;
|
||||
/* 0x12 */ u8 tremoloDepth;
|
||||
/* 0x12 */ u8 tremoloPhase;
|
||||
/* 0x14 */ s16 randDetune;
|
||||
/* 0x16 */ u8 velocity;
|
||||
/* 0x17 */ u8 pendingTick;
|
||||
} SeqNote; // size = 0x18;
|
||||
|
||||
typedef struct BGMPlayer {
|
||||
|
@ -1112,9 +1113,9 @@ typedef struct BGMPlayer {
|
|||
/* 0x05E */ char pad5E[2];
|
||||
/* 0x060 */ s32 curVariation;
|
||||
/* 0x064 */ struct BGMHeader* bgmFile;
|
||||
/* 0x068 */ SegData* segmentReadPos;
|
||||
/* 0x06C */ SegData* segmentStartPos;
|
||||
/* 0x070 */ SegData* subSegmentStartPos;
|
||||
/* 0x068 */ SegData* compReadPos;
|
||||
/* 0x06C */ SegData* compStartPos;
|
||||
/* 0x070 */ SegData* phraseStartPos;
|
||||
/* 0x074 */ s32 unk_74;
|
||||
/* 0x078 */ BGMDrumInfo* drumsInfo;
|
||||
/* 0x07C */ BGMInstrumentInfo* instrumentsInfo;
|
||||
|
@ -1129,9 +1130,9 @@ typedef struct BGMPlayer {
|
|||
/* 0x0CC */ s32 masterVolumeTime;
|
||||
/* 0x0D0 */ f32 playbackRate;
|
||||
/* 0x0D4 */ SeqArgs seqCmdArgs;
|
||||
/* 0x0D8 */ SegData* segLoopStartLabels[32];
|
||||
/* 0x158 */ SegData* segActiveLoopEndPos[4];
|
||||
/* 0x168 */ u8 segLoopCounters[4];
|
||||
/* 0x0D8 */ SegData* compLoopStartLabels[32];
|
||||
/* 0x158 */ SegData* compActiveLoopEndPos[4];
|
||||
/* 0x168 */ u8 compLoopCounters[4];
|
||||
/* 0x16C */ s32 proxMixValue;
|
||||
/* 0x170 */ u8 proxMixID;
|
||||
/* 0x171 */ u8 proxMixVolume;
|
||||
|
@ -1142,11 +1143,11 @@ typedef struct BGMPlayer {
|
|||
/* 0x20A */ u16 maxTempo;
|
||||
/* 0x20C */ u16 masterPitchShift;
|
||||
/* 0x20E */ s16 detune;
|
||||
/* 0x210 */ u8 segLoopDepth;
|
||||
/* 0x210 */ u8 compLoopDepth;
|
||||
/* 0x211 */ u8 writingCustomEnvelope; /// Currently active (for writing) custom envelope
|
||||
/* 0x212 */ u8 customEnvelopeWritePos[8]; /// Current write position for each custom envelope
|
||||
/* 0x21A */ s8 volumeChanged;
|
||||
/* 0x21B */ u8 unk_21B;
|
||||
/* 0x21B */ u8 totalVoices;
|
||||
/* 0x21C */ u8 bgmDrumCount;
|
||||
/* 0x21D */ u8 bgmInstrumentCount;
|
||||
/* 0x21E */ u8 unk_21E;
|
||||
|
@ -1159,15 +1160,15 @@ typedef struct BGMPlayer {
|
|||
/* 0x227 */ char unk_228[0x2];
|
||||
/* 0x22A */ u8 unk_22A[8];
|
||||
/* 0x232 */ u8 bFadeConfigSetsVolume;
|
||||
/* 0x233 */ u8 unk_233;
|
||||
/* 0x233 */ u8 initLinkMute; /// Used to mute any linked tracks after the first one encountered.
|
||||
/* 0x234 */ u8 priority;
|
||||
/* 0x235 */ u8 busID;
|
||||
/* 0x236 */ char unk_236[0x2];
|
||||
/* 0x238 */ s32 unk_238[8];
|
||||
/* 0x258 */ u8 unk_258;
|
||||
/* 0x259 */ u8 unk_259;
|
||||
/* 0x25A */ u8 unk_25A;
|
||||
/* 0x25B */ u8 unk_25B;
|
||||
/* 0x238 */ s32 cmdBufData[8]; /// Buffer for an unused (legacy) system for controlling the BGMPlayer from the main thread
|
||||
/* 0x258 */ u8 cmdBufPending;
|
||||
/* 0x259 */ u8 cmdBufReadPos;
|
||||
/* 0x25A */ u8 cmdBufWritePos;
|
||||
/* 0x25B */ u8 cmdBufOverflows;
|
||||
/* 0x25C */ BGMPlayerTrack tracks[16];
|
||||
/* 0x85C */ SeqNote notes[24]; /// Currently playing notes
|
||||
} BGMPlayer; // size = 0xA9C
|
||||
|
|
|
@ -19,7 +19,7 @@ MusicSettings BlankMusicSettings = {
|
|||
.fadeInTime = 0,
|
||||
.fadeStartVolume = 0,
|
||||
.fadeEndVolume = 0,
|
||||
.songID = -1,
|
||||
.songID = AU_SONG_NONE,
|
||||
.variation = -1,
|
||||
.songName = -1,
|
||||
.battleSongID = 0,
|
||||
|
@ -95,7 +95,7 @@ void bgm_update_music_settings(void) {
|
|||
if (music->flags & MUSIC_SETTINGS_FLAG_1) {
|
||||
if (music->fadeOutTime < 250) {
|
||||
if (!(music->flags & MUSIC_SETTINGS_FLAG_4)) {
|
||||
if (au_song_stop(music->songName) == AU_RESULT_OK) {
|
||||
if (snd_song_stop(music->songName) == AU_RESULT_OK) {
|
||||
music->state = state2;
|
||||
}
|
||||
} else {
|
||||
|
@ -124,7 +124,7 @@ void bgm_update_music_settings(void) {
|
|||
flags = music->flags;
|
||||
music->flags &= ~flag4;
|
||||
if (flags & MUSIC_SETTINGS_FLAG_1) {
|
||||
if (au_song_is_playing(music->songName) == AU_RESULT_OK) {
|
||||
if (snd_song_is_playing(music->songName) == AU_RESULT_OK) {
|
||||
music->flags &= ~MUSIC_SETTINGS_FLAG_1;
|
||||
music->state = MUSIC_STATE_DELAY_2;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ void bgm_update_music_settings(void) {
|
|||
if (music->songID <= AU_SONG_NONE) {
|
||||
music->state = MUSIC_STATE_0;
|
||||
} else {
|
||||
music->songName = au_song_load(music->songID, i);
|
||||
music->songName = snd_song_load(music->songID, i);
|
||||
if (music->songName > 0xFFFFU) {
|
||||
if ((music->flags & MUSIC_SETTINGS_FLAG_20)) {
|
||||
snd_set_song_variation_fade(music->songName, music->variation,
|
||||
|
@ -152,7 +152,7 @@ void bgm_update_music_settings(void) {
|
|||
} else {
|
||||
bgm_set_target_volume(MusicDefaultVolume);
|
||||
}
|
||||
if (au_song_start_variation(music->songName, music->variation) == 0) {
|
||||
if (snd_song_start_variation(music->songName, music->variation) == 0) {
|
||||
music->flags |= MUSIC_SETTINGS_FLAG_1;
|
||||
music->state = MUSIC_STATE_0;
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ void bgm_update_music_settings(void) {
|
|||
if (music->flags & MUSIC_SETTINGS_FLAG_10) {
|
||||
music->state = MUSIC_STATE_0;
|
||||
music->flags &= ~(MUSIC_SETTINGS_FLAG_10 | MUSIC_SETTINGS_FLAG_8);
|
||||
} else if (func_80055B28(music->savedSongName) == 0) {
|
||||
} else if (func_80055B28(music->savedSongName) == AU_RESULT_OK) {
|
||||
music->songID = music->savedSongID;
|
||||
music->variation = music->savedVariation;
|
||||
music->songName = music->savedSongName;
|
||||
|
@ -188,7 +188,7 @@ s32 _bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s
|
|||
musicSetting = &gMusicSettings[playerIndex];
|
||||
|
||||
if (!gGameStatusPtr->musicEnabled) {
|
||||
au_song_stop(musicSetting->songName);
|
||||
snd_song_stop(musicSetting->songName);
|
||||
musicSetting->flags &= ~MUSIC_SETTINGS_FLAG_1;
|
||||
|
||||
return 1;
|
||||
|
@ -226,7 +226,7 @@ s32 bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s1
|
|||
return _bgm_set_song(playerIndex, songID, variation, fadeOutTime, volume);
|
||||
}
|
||||
|
||||
s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s16 fadeStartVolume, s16 fadeEndVolume) {
|
||||
s32 bgm_fade_in_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s16 fadeStartVolume, s16 fadeEndVolume) {
|
||||
MusicSettings* musicSetting;
|
||||
s32 mapSongVariation;
|
||||
|
||||
|
@ -237,7 +237,7 @@ s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s1
|
|||
musicSetting = &gMusicSettings[playerIndex];
|
||||
|
||||
if (!gGameStatusPtr->musicEnabled) {
|
||||
au_song_stop(musicSetting->songName);
|
||||
snd_song_stop(musicSetting->songName);
|
||||
musicSetting->flags &= ~MUSIC_SETTINGS_FLAG_1;
|
||||
return 1;
|
||||
}
|
||||
|
@ -272,13 +272,13 @@ s32 bgm_adjust_proximity(s32 playerIndex, s32 mix, s16 state) {
|
|||
|
||||
switch (state) {
|
||||
case MUSIC_PROXIMITY_FAR:
|
||||
bgm_set_proximity_mix_far(musicSetting->songName, mix);
|
||||
snd_song_set_proximity_mix_far(musicSetting->songName, mix);
|
||||
break;
|
||||
case MUSIC_PROXIMITY_NEAR:
|
||||
bgm_set_proximity_mix_near(musicSetting->songName, mix);
|
||||
snd_song_set_proximity_mix_near(musicSetting->songName, mix);
|
||||
break;
|
||||
case MUSIC_PROXIMITY_FULL:
|
||||
bgm_set_proximity_mix_full(musicSetting->songName, mix);
|
||||
snd_song_set_proximity_mix_full(musicSetting->songName, mix);
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -304,14 +304,14 @@ AuResult bgm_clear_track_volumes(s32 playerIndex, s16 trackVolSet) {
|
|||
return snd_song_clear_track_volumes(musicSetting->songName, trackVolSet);
|
||||
}
|
||||
|
||||
AuResult bgm_set_variation(s32 playerIndex, s16 variation) {
|
||||
AuResult bgm_set_linked_mode(s32 playerIndex, s16 mode) {
|
||||
MusicSettings* musicSetting = &gMusicSettings[playerIndex];
|
||||
|
||||
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAG_1)) {
|
||||
return AU_RESULT_OK;
|
||||
}
|
||||
|
||||
return snd_set_song_variation(musicSetting->songName, variation);
|
||||
return snd_set_song_linked_mode(musicSetting->songName, mode);
|
||||
}
|
||||
|
||||
s32 bgm_init_music_players(void) {
|
||||
|
@ -366,7 +366,7 @@ b32 bgm_is_any_song_playing(void) {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (au_song_is_playing(settings->songName)) {
|
||||
if (snd_song_is_playing(settings->songName)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,165 @@
|
|||
#ifndef _AUDIO_CORE_H_
|
||||
#define _AUDIO_CORE_H_
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// core/system.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
void create_audio_system(void);
|
||||
//void nuAuPreNMIFuncSet(NUAuPreNMIFunc func);
|
||||
void nuAuMgr(void* arg);
|
||||
s32 nuAuDmaCallBack(s32 addr, s32 len, void *state, u8 useDma);
|
||||
//ALDMAproc nuAuDmaNew(NUDMAState** state);
|
||||
//void nuAuCleanDMABuffers(void);
|
||||
//void nuAuPreNMIProc(NUScMsg mesg_type, u32 frameCounter);
|
||||
//void alLink(ALLink* element, ALLink* after);
|
||||
//void alUnlink(ALLink* element);
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
//core/engine.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
void au_release_voice(u8 index);
|
||||
void au_engine_init(s32 outputRate);
|
||||
static void au_reset_instrument(Instrument* instrument);
|
||||
static void au_reset_drum_entry(BGMDrumInfo* arg0);
|
||||
static void au_reset_instrument_entry(BGMInstrumentInfo* arg0);
|
||||
|
||||
/// this is called once per video frame update (50 or 60 times per second)
|
||||
void au_update_clients_for_video_frame(void);
|
||||
|
||||
/// this is called per audio frame generated by alAudioFrame (every 184 audio samples)
|
||||
/// there will be multiuple of these per video frame
|
||||
void au_update_clients_for_audio_frame(void);
|
||||
|
||||
void au_syn_begin_audio_frame(AuGlobals* globals);
|
||||
void au_reset_nonfree_voice(AuVoice* arg0, u8 arg1);
|
||||
void au_reset_voice(AuVoice* voice, u8 voiceIdx);
|
||||
|
||||
/**
|
||||
* @brief Converts a linear pitch value (in cents) into a frequency ratio suitable for adjusting playback speed.
|
||||
*
|
||||
* This function computes the playback rate corresponding to a pitch shift (up or down) in cents.
|
||||
* Positive values increase pitch (higher frequency), and negative values decrease it.
|
||||
* Recall 100 cents = 1 semitone, and therefore 1200 cents = 1 octave.
|
||||
*
|
||||
* @param tuning The pitch offset in cents, from +4095 (~ 40.95 semitones up) to -16383 (~ 163.83 semitones down)
|
||||
*
|
||||
* @return Floating point output rate multiplier. Multiply this with the base sample rate to apply the pitch.
|
||||
*/
|
||||
f32 au_compute_pitch_ratio(s32 tuning);
|
||||
|
||||
void au_fade_init(Fade* fade, s32 time, s32 startValue, s32 endValue);
|
||||
void au_fade_clear(Fade* fade);
|
||||
void au_fade_update(Fade* fade);
|
||||
void au_fade_set_volume(u8 arg0, u16 arg1, s32 arg2);
|
||||
void au_unk_80053AC8(Fade* fade);
|
||||
void au_fade_set_vol_scale(Fade* fade, s16 value);
|
||||
void au_unk_80053B04(Fade* fade, u32 arg1, s32 target);
|
||||
void au_unk_80053BA8(Fade* fade);
|
||||
Instrument* au_get_instrument(AuGlobals* globals, BankSetIndex bank, s32 patch, EnvelopeData* arg3);
|
||||
void au_get_bgm_player_and_file(u32 playerIndex, BGMHeader** outCurrentTrackData, BGMPlayer** outPlayer);
|
||||
void au_get_bgm_player(u32 playerIndex, BGMPlayer** outPlayer);
|
||||
AuResult au_load_song_files(u32 arg0, BGMHeader* arg1, BGMPlayer* arg2);
|
||||
AuResult au_unk_80053E58(s32 songID, BGMHeader* arg1);
|
||||
BGMPlayer* au_unk_80053F64(s32 arg0);
|
||||
AuResult au_ambient_load(u32 arg0);
|
||||
BGMPlayer* au_unk_80054248(u8 arg0);
|
||||
void au_load_INIT(AuGlobals* arg0, s32 romAddr, ALHeap* heap);
|
||||
AuResult au_fetch_SBN_file(u32 fileIdx, AuFileFormat format, SBNFileEntry* arg2);
|
||||
void au_load_PER(AuGlobals* globals, s32 romAddr);
|
||||
void au_load_PRG(AuGlobals* arg0, s32 romAddr);
|
||||
InstrumentBank* au_get_BK_instruments(BankSet bankSet, u32 bankIndex);
|
||||
BKFileBuffer* au_load_BK_to_bank(s32 bkFileOffset, BKFileBuffer* bkFile, s32 bankIndex, BankSet bankSet);
|
||||
void au_swizzle_BK_instruments(s32 bkFileOffset, BKFileBuffer* bkFile, InstrumentBank instruments, u32 instrumentCount, u8 arg4);
|
||||
BKFileBuffer* au_load_static_BK_to_bank(s32* bkFileOffset, void* vaddr, s32 bankIndex, BankSet bankSet);
|
||||
s32 au_load_aux_bank(s32 bkFileOffset, s32 bankIndex);
|
||||
void au_clear_instrument_group(s32 bankIndex, BankSet bankSet);
|
||||
void au_set_bus_volume_level(s32 arg0, u32 idx);
|
||||
s32 au_set_reverb_type(s32 arg0, s32 arg1);
|
||||
void au_unk_80054DA8(u32 arg0);
|
||||
void au_read_rom(s32 romAddr, void* buffer, u32 size);
|
||||
void au_memset(void* dst, s32 size, u8 value);
|
||||
void au_copy_bytes(s8* src, s8* dest, s32 size);
|
||||
void au_copy_words(void* src, void* dst, s32 size);
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// core/syn_driver.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
void au_driver_init(AuSynDriver* driver, ALConfig* config);
|
||||
void au_driver_release(void);
|
||||
//Acmd* alAudioFrame(Acmd* cmdList, s32* cmdLen, s16* outBuf, s32 outLen);
|
||||
void au_use_global_volume(void);
|
||||
void au_set_global_volume(s16 arg0);
|
||||
s16 au_get_global_volume(void);
|
||||
void func_80056D5C(b8 arg0);
|
||||
void au_bus_set_volume(u8 busID, u16 value);
|
||||
u16 au_bus_get_volume(u8 busID);
|
||||
void au_bus_set_effect(u8 busID, u8 effectID);
|
||||
void au_bus_set_fx_params(u8 busID, s16 arg1, s16 arg2, s32 arg3);
|
||||
void au_pvoice_set_bus(u8 voiceIdx, s8 busID);
|
||||
void au_syn_stop_voice(u8 voiceIdx);
|
||||
void au_syn_start_voice(u8 index);
|
||||
void au_syn_start_voice_params(u8 index, u8 reverbType, Instrument* table, f32 pitch, s16 vol, u8 pan, u8 fxMix, s32 delta);
|
||||
void au_syn_set_wavetable(u8 voiceIdx, Instrument* table);
|
||||
void au_syn_set_pitch(u8 voiceIdx, f32 pitchRatio);
|
||||
void au_syn_set_mixer_params(u8 voiceIdx, s16 volume, s32 arg2, u8 arg3, u8 arg4);
|
||||
void au_syn_set_pan_fxmix(u8 voiceIdx, u8 arg1, u8 arg2);
|
||||
void au_syn_set_volume_delta(u8 voiceIdx, s16 arg1, s32 arg2);
|
||||
void au_syn_set_pan(u8 voiceIdx, u8 pan);
|
||||
void au_syn_set_fxmix(u8 voiceIdx, u8 dryAmt);
|
||||
s32 au_syn_get_playing(u8 voiceIdx);
|
||||
s32 au_syn_get_bus(u8 voiceIdx);
|
||||
f32 au_syn_get_pitch(u8 voiceIdx);
|
||||
u8 au_syn_get_pan(u8 voiceIdx);
|
||||
s16 au_syn_get_dryamt(u8 voiceIdx);
|
||||
s16 au_syn_get_wetamt(u8 voiceIdx);
|
||||
s32 au_syn_get_volume_left(u8 voiceIdx);
|
||||
s32 au_syn_get_volume_right(u8 voiceIdx);
|
||||
void au_set_delay_time(s32 arg0);
|
||||
void au_delay_left_channel(u8 arg0);
|
||||
void au_delay_right_channel(u8 arg0);
|
||||
void au_disable_channel_delay(void);
|
||||
void au_init_delay_channel(s16 arg0);
|
||||
//void alHeapInit(ALHeap* hp, u8* base, s32 len);
|
||||
//void alCopy(void* src, void* dst, s32 size);
|
||||
#undef alHeapAlloc
|
||||
void* alHeapAlloc(ALHeap* heap, s32 count, s32 size);
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// core/voice.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
void au_update_stopped_voices(AuGlobals* globals);
|
||||
void au_init_voices(AuGlobals* globals);
|
||||
void au_update_voices(AuGlobals* globals);
|
||||
void au_voice_after_volume_change(AuVoice* arg0);
|
||||
|
||||
/**
|
||||
* @brief Converts envelope step duration from microseconds to num samples delta.
|
||||
*
|
||||
* Uses AU_FRAME_USEC as the base time slice, returning the number of audio samples
|
||||
* corresponding to the provided duration.
|
||||
*
|
||||
* @param msecs Time duration in microseconds.
|
||||
* @return Number of samples that should pass in this interval.
|
||||
*/
|
||||
s32 au_voice_get_delta(s32 arg0);
|
||||
|
||||
void au_voice_start(AuVoice* voice, EnvelopeData* arg1);
|
||||
u8 au_voice_step(AuVoice* voice);
|
||||
void au_voice_set_vol_changed(AuVoice* arg0);
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// core/pull_voice.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
Acmd* au_pull_voice(AuPVoice* pvoice, Acmd* cmdBufPos);
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// core/reverb.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
void au_fx_create(AuFX* fx, u8 mode, ALHeap* heap);
|
||||
void au_filter_create(AuFilter* kappa, ALHeap* heap);
|
||||
void au_filter_init(AuFilter* kappa, s16 arg1, s16 arg2, s16 fc);
|
||||
void au_fx_load_preset(AuFX* fx, u8 effectType);
|
||||
Acmd* au_pull_fx(AuFX* fx, Acmd* cmdBusPos, s16, s16);
|
||||
s32 au_fx_param_hdl(AuFX* fx, s16 index, s16 paramID, s32 value);
|
||||
|
||||
#endif
|
|
@ -1,4 +1,5 @@
|
|||
#include "audio.h"
|
||||
#include "audio/core.h"
|
||||
#include "ld_addrs.h"
|
||||
|
||||
AuCallback BeginSoundUpdateCallback;
|
||||
|
@ -66,12 +67,12 @@ void au_engine_init(s32 outputRate) {
|
|||
globals->defaultInstrument = alHeapAlloc(alHeap, 1, sizeof(Instrument));
|
||||
globals->dataPER = alHeapAlloc(alHeap, 1, 6 * sizeof(PEREntry));
|
||||
globals->dataPRG = alHeapAlloc(alHeap, 1, 64 * sizeof(BGMInstrumentInfo));
|
||||
globals->musicEventQueue = alHeapAlloc(alHeap, 1, 16 * sizeof(MusicEventTrigger));
|
||||
globals->musicEventQueue = alHeapAlloc(alHeap, 1, MUS_QUEUE_SIZE * sizeof(MusicEventTrigger));
|
||||
globals->outputRate = outputRate;
|
||||
au_reset_instrument(globals->defaultInstrument);
|
||||
au_reset_drum_entry(&globals->defaultDrumEntry);
|
||||
au_reset_instrument_entry(&globals->defaultPRGEntry);
|
||||
bgm_clear_music_events();
|
||||
snd_song_clear_music_events();
|
||||
|
||||
globals->audioThreadCallbacks[0] = NULL;
|
||||
globals->audioThreadCallbacks[1] = NULL;
|
||||
|
@ -124,7 +125,7 @@ void au_engine_init(s32 outputRate) {
|
|||
au_bgm_set_effect_indices(gBGMPlayerB, effects);
|
||||
|
||||
au_sfx_init(gSoundManager, AU_PRIORITY_SFX_MANAGER, FX_BUS_SOUND, globals, 16);
|
||||
au_amb_manager_init(gAuAmbienceManager, AU_PRIORITY_MSEQ_MANAGER, FX_BUS_SOUND, globals);
|
||||
au_mseq_manager_init(gAuAmbienceManager, AU_PRIORITY_MSEQ_MANAGER, FX_BUS_SOUND, globals);
|
||||
au_init_voices(globals);
|
||||
au_load_BK_headers(globals, alHeap);
|
||||
if (au_fetch_SBN_file(globals->extraFileList[0], AU_FMT_SEF, &fileEntry) == AU_RESULT_OK) {
|
||||
|
@ -218,7 +219,7 @@ void au_update_clients_for_audio_frame(void) {
|
|||
ambManager->nextUpdateCounter -= ambManager->nextUpdateStep;
|
||||
if (ambManager->nextUpdateCounter <= 0) {
|
||||
ambManager->nextUpdateCounter += ambManager->nextUpdateInterval;
|
||||
au_amb_manager_audio_frame_update(ambManager);
|
||||
au_mseq_manager_audio_frame_update(ambManager);
|
||||
}
|
||||
|
||||
// Update volume fade for SFX bus
|
||||
|
@ -285,7 +286,7 @@ void au_update_clients_for_video_frame(void) {
|
|||
SoundManager* manager = gSoundManager;
|
||||
|
||||
if (globals->flushMusicEventQueue) {
|
||||
bgm_clear_music_events();
|
||||
snd_song_clear_music_events();
|
||||
}
|
||||
|
||||
BeginSoundUpdateCallback = globals->audioThreadCallbacks[0];
|
||||
|
@ -854,7 +855,7 @@ void au_load_PRG(AuGlobals* globals, s32 romAddr) {
|
|||
}
|
||||
}
|
||||
|
||||
s32 snd_load_BGM(s32 arg0) {
|
||||
s32 au_load_BGM(s32 arg0) {
|
||||
AuGlobals* globals = gSoundGlobals;
|
||||
InitSongEntry* song = globals->songList;
|
||||
s32 ret = AU_RESULT_OK;
|
||||
|
@ -1162,7 +1163,7 @@ void au_clear_instrument_group(s32 bankIndex, BankSet bankSet) {
|
|||
}
|
||||
}
|
||||
|
||||
void au_unk_80054CE0(s32 soundTypeFlags, u32 volPreset) {
|
||||
void au_set_bus_volume_level(s32 soundTypeFlags, u32 volPreset) {
|
||||
if (volPreset < ARRAY_COUNT(PerceptualVolumeLevels)) {
|
||||
s32 vol = PerceptualVolumeLevels[volPreset];
|
||||
if (soundTypeFlags & AUDIO_TYPE_BGM) {
|
||||
|
@ -1178,7 +1179,7 @@ void au_unk_80054CE0(s32 soundTypeFlags, u32 volPreset) {
|
|||
}
|
||||
}
|
||||
|
||||
s32 au_unk_80054D74(s32 soundTypeFlags, s32 reverbType) {
|
||||
s32 au_set_reverb_type(s32 soundTypeFlags, s32 reverbType) {
|
||||
if (soundTypeFlags & AUDIO_TYPE_SFX) {
|
||||
return au_sfx_set_reverb_type(gSoundManager, reverbType);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "common.h"
|
||||
#include "audio.h"
|
||||
#include "audio/core.h"
|
||||
|
||||
#define LFSAMPLES 4
|
||||
#define AUEQPOWER_LENGTH 128
|
||||
|
@ -286,8 +286,8 @@ Acmd* au_pull_voice(AuPVoice* pvoice, Acmd* cmdBufPos) {
|
|||
envMixer->lratm = _getRate(envMixer->cvolL, envMixer->ltgt, envMixer->segEnd, &envMixer->lratl);
|
||||
envMixer->rratm = _getRate(envMixer->cvolR, envMixer->rtgt, envMixer->segEnd, &envMixer->rratl);
|
||||
n_aSetVolume(ptr++, A_RATE, envMixer->ltgt, envMixer->lratm, envMixer->lratl);
|
||||
n_aSetVolume(ptr++, A_LEFT | A_VOL, envMixer->cvolL, envMixer->dryamt, envMixer->wetamt);
|
||||
n_aSetVolume(ptr++, A_RIGHT | A_VOL, envMixer->rtgt, envMixer->rratm, envMixer->rratl);
|
||||
n_aSetVolume(ptr++, A_VOL | A_LEFT, envMixer->cvolL, envMixer->dryamt, envMixer->wetamt);
|
||||
n_aSetVolume(ptr++, A_VOL | A_RIGHT, envMixer->rtgt, envMixer->rratm, envMixer->rratl);
|
||||
n_aEnvMixer(ptr++, A_INIT, envMixer->cvolR, osVirtualToPhysical(envMixer->state));
|
||||
} else {
|
||||
n_aEnvMixer(ptr++, A_CONTINUE, 0, osVirtualToPhysical(envMixer->state));
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "common.h"
|
||||
#include "audio.h"
|
||||
#include "audio/core.h"
|
||||
|
||||
#define SWAP16(in, out) \
|
||||
{ \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "common.h"
|
||||
#include "audio.h"
|
||||
#include "nu/nualsgi.h"
|
||||
#include "audio/core.h"
|
||||
|
||||
static s16 _getVol(s16 arg0, s32 arg1, s16 arg2, u16 arg3);
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
#include "nu/nualsgi.h"
|
||||
#include "audio.h"
|
||||
#include "audio/core.h"
|
||||
|
||||
NOP_FIX
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "common.h"
|
||||
#include "audio.h"
|
||||
#include "audio/core.h"
|
||||
|
||||
// unused
|
||||
void au_update_stopped_voices(AuGlobals* globals) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "common.h"
|
||||
#include "audio.h"
|
||||
#include "audio/core.h"
|
||||
|
||||
void au_load_BK_headers(AuGlobals* globals, ALHeap* heap) {
|
||||
SBNFileEntry fileEntry;
|
||||
|
|
|
@ -1,33 +1,34 @@
|
|||
#include "audio.h"
|
||||
#include "audio/core.h"
|
||||
|
||||
extern u8 BlankMseqData[];
|
||||
|
||||
#define TRACK_ID_DRUM 9
|
||||
|
||||
enum AmbientMode {
|
||||
AMB_MODE_PLAYING = 0,
|
||||
AMB_MODE_RESUMING = 1,
|
||||
AMB_MODE_STOPPED = 2,
|
||||
AMB_MODE_PAUSING = 3,
|
||||
enum MseqMode {
|
||||
MSEQ_MODE_PLAYING = 0,
|
||||
MSEQ_MODE_RESUMING = 1,
|
||||
MSEQ_MODE_STOPPED = 2,
|
||||
MSEQ_MODE_PAUSING = 3,
|
||||
};
|
||||
|
||||
enum AmbientFadeState {
|
||||
AMB_FADE_IN = 0,
|
||||
AMB_FADE_OUT = 1,
|
||||
AMB_FADE_OUT_PAUSING = 2,
|
||||
enum MseqFadeState {
|
||||
MSEQ_FADE_IN = 0,
|
||||
MSEQ_FADE_OUT = 1,
|
||||
MSEQ_FADE_OUT_PAUSING = 2,
|
||||
};
|
||||
|
||||
enum AmbientPlayState {
|
||||
AMB_PLAYER_PLAYING = 0,
|
||||
AMB_PLAYER_STOPPED = 1,
|
||||
AMB_PLAYER_STOPPING = 2,
|
||||
enum MseqPlayState {
|
||||
MSEQ_PLAYER_PLAYING = 0,
|
||||
MSEQ_PLAYER_STOPPED = 1,
|
||||
MSEQ_PLAYER_STOPPING = 2,
|
||||
};
|
||||
|
||||
enum AmbientTrackFlags {
|
||||
TRACK_FLAG_RESUMABLE = 1,
|
||||
enum MseqTrackFlags {
|
||||
MSEQ_TRACK_RESUMABLE = 1,
|
||||
};
|
||||
|
||||
enum MSEQCommand {
|
||||
enum MseqCommand {
|
||||
MSEQ_CMD_80_STOP_SOUND = 0x80,
|
||||
MSEQ_CMD_90_PLAY_SOUND = 0x90,
|
||||
MSEQ_CMD_A0_SET_VOLUME_PAN = 0xA0,
|
||||
|
@ -40,7 +41,7 @@ enum MSEQCommand {
|
|||
MSEQ_CMD_SUB_69_SET_RESUMABLE = 0x69,
|
||||
};
|
||||
|
||||
void au_amb_manager_init(AmbienceManager* manager, s8 priority, s8 busID, AuGlobals* globals) {
|
||||
void au_mseq_manager_init(AmbienceManager* manager, s8 priority, s8 busID, AuGlobals* globals) {
|
||||
AmbiencePlayer* player;
|
||||
s32 i;
|
||||
|
||||
|
@ -50,7 +51,7 @@ void au_amb_manager_init(AmbienceManager* manager, s8 priority, s8 busID, AuGlob
|
|||
player = &manager->players[i];
|
||||
player->id.playerIndex = i;
|
||||
player->delay = 1;
|
||||
player->fadeVolume = AU_MAX_VOLUME_8 << 0x18;
|
||||
player->fadeVolume = AU_MAX_VOLUME_8 << 24;
|
||||
}
|
||||
|
||||
manager->globals = globals;
|
||||
|
@ -61,7 +62,7 @@ void au_amb_manager_init(AmbienceManager* manager, s8 priority, s8 busID, AuGlob
|
|||
manager->busID = busID;
|
||||
}
|
||||
|
||||
AuResult au_amb_check_player_index(u32 index) {
|
||||
AuResult au_mseq_check_player_index(u32 index) {
|
||||
if (gAuAmbienceManager->numActivePlayers <= index) {
|
||||
return AU_AMBIENCE_ERROR_3;
|
||||
} else {
|
||||
|
@ -69,35 +70,35 @@ AuResult au_amb_check_player_index(u32 index) {
|
|||
}
|
||||
}
|
||||
|
||||
void au_amb_load_tracks_fade(s32 arg0, s32 arg1) {
|
||||
void au_mseq_load_tracks_fade(s32 arg0, s32 arg1) {
|
||||
gAuAmbienceManager->loadTracksFadeInfo = arg1;
|
||||
}
|
||||
|
||||
void au_amb_set_disabled(s32 index, s32 disable) {
|
||||
void au_mseq_set_disabled(s32 index, s32 disable) {
|
||||
AmbienceManager* manager = gAuAmbienceManager;
|
||||
AmbiencePlayer* player = &manager->players[index];
|
||||
|
||||
if (!disable) {
|
||||
player->playState = AMB_PLAYER_PLAYING;
|
||||
player->playState = MSEQ_PLAYER_PLAYING;
|
||||
} else {
|
||||
player->playState = AMB_PLAYER_STOPPING;
|
||||
player->playState = MSEQ_PLAYER_STOPPING;
|
||||
}
|
||||
}
|
||||
|
||||
AuResult au_amb_start(s32 index, s32 time) {
|
||||
AuResult au_mseq_start(s32 index, s32 time) {
|
||||
AmbiencePlayer* player = &gAuAmbienceManager->players[index];
|
||||
MSEQHeader* mseq = gAuAmbienceManager->mseqFiles[index];
|
||||
AuResult status = AU_RESULT_OK;
|
||||
|
||||
if (mseq != NULL) {
|
||||
if (player->mseqName == 0) {
|
||||
au_amb_play_sequence(gAuAmbienceManager, mseq, index);
|
||||
au_mseq_play_sequence(gAuAmbienceManager, mseq, index);
|
||||
if (time != 0) {
|
||||
player->fadeSettingsTime = time;
|
||||
player->fadeSettingsInitial = 0;
|
||||
player->fadeSettingsGoal = AU_MAX_VOLUME_8;
|
||||
player->fadeSettingsType = AMB_FADE_IN;
|
||||
au_amb_fade_setup(player);
|
||||
player->fadeSettingsType = MSEQ_FADE_IN;
|
||||
au_mseq_fade_setup(player);
|
||||
}
|
||||
} else {
|
||||
status = AU_AMBIENCE_ERROR_PLAYER_BUSY;
|
||||
|
@ -108,15 +109,15 @@ AuResult au_amb_start(s32 index, s32 time) {
|
|||
return status;
|
||||
}
|
||||
|
||||
void au_amb_fade_setup(AmbiencePlayer* player) {
|
||||
void au_mseq_fade_setup(AmbiencePlayer* player) {
|
||||
u16 time = player->fadeSettingsTime;
|
||||
|
||||
if (player->fadeSettingsInitial == 255) {
|
||||
player->fadeSettingsInitial = player->fadeVolume >> 0x18;
|
||||
player->fadeSettingsInitial = player->fadeVolume >> 24;
|
||||
}
|
||||
|
||||
if (time >= SND_MIN_DURATION && time <= SND_MAX_DURATION) {
|
||||
player->fadeVolume = player->fadeSettingsInitial << 0x18;
|
||||
player->fadeVolume = player->fadeSettingsInitial << 24;
|
||||
player->fadeGoal = player->fadeSettingsGoal;
|
||||
|
||||
// converts a fade time in milliseconds to the number of player update ticks needed to complete the fade
|
||||
|
@ -125,7 +126,7 @@ void au_amb_fade_setup(AmbiencePlayer* player) {
|
|||
// this reduces to 16/184, which is exactly 1.6 times 10/115
|
||||
// why this odd reduction was chosen unstead of 16/184 is unknown
|
||||
player->fadeTime = (u32)(time * 10) / 115;
|
||||
player->fadeStep = ((player->fadeSettingsGoal - player->fadeSettingsInitial) << 0x18) / ((s16)player->fadeTime & 0xFFFF);
|
||||
player->fadeStep = ((player->fadeSettingsGoal - player->fadeSettingsInitial) << 24) / ((s16)player->fadeTime & 0xFFFF);
|
||||
}
|
||||
|
||||
player->fadeSettingsTime = 0;
|
||||
|
@ -133,7 +134,7 @@ void au_amb_fade_setup(AmbiencePlayer* player) {
|
|||
player->fadeSettingsGoal = 0;
|
||||
}
|
||||
|
||||
void au_amb_pause(s32 index, s32 time) {
|
||||
void au_mseq_pause(s32 index, s32 time) {
|
||||
AmbiencePlayer* player = &gAuAmbienceManager->players[index];
|
||||
|
||||
if (player->mseqReadStart != NULL && player->mseqReadPos != NULL) {
|
||||
|
@ -141,18 +142,18 @@ void au_amb_pause(s32 index, s32 time) {
|
|||
player->fadeSettingsInitial = 255;
|
||||
player->fadeSettingsTime = time;
|
||||
player->fadeSettingsGoal = 0;
|
||||
player->fadeSettingsType = AMB_FADE_OUT_PAUSING;
|
||||
player->fadeSettingsType = MSEQ_FADE_OUT_PAUSING;
|
||||
return;
|
||||
}
|
||||
player->mode = AMB_MODE_PAUSING;
|
||||
player->mode = MSEQ_MODE_PAUSING;
|
||||
}
|
||||
}
|
||||
|
||||
void au_amb_resume(s32 index, s32 time) {
|
||||
void au_mseq_resume(s32 index, s32 time) {
|
||||
AmbiencePlayer* player = &gAuAmbienceManager->players[index];
|
||||
|
||||
if (player->mseqReadStart != NULL && player->mseqReadPos != NULL) {
|
||||
player->mode = AMB_MODE_RESUMING;
|
||||
player->mode = MSEQ_MODE_RESUMING;
|
||||
if (time != 0) {
|
||||
player->fadeSettingsTime = time;
|
||||
} else {
|
||||
|
@ -160,18 +161,18 @@ void au_amb_resume(s32 index, s32 time) {
|
|||
}
|
||||
player->fadeSettingsInitial = 0;
|
||||
player->fadeSettingsGoal = AU_MAX_VOLUME_8;
|
||||
player->fadeSettingsType = AMB_FADE_IN;
|
||||
player->fadeSettingsType = MSEQ_FADE_IN;
|
||||
}
|
||||
}
|
||||
|
||||
void au_amb_stop_quick(s32 index) {
|
||||
void au_mseq_stop_quick(s32 index) {
|
||||
AmbiencePlayer* player = &gAuAmbienceManager->players[index];
|
||||
|
||||
if (player->mseqReadStart != NULL && player->mseqReadPos != NULL) {
|
||||
if (player->mode != AMB_MODE_PLAYING) {
|
||||
if (player->mode != MSEQ_MODE_PLAYING) {
|
||||
player->mseqReadPos = NULL;
|
||||
player->mseqName = 0;
|
||||
player->mode = AMB_MODE_PLAYING;
|
||||
player->mode = MSEQ_MODE_PLAYING;
|
||||
return;
|
||||
}
|
||||
player->mseqReadPos = BlankMseqData;
|
||||
|
@ -179,7 +180,7 @@ void au_amb_stop_quick(s32 index) {
|
|||
}
|
||||
}
|
||||
|
||||
void au_amb_stop_slow(s32 index, s32 time) {
|
||||
void au_mseq_stop_slow(s32 index, s32 time) {
|
||||
AmbiencePlayer* player = &gAuAmbienceManager->players[index];
|
||||
|
||||
if (player->mseqReadStart != NULL && player->mseqReadPos != NULL) {
|
||||
|
@ -190,11 +191,11 @@ void au_amb_stop_slow(s32 index, s32 time) {
|
|||
}
|
||||
player->fadeSettingsInitial = 255;
|
||||
player->fadeSettingsGoal = 0;
|
||||
player->fadeSettingsType = AMB_FADE_OUT;
|
||||
player->fadeSettingsType = MSEQ_FADE_OUT;
|
||||
}
|
||||
}
|
||||
|
||||
void au_amb_set_volume(s32 index, s32 time, s32 volume) {
|
||||
void au_mseq_set_volume(s32 index, s32 time, s32 volume) {
|
||||
AmbiencePlayer* player = &gAuAmbienceManager->players[index];
|
||||
if ((player->mseqReadStart != 0) && (player->mseqReadPos != 0)) {
|
||||
if (volume <= 0) {
|
||||
|
@ -209,24 +210,24 @@ void au_amb_set_volume(s32 index, s32 time, s32 volume) {
|
|||
}
|
||||
player->fadeSettingsInitial = 255;
|
||||
player->fadeSettingsGoal = volume;
|
||||
player->fadeSettingsType = AMB_FADE_IN;
|
||||
player->fadeSettingsType = MSEQ_FADE_IN;
|
||||
}
|
||||
}
|
||||
|
||||
AuResult au_amb_check_stopped(s32 index) {
|
||||
AuResult au_mseq_check_stopped(s32 index) {
|
||||
AmbiencePlayer* player = &gAuAmbienceManager->players[index];
|
||||
AuResult status = AU_RESULT_OK;
|
||||
|
||||
if (player->mseqReadStart != NULL && player->mseqReadPos != NULL) {
|
||||
status = AU_AMBIENCE_STOP_ERROR_1;
|
||||
if (player->mode != AMB_MODE_PLAYING) {
|
||||
if (player->mode != MSEQ_MODE_PLAYING) {
|
||||
status = AU_AMBIENCE_STOP_ERROR_2;
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
void au_amb_play_sequence(AmbienceManager* manager, MSEQHeader* mseqFile, s32 index) {
|
||||
void au_mseq_play_sequence(AmbienceManager* manager, MSEQHeader* mseqFile, s32 index) {
|
||||
AmbiencePlayer* player;
|
||||
AmbienceTrack* track;
|
||||
AuFilePos readPos;
|
||||
|
@ -244,7 +245,7 @@ void au_amb_play_sequence(AmbienceManager* manager, MSEQHeader* mseqFile, s32 in
|
|||
player->mseqReadStart = readPos;
|
||||
|
||||
player->delay = 1;
|
||||
player->fadeVolume = AU_MAX_VOLUME_8 << 0x18;
|
||||
player->fadeVolume = AU_MAX_VOLUME_8 << 24;
|
||||
player->fadeGoal = AU_MAX_VOLUME_8;
|
||||
|
||||
player->mseqName = player->mseqFile->name;
|
||||
|
@ -262,7 +263,7 @@ void au_amb_play_sequence(AmbienceManager* manager, MSEQHeader* mseqFile, s32 in
|
|||
player->resetRequired = TRUE;
|
||||
}
|
||||
|
||||
void au_amb_manager_audio_frame_update(AmbienceManager* manager) {
|
||||
void au_mseq_manager_audio_frame_update(AmbienceManager* manager) {
|
||||
u32 i;
|
||||
s32 j;
|
||||
|
||||
|
@ -284,32 +285,32 @@ void au_amb_manager_audio_frame_update(AmbienceManager* manager) {
|
|||
|
||||
if (player->mseqReadPos != NULL) {
|
||||
if (manager->loadTracksFadeInfo) {
|
||||
au_amb_load_track_fade_info(manager, player);
|
||||
au_mseq_load_track_fade_info(manager, player);
|
||||
}
|
||||
|
||||
mode = player->mode;
|
||||
if (mode != AMB_MODE_PLAYING) {
|
||||
if (mode == AMB_MODE_PAUSING) {
|
||||
player->mode = AMB_MODE_STOPPED;
|
||||
au_amb_save_voices(manager, player);
|
||||
au_amb_player_stop(manager, player);
|
||||
} else if (player->mode == AMB_MODE_RESUMING) {
|
||||
player->mode = AMB_MODE_PLAYING;
|
||||
if (mode != MSEQ_MODE_PLAYING) {
|
||||
if (mode == MSEQ_MODE_PAUSING) {
|
||||
player->mode = MSEQ_MODE_STOPPED;
|
||||
au_mseq_save_voices(manager, player);
|
||||
au_mseq_player_stop(manager, player);
|
||||
} else if (player->mode == MSEQ_MODE_RESUMING) {
|
||||
player->mode = MSEQ_MODE_PLAYING;
|
||||
if (player->fadeSettingsTime != 0) {
|
||||
au_amb_fade_setup(player);
|
||||
au_mseq_fade_setup(player);
|
||||
}
|
||||
au_amb_restore_voices(manager, player);
|
||||
au_mseq_restore_voices(manager, player);
|
||||
}
|
||||
} else {
|
||||
// case AMB_MODE_PLAYING
|
||||
// case MSEQ_MODE_PLAYING
|
||||
if (player->fadeSettingsTime != 0) {
|
||||
au_amb_fade_setup(player);
|
||||
au_mseq_fade_setup(player);
|
||||
}
|
||||
if (player->playState == AMB_PLAYER_STOPPING) {
|
||||
au_amb_player_stop(manager, player);
|
||||
player->playState = AMB_PLAYER_STOPPED;
|
||||
if (player->playState == MSEQ_PLAYER_STOPPING) {
|
||||
au_mseq_player_stop(manager, player);
|
||||
player->playState = MSEQ_PLAYER_STOPPED;
|
||||
}
|
||||
au_amb_player_update(manager, player);
|
||||
au_mseq_player_update(manager, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -317,7 +318,7 @@ void au_amb_manager_audio_frame_update(AmbienceManager* manager) {
|
|||
manager->loadTracksFadeInfo = FALSE;
|
||||
}
|
||||
|
||||
void au_amb_load_track_fade_info(AmbienceManager* manager, AmbiencePlayer* player) {
|
||||
void au_mseq_load_track_fade_info(AmbienceManager* manager, AmbiencePlayer* player) {
|
||||
MSEQHeader* mseqFile;
|
||||
MSEQTrackData* trackData;
|
||||
AmbienceTrack* track;
|
||||
|
@ -332,11 +333,11 @@ void au_amb_load_track_fade_info(AmbienceManager* manager, AmbiencePlayer* playe
|
|||
track = &player->tracks[trackData->trackIndex];
|
||||
if (trackData->type == 0) {
|
||||
track->tuneLerp.time = trackData->time;
|
||||
track->tuneLerp.step = (trackData->delta << 0x10) / trackData->time;
|
||||
track->tuneLerp.step = (trackData->delta << 16) / trackData->time;
|
||||
track->tuneLerp.goal = trackData->goal;
|
||||
} else if (trackData->type == 1) {
|
||||
track->volumeLerp.time = trackData->time;
|
||||
track->volumeLerp.step = (trackData->delta << 0x10) / trackData->time;
|
||||
track->volumeLerp.step = (trackData->delta << 16) / trackData->time;
|
||||
track->volumeLerp.goal = trackData->goal;
|
||||
}
|
||||
trackData++;
|
||||
|
@ -344,7 +345,7 @@ void au_amb_load_track_fade_info(AmbienceManager* manager, AmbiencePlayer* playe
|
|||
}
|
||||
}
|
||||
|
||||
void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
||||
void au_mseq_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
||||
u8 isVolumeChanged[16];
|
||||
u8 isPitchChanged[16];
|
||||
AuGlobals* globals;
|
||||
|
@ -369,7 +370,7 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
}
|
||||
|
||||
if (player->resetRequired == TRUE) {
|
||||
au_amb_player_stop(manager, player);
|
||||
au_mseq_player_stop(manager, player);
|
||||
player->resetRequired = FALSE;
|
||||
}
|
||||
|
||||
|
@ -377,14 +378,14 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
player->fadeVolume += player->fadeStep;
|
||||
player->fadeTime--;
|
||||
if (player->fadeTime == 0) {
|
||||
player->fadeVolume = player->fadeGoal << 0x18;
|
||||
if (player->fadeSettingsType == AMB_FADE_IN) {
|
||||
player->fadeVolume = player->fadeGoal << 24;
|
||||
if (player->fadeSettingsType == MSEQ_FADE_IN) {
|
||||
// do nothing
|
||||
} else if (player->fadeSettingsType == AMB_FADE_OUT) {
|
||||
} else if (player->fadeSettingsType == MSEQ_FADE_OUT) {
|
||||
player->mseqReadPos = BlankMseqData;
|
||||
player->delay = 1;
|
||||
} else if (player->fadeSettingsType == AMB_FADE_OUT_PAUSING) {
|
||||
player->mode = AMB_MODE_PAUSING;
|
||||
} else if (player->fadeSettingsType == MSEQ_FADE_OUT_PAUSING) {
|
||||
player->mode = MSEQ_MODE_PAUSING;
|
||||
}
|
||||
}
|
||||
fadeVolChanged = TRUE;
|
||||
|
@ -398,17 +399,17 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
if (track->tuneLerp.time != 0) {
|
||||
track->tuneLerp.current += track->tuneLerp.step;
|
||||
} else {
|
||||
track->tuneLerp.current = track->tuneLerp.goal << 0x10;
|
||||
track->tuneLerp.current = track->tuneLerp.goal << 16;
|
||||
}
|
||||
|
||||
voiceSelector = player->id.all + (trackIdx << 0x10);
|
||||
voiceSelector = player->id.all + (trackIdx << 16);
|
||||
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
|
||||
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
|
||||
// update all voices belonging to current track
|
||||
if ((voiceState->info.all & 0xFFFF0000) == voiceSelector) {
|
||||
voice = &globals->voices[i];
|
||||
if (voice->priority == manager->priority && trackIdx != TRACK_ID_DRUM) {
|
||||
voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch + (track->tuneLerp.current >> 0x10)) * track->instrument->pitchRatio;
|
||||
voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch + (track->tuneLerp.current >> 16)) * track->instrument->pitchRatio;
|
||||
voice->syncFlags |= AU_VOICE_SYNC_FLAG_PITCH;
|
||||
isPitchChanged[i - player->firstVoiceIdx] = TRUE;
|
||||
}
|
||||
|
@ -425,10 +426,10 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
if (track->volumeLerp.time != 0) {
|
||||
track->volumeLerp.current += track->volumeLerp.step;
|
||||
} else {
|
||||
track->volumeLerp.current = track->volumeLerp.goal << 0x10;
|
||||
track->volumeLerp.current = track->volumeLerp.goal << 16;
|
||||
}
|
||||
|
||||
voiceSelector = player->id.all + (trackIdx << 0x10);
|
||||
voiceSelector = player->id.all + (trackIdx << 16);
|
||||
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
|
||||
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
|
||||
// update all voices belonging to current track
|
||||
|
@ -436,7 +437,7 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
voice = &globals->voices[i];
|
||||
if (voice->priority == manager->priority) {
|
||||
track = &player->tracks[voiceState->info.trackIndex];
|
||||
voice->clientVolume = VOL_MULT_3(player->fadeVolume >> 0x18, track->volumeLerp.current >> 0x10, voiceState->volume);
|
||||
voice->clientVolume = VOL_MULT_3(player->fadeVolume >> 24, track->volumeLerp.current >> 16, voiceState->volume);
|
||||
voice->envelopeFlags |= AU_VOICE_ENV_FLAG_VOL_CHANGED;
|
||||
}
|
||||
}
|
||||
|
@ -447,18 +448,18 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
player->delay--;
|
||||
if (player->delay <= 0) {
|
||||
while (player->delay == 0) {
|
||||
op = au_amb_read_next(player);
|
||||
op = au_mseq_read_next(player);
|
||||
if ((s8)op >= 0) {
|
||||
if (op == 0) {
|
||||
// stop
|
||||
player->mseqReadPos = NULL;
|
||||
player->mseqName = 0;
|
||||
au_amb_player_stop(manager, player);
|
||||
au_mseq_player_stop(manager, player);
|
||||
break;
|
||||
}
|
||||
if (op >= 0x78) {
|
||||
// long delay
|
||||
player->delay = ((op & 7) << 8) + au_amb_read_next(player) + 0x78;
|
||||
player->delay = ((op & 7) << 8) + au_mseq_read_next(player) + 0x78;
|
||||
} else {
|
||||
//short delay
|
||||
player->delay = op;
|
||||
|
@ -470,15 +471,15 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
// op & 0xF0 : command
|
||||
// op & 0xF : track index
|
||||
|
||||
arg1 = au_amb_read_next(player);
|
||||
arg1 = au_mseq_read_next(player);
|
||||
trackIdx = op & 0xF;
|
||||
track = &player->tracks[trackIdx];
|
||||
|
||||
switch (op & 0xF0) {
|
||||
case MSEQ_CMD_80_STOP_SOUND:
|
||||
// arg1: sound index
|
||||
if (player->playState == AMB_PLAYER_PLAYING) {
|
||||
voiceSelector = player->id.all + (trackIdx << 0x10) + (arg1 << 8);
|
||||
if (player->playState == MSEQ_PLAYER_PLAYING) {
|
||||
voiceSelector = player->id.all + (trackIdx << 16) + (arg1 << 8);
|
||||
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
|
||||
if (manager->voiceStates[i - player->firstVoiceIdx].info.all == voiceSelector) {
|
||||
manager->voiceStates[i - player->firstVoiceIdx].info.released = TRUE;
|
||||
|
@ -493,8 +494,8 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
case MSEQ_CMD_90_PLAY_SOUND:
|
||||
// arg1: pitch or drum sound id
|
||||
// arg2: volume
|
||||
arg2 = au_amb_read_next(player);
|
||||
if (player->playState == AMB_PLAYER_PLAYING) {
|
||||
arg2 = au_mseq_read_next(player);
|
||||
if (player->playState == MSEQ_PLAYER_PLAYING) {
|
||||
// find free voice
|
||||
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
|
||||
voice = &globals->voices[i];
|
||||
|
@ -527,14 +528,14 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
isPitchChanged[i - player->firstVoiceIdx] = TRUE;
|
||||
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
|
||||
// set playerIndex, trackIndex and tune
|
||||
voiceState->info.all = player->id.all + (trackIdx << 0x10) + (arg1 << 8);
|
||||
if (track->flags & TRACK_FLAG_RESUMABLE) {
|
||||
voiceState->info.all = player->id.all + (trackIdx << 16) + (arg1 << 8);
|
||||
if (track->flags & MSEQ_TRACK_RESUMABLE) {
|
||||
voiceState->isResumable = TRUE;
|
||||
} else {
|
||||
voiceState->isResumable = FALSE;
|
||||
}
|
||||
if (trackIdx != TRACK_ID_DRUM) {
|
||||
if (track->flags & TRACK_FLAG_RESUMABLE) {
|
||||
if (track->flags & MSEQ_TRACK_RESUMABLE) {
|
||||
voiceState->isResumable = TRUE;
|
||||
} else {
|
||||
voiceState->isResumable = FALSE;
|
||||
|
@ -542,8 +543,8 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
|
||||
voiceState->pitch = (arg1 & 0x7F) * 100 - track->instrument->keyBase;
|
||||
voiceState->volume = arg2 & 0x7F;
|
||||
voice->clientVolume = VOL_MULT_3(player->fadeVolume >> 0x18, track->volumeLerp.current >> 0x10, voiceState->volume);
|
||||
voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch + (track->tuneLerp.current >> 0x10)) * track->instrument->pitchRatio;
|
||||
voice->clientVolume = VOL_MULT_3(player->fadeVolume >> 24, track->volumeLerp.current >> 16, voiceState->volume);
|
||||
voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch + (track->tuneLerp.current >> 16)) * track->instrument->pitchRatio;
|
||||
voice->pan = track->pan;
|
||||
voice->reverb = track->reverb;
|
||||
voice->instrument = track->instrument;
|
||||
|
@ -557,7 +558,7 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
voice->instrument = au_get_instrument(manager->globals, bankPatch >> 8, bankPatch & 0xFF, &voice->envelope);
|
||||
voiceState->pitch = drum->keyBase - voice->instrument->keyBase;
|
||||
voiceState->volume = VOL_MULT_2(arg2 & 0x7F, drum->volume);
|
||||
voice->clientVolume = VOL_MULT_3(player->fadeVolume >> 0x18, track->volumeLerp.current >> 0x10, voiceState->volume);
|
||||
voice->clientVolume = VOL_MULT_3(player->fadeVolume >> 24, track->volumeLerp.current >> 16, voiceState->volume);
|
||||
voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch) * voice->instrument->pitchRatio;
|
||||
voice->pan = drum->pan;
|
||||
voice->reverb = drum->reverb;
|
||||
|
@ -574,7 +575,7 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
// lower 7 bits: value
|
||||
if (arg1 & 0x80) {
|
||||
track->pan = arg1 & 0x7F;
|
||||
voiceSelector = player->id.all + (trackIdx << 0x10);
|
||||
voiceSelector = player->id.all + (trackIdx << 16);
|
||||
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
|
||||
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
|
||||
if ((voiceState->info.all & 0xFFFF0000) == voiceSelector) {
|
||||
|
@ -586,17 +587,17 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
track->volumeLerp.current = arg1 << 0x18;
|
||||
track->volumeLerp.current = arg1 << 24;
|
||||
if (track->volumeLerp.current != 0) {
|
||||
track->volumeLerp.current |= 0xFFFFFF;
|
||||
}
|
||||
voiceSelector = player->id.all + (trackIdx << 0x10);
|
||||
voiceSelector = player->id.all + (trackIdx << 16);
|
||||
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
|
||||
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
|
||||
if ((voiceState->info.all & 0xFFFF0000) == voiceSelector) {
|
||||
voice = &globals->voices[i];
|
||||
if (voice->priority == manager->priority) {
|
||||
voice->clientVolume = VOL_MULT_3(player->fadeVolume >> 0x18, track->volumeLerp.current >> 0x10, voiceState->volume);
|
||||
voice->clientVolume = VOL_MULT_3(player->fadeVolume >> 24, track->volumeLerp.current >> 16, voiceState->volume);
|
||||
if (!isVolumeChanged[i - player->firstVoiceIdx]) {
|
||||
voice->envelopeFlags |= AU_VOICE_ENV_FLAG_VOL_CHANGED;
|
||||
isVolumeChanged[i - player->firstVoiceIdx] = TRUE;
|
||||
|
@ -609,7 +610,7 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
case MSEQ_CMD_B0_MULTI:
|
||||
// arg1: sub command
|
||||
// arg2: depends on sub command
|
||||
arg2 = au_amb_read_next(player);
|
||||
arg2 = au_mseq_read_next(player);
|
||||
switch (arg1) {
|
||||
case MSEQ_CMD_SUB_66_START_LOOP:
|
||||
// arg2: loop id
|
||||
|
@ -643,7 +644,7 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
break;
|
||||
case MSEQ_CMD_SUB_69_SET_RESUMABLE:
|
||||
if (arg2 == 1) {
|
||||
track->flags |= TRACK_FLAG_RESUMABLE;
|
||||
track->flags |= MSEQ_TRACK_RESUMABLE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -651,7 +652,7 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
case MSEQ_CMD_C0_SET_INSTRUMENT:
|
||||
// arg1: bank
|
||||
// arg2: patch
|
||||
arg2 = au_amb_read_next(player);
|
||||
arg2 = au_mseq_read_next(player);
|
||||
if (trackIdx != TRACK_ID_DRUM) {
|
||||
track->instrument = au_get_instrument(manager->globals, arg1, arg2, &track->envelope);
|
||||
}
|
||||
|
@ -659,14 +660,14 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
case MSEQ_CMD_E0_TUNING:
|
||||
// arg1: coarse tune
|
||||
// arg2: fine tune
|
||||
track->tuneLerp.current = (arg1 << 0x18) + (au_amb_read_next(player) << 0x10);
|
||||
voiceSelector = player->id.all + (trackIdx << 0x10);
|
||||
track->tuneLerp.current = (arg1 << 24) + (au_mseq_read_next(player) << 16);
|
||||
voiceSelector = player->id.all + (trackIdx << 16);
|
||||
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
|
||||
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
|
||||
if ((voiceState->info.all & 0xFFFF0000) == voiceSelector) {
|
||||
voice = &globals->voices[i];
|
||||
if (voice->priority == manager->priority && trackIdx != TRACK_ID_DRUM) {
|
||||
voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch + (track->tuneLerp.current >> 0x10)) * track->instrument->pitchRatio;
|
||||
voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch + (track->tuneLerp.current >> 16)) * track->instrument->pitchRatio;
|
||||
voice->syncFlags |= AU_VOICE_SYNC_FLAG_PITCH;
|
||||
isPitchChanged[i - player->firstVoiceIdx] = 1;
|
||||
}
|
||||
|
@ -686,7 +687,7 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
voice = &globals->voices[i];
|
||||
if (voice->priority == manager->priority && !isVolumeChanged[i - player->firstVoiceIdx]) {
|
||||
track = &player->tracks[voiceState->info.trackIndex];
|
||||
voice->clientVolume = VOL_MULT_3(player->fadeVolume >> 0x18, track->volumeLerp.current >> 0x10, voiceState->volume);
|
||||
voice->clientVolume = VOL_MULT_3(player->fadeVolume >> 24, track->volumeLerp.current >> 16, voiceState->volume);
|
||||
voice->envelopeFlags |= AU_VOICE_ENV_FLAG_VOL_CHANGED;
|
||||
}
|
||||
}
|
||||
|
@ -694,12 +695,12 @@ void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
}
|
||||
}
|
||||
|
||||
u8 au_amb_read_next(AmbiencePlayer* state) {
|
||||
u8 au_mseq_read_next(AmbiencePlayer* state) {
|
||||
u8 value = *state->mseqReadPos++;
|
||||
return value;
|
||||
}
|
||||
|
||||
void au_amb_player_stop(AmbienceManager* manager, AmbiencePlayer* player) {
|
||||
void au_mseq_player_stop(AmbienceManager* manager, AmbiencePlayer* player) {
|
||||
AuVoice* voice;
|
||||
AmbienceVoiceState* voiceState;
|
||||
s32 i;
|
||||
|
@ -716,7 +717,7 @@ void au_amb_player_stop(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
}
|
||||
}
|
||||
|
||||
void au_amb_save_voices(AmbienceManager* manager, AmbiencePlayer* player) {
|
||||
void au_mseq_save_voices(AmbienceManager* manager, AmbiencePlayer* player) {
|
||||
AmbienceSavedVoice* savedVoice = player->savedVoices;
|
||||
u32 numSaved = 0;
|
||||
s32 i;
|
||||
|
@ -740,7 +741,7 @@ void au_amb_save_voices(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
}
|
||||
}
|
||||
|
||||
void au_amb_restore_voices(AmbienceManager* manager, AmbiencePlayer* player) {
|
||||
void au_mseq_restore_voices(AmbienceManager* manager, AmbiencePlayer* player) {
|
||||
AuGlobals* globals;
|
||||
AuVoice* voice;
|
||||
AmbienceSavedVoice* savedVoice;
|
||||
|
@ -749,7 +750,7 @@ void au_amb_restore_voices(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
u32 i, j;
|
||||
|
||||
globals = manager->globals;
|
||||
if (player->playState == AMB_PLAYER_PLAYING) {
|
||||
if (player->playState == MSEQ_PLAYER_PLAYING) {
|
||||
for (i = 0; i < ARRAY_COUNT(player->savedVoices); i++) {
|
||||
savedVoice = &player->savedVoices[i];
|
||||
if (savedVoice->tune != 0) {
|
||||
|
@ -776,11 +777,11 @@ void au_amb_restore_voices(AmbienceManager* manager, AmbiencePlayer* player) {
|
|||
|
||||
if (j < player->lastVoiceIdx) {
|
||||
voiceState = &manager->voiceStates[j - player->firstVoiceIdx];
|
||||
voiceState->info.all = player->id.all + (savedVoice->trackIndex << 0x10) + (savedVoice->tune << 8);
|
||||
voiceState->info.all = player->id.all + (savedVoice->trackIndex << 16) + (savedVoice->tune << 8);
|
||||
voiceState->pitch = (savedVoice->tune & 0x7F) * 100 - track->instrument->keyBase;
|
||||
voiceState->volume = savedVoice->volume & 0x7F;
|
||||
voice->clientVolume = VOL_MULT_3(player->fadeVolume >> 0x18, track->volumeLerp.current >> 0x10, voiceState->volume);
|
||||
voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch + (track->tuneLerp.current >> 0x10)) * track->instrument->pitchRatio;
|
||||
voice->clientVolume = VOL_MULT_3(player->fadeVolume >> 24, track->volumeLerp.current >> 16, voiceState->volume);
|
||||
voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch + (track->tuneLerp.current >> 16)) * track->instrument->pitchRatio;
|
||||
voice->pan = track->pan;
|
||||
voice->reverb = track->reverb;
|
||||
voice->instrument = track->instrument;
|
||||
|
|
|
@ -1,134 +1,34 @@
|
|||
#ifndef _AUDIO_PRIVATE_H_
|
||||
#define _AUDIO_PRIVATE_H_
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// load_banks.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
void au_load_BK_headers(AuGlobals* arg0, ALHeap*);
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// mseq_player.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
void au_amb_manager_init(AmbienceManager* arg0, s8 arg1, s8 reverbType, AuGlobals* arg3);
|
||||
AuResult au_amb_check_player_index(u32 arg0);
|
||||
void au_amb_load_tracks_fade(s32 arg0, s32 arg1);
|
||||
void au_amb_set_disabled(s32 arg0, s32 arg1);
|
||||
AuResult au_amb_start(s32 arg0, s32 arg1);
|
||||
void au_amb_fade_setup(AmbiencePlayer* arg0);
|
||||
void au_amb_pause(s32 arg0, s32 arg1);
|
||||
void au_amb_resume(s32 arg0, s32 arg1);
|
||||
void au_amb_stop_quick(s32 arg0);
|
||||
void au_amb_stop_slow(s32 arg0, s32 arg1);
|
||||
void au_amb_set_volume(s32 arg0, s32 arg1, s32 arg2);
|
||||
AuResult au_amb_check_stopped(s32 arg0);
|
||||
void au_amb_play_sequence(AmbienceManager* arg0, MSEQHeader* mseq, s32 index);
|
||||
void au_amb_manager_audio_frame_update(AmbienceManager* arg0);
|
||||
void au_amb_load_track_fade_info(AmbienceManager* manager, AmbiencePlayer* lambda);
|
||||
void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* lambda);
|
||||
u8 au_amb_read_next(AmbiencePlayer* arg0);
|
||||
void au_amb_player_stop(AmbienceManager* arg0, AmbiencePlayer* arg1);
|
||||
void au_amb_save_voices(AmbienceManager* arg0, AmbiencePlayer* lambda);
|
||||
void au_amb_restore_voices(AmbienceManager* manager, AmbiencePlayer* lambda);
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// voice_envelope.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
void au_update_stopped_voices(AuGlobals* globals);
|
||||
void au_init_voices(AuGlobals* globals);
|
||||
void au_update_voices(AuGlobals* globals);
|
||||
void au_voice_after_volume_change(AuVoice* arg0);
|
||||
|
||||
/**
|
||||
* @brief Converts envelope step duration from microseconds to num samples delta.
|
||||
*
|
||||
* Uses AU_FRAME_USEC as the base time slice, returning the number of audio samples
|
||||
* corresponding to the provided duration.
|
||||
*
|
||||
* @param msecs Time duration in microseconds.
|
||||
* @return Number of samples that should pass in this interval.
|
||||
*/
|
||||
s32 au_voice_get_delta(s32 arg0);
|
||||
|
||||
void au_voice_start(AuVoice* voice, EnvelopeData* arg1);
|
||||
u8 au_voice_step(AuVoice* voice);
|
||||
void au_voice_set_vol_changed(AuVoice* arg0);
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
//core/engine.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
void au_release_voice(u8 index);
|
||||
void au_engine_init(s32 outputRate);
|
||||
static void au_reset_instrument(Instrument* instrument);
|
||||
static void au_reset_drum_entry(BGMDrumInfo* arg0);
|
||||
static void au_reset_instrument_entry(BGMInstrumentInfo* arg0);
|
||||
|
||||
/// this is called once per video frame update (50 or 60 times per second)
|
||||
void au_update_clients_for_video_frame(void);
|
||||
|
||||
/// this is called per audio frame generated by alAudioFrame (every 184 audio samples)
|
||||
/// there will be multiuple of these per video frame
|
||||
void au_update_clients_for_audio_frame(void);
|
||||
|
||||
void au_syn_begin_audio_frame(AuGlobals* globals);
|
||||
void au_reset_nonfree_voice(AuVoice* arg0, u8 arg1);
|
||||
void au_reset_voice(AuVoice* voice, u8 voiceIdx);
|
||||
|
||||
/**
|
||||
* @brief Converts a linear pitch value (in cents) into a frequency ratio suitable for adjusting playback speed.
|
||||
*
|
||||
* This function computes the playback rate corresponding to a pitch shift (up or down) in cents.
|
||||
* Positive values increase pitch (higher frequency), and negative values decrease it.
|
||||
* Recall 100 cents = 1 semitone, and therefore 1200 cents = 1 octave.
|
||||
*
|
||||
* @param tuning The pitch offset in cents, from +4095 (~ 40.95 semitones up) to -16383 (~ 163.83 semitones down)
|
||||
*
|
||||
* @return Floating point output rate multiplier. Multiply this with the base sample rate to apply the pitch.
|
||||
*/
|
||||
f32 au_compute_pitch_ratio(s32 tuning);
|
||||
|
||||
void au_fade_init(Fade* fade, s32 time, s32 startValue, s32 endValue);
|
||||
void au_fade_clear(Fade* fade);
|
||||
void au_fade_update(Fade* fade);
|
||||
void au_fade_set_volume(u8 arg0, u16 arg1, s32 arg2);
|
||||
void au_unk_80053AC8(Fade* fade);
|
||||
void au_fade_set_vol_scale(Fade* fade, s16 value);
|
||||
void au_unk_80053B04(Fade* fade, u32 arg1, s32 target);
|
||||
void au_unk_80053BA8(Fade* fade);
|
||||
Instrument* au_get_instrument(AuGlobals* globals, BankSetIndex bank, s32 patch, EnvelopeData* arg3);
|
||||
void au_get_bgm_player_and_file(u32 playerIndex, BGMHeader** outCurrentTrackData, BGMPlayer** outPlayer);
|
||||
void au_get_bgm_player(u32 playerIndex, BGMPlayer** outPlayer);
|
||||
AuResult au_load_song_files(u32 arg0, BGMHeader* arg1, BGMPlayer* arg2);
|
||||
AuResult au_unk_80053E58(s32 songID, BGMHeader* arg1);
|
||||
BGMPlayer* au_unk_80053F64(s32 arg0);
|
||||
AuResult au_ambient_load(u32 arg0);
|
||||
BGMPlayer* au_unk_80054248(u8 arg0);
|
||||
void au_load_INIT(AuGlobals* arg0, s32 romAddr, ALHeap* heap);
|
||||
AuResult au_fetch_SBN_file(u32 fileIdx, AuFileFormat format, SBNFileEntry* arg2);
|
||||
void au_load_PER(AuGlobals* globals, s32 romAddr);
|
||||
void au_load_PRG(AuGlobals* arg0, s32 romAddr);
|
||||
InstrumentBank* au_get_BK_instruments(BankSet bankSet, u32 bankIndex);
|
||||
BKFileBuffer* au_load_BK_to_bank(s32 bkFileOffset, BKFileBuffer* bkFile, s32 bankIndex, BankSet bankSet);
|
||||
void au_swizzle_BK_instruments(s32 bkFileOffset, BKFileBuffer* bkFile, InstrumentBank instruments, u32 instrumentCount, u8 arg4);
|
||||
BKFileBuffer* au_load_static_BK_to_bank(s32* bkFileOffset, void* vaddr, s32 bankIndex, BankSet bankSet);
|
||||
s32 au_load_aux_bank(s32 bkFileOffset, s32 bankIndex);
|
||||
void au_clear_instrument_group(s32 bankIndex, BankSet bankSet);
|
||||
void au_unk_80054CE0(s32 arg0, u32 idx);
|
||||
s32 au_unk_80054D74(s32 arg0, s32 arg1);
|
||||
void au_unk_80054DA8(u32 arg0);
|
||||
void au_read_rom(s32 romAddr, void* buffer, u32 size);
|
||||
void au_memset(void* dst, s32 size, u8 value);
|
||||
void au_copy_bytes(s8* src, s8* dest, s32 size);
|
||||
void au_copy_words(void* src, void* dst, s32 size);
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// core/system.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
void create_audio_system(void);
|
||||
//void nuAuPreNMIFuncSet(NUAuPreNMIFunc func);
|
||||
void nuAuMgr(void* arg);
|
||||
s32 nuAuDmaCallBack(s32 addr, s32 len, void *state, u8 useDma);
|
||||
//ALDMAproc nuAuDmaNew(NUDMAState** state);
|
||||
//void nuAuCleanDMABuffers(void);
|
||||
//void nuAuPreNMIProc(NUScMsg mesg_type, u32 frameCounter);
|
||||
//void alLink(ALLink* element, ALLink* after);
|
||||
//void alUnlink(ALLink* element);
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// 303c0_len_3e10.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
void au_load_BK_headers(AuGlobals* arg0, ALHeap*);
|
||||
void au_mseq_manager_init(AmbienceManager* arg0, s8 arg1, s8 reverbType, AuGlobals* arg3);
|
||||
AuResult au_mseq_check_player_index(u32 arg0);
|
||||
void au_mseq_load_tracks_fade(s32 arg0, s32 arg1);
|
||||
void au_mseq_set_disabled(s32 arg0, s32 arg1);
|
||||
AuResult au_mseq_start(s32 arg0, s32 arg1);
|
||||
void au_mseq_fade_setup(AmbiencePlayer* arg0);
|
||||
void au_mseq_pause(s32 arg0, s32 arg1);
|
||||
void au_mseq_resume(s32 arg0, s32 arg1);
|
||||
void au_mseq_stop_quick(s32 arg0);
|
||||
void au_mseq_stop_slow(s32 arg0, s32 arg1);
|
||||
void au_mseq_set_volume(s32 arg0, s32 arg1, s32 arg2);
|
||||
AuResult au_mseq_check_stopped(s32 arg0);
|
||||
void au_mseq_play_sequence(AmbienceManager* arg0, MSEQHeader* mseq, s32 index);
|
||||
void au_mseq_manager_audio_frame_update(AmbienceManager* arg0);
|
||||
void au_mseq_load_track_fade_info(AmbienceManager* manager, AmbiencePlayer* lambda);
|
||||
void au_mseq_player_update(AmbienceManager* manager, AmbiencePlayer* lambda);
|
||||
u8 au_mseq_read_next(AmbiencePlayer* arg0);
|
||||
void au_mseq_player_stop(AmbienceManager* arg0, AmbiencePlayer* arg1);
|
||||
void au_mseq_save_voices(AmbienceManager* arg0, AmbiencePlayer* lambda);
|
||||
void au_mseq_restore_voices(AmbienceManager* manager, AmbiencePlayer* lambda);
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// sfx_player.c
|
||||
|
@ -144,7 +44,7 @@ void au_sfx_try_sound(SoundManager* manager, SoundRequest* request, SoundManager
|
|||
s16 au_sfx_manager_audio_frame_update(SoundManager* manager);
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// 28910_len_5090.c
|
||||
// bgm_player.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
void au_bgm_begin_video_frame(BGMPlayer* player);
|
||||
BGMPlayer* au_bgm_get_player_with_song_name(s32 songString);
|
||||
|
@ -165,11 +65,11 @@ void au_bgm_update_fade(BGMPlayer* player);
|
|||
void au_bgm_update_bus_volumes(BGMPlayer* arg0);
|
||||
s32 au_bgm_player_audio_frame_update(BGMPlayer* player);
|
||||
void au_bgm_player_initialize(BGMPlayer* player);
|
||||
void bgm_clear_custom_note_press(BGMPlayer* player, s32 arg1);
|
||||
void bgm_set_tick_resolution(BGMPlayer* player, s32 sampleRate, s32 divisor);
|
||||
void au_bgm_player_read_segment(BGMPlayer* player);
|
||||
void au_bgm_end_segment_loop(BGMPlayer* player, u32 cmd);
|
||||
void au_bgm_load_subsegment(BGMPlayer* player, u32 cmd);
|
||||
void au_bgm_clear_custom_note_press(BGMPlayer* player, s32 arg1);
|
||||
void au_bgm_set_tick_resolution(BGMPlayer* player, s32 sampleRate, s32 divisor);
|
||||
void au_bgm_player_read_composition(BGMPlayer* player);
|
||||
void au_bgm_end_composition_loop(BGMPlayer* player, u32 cmd);
|
||||
void au_bgm_load_phrase(BGMPlayer* player, u32 cmd);
|
||||
void au_bgm_player_update_stop(BGMPlayer* player);
|
||||
void au_bgm_player_update_playing(BGMPlayer *player);
|
||||
void au_BGMCmd_E0_MasterTempo(BGMPlayer* player, BGMPlayerTrack* track);
|
||||
|
@ -189,8 +89,8 @@ void au_BGMCmd_ED_SubTrackCoarseTune(BGMPlayer* player, BGMPlayerTrack* track);
|
|||
void au_BGMCmd_EE_SubTrackFineTune(BGMPlayer* player, BGMPlayerTrack* track);
|
||||
void au_BGMCmd_EF_SegTrackTune(BGMPlayer* player, BGMPlayerTrack* track);
|
||||
void au_BGMCmd_F0_TrackTremolo(BGMPlayer* player, BGMPlayerTrack* track);
|
||||
void au_BGMCmd_F1_TrackTremoloSpeed(BGMPlayer* player, BGMPlayerTrack* track);
|
||||
void au_BGMCmd_F2_TrackTremoloTime(BGMPlayer* player, BGMPlayerTrack* track);
|
||||
void au_BGMCmd_F1_TrackTremoloRate(BGMPlayer* player, BGMPlayerTrack* track);
|
||||
void au_BGMCmd_F2_TrackTremoloDepth(BGMPlayer* player, BGMPlayerTrack* track);
|
||||
void au_BGMCmd_F3_TrackTremoloStop(BGMPlayer* player, BGMPlayerTrack* track);
|
||||
void au_BGMCmd_F4_SubTrackRandomPan(BGMPlayer* player, BGMPlayerTrack* track);
|
||||
void au_BGMCmd_F5_TrackVoice(BGMPlayer* player, BGMPlayerTrack* track);
|
||||
|
@ -207,16 +107,18 @@ void au_bgm_change_track_volume(BGMPlayer* player, s32 trackIdx, s16 arg2, u8 ar
|
|||
void au_bgm_set_track_volumes(BGMPlayer* player, u8* arg1, s32 arg2);
|
||||
void au_bgm_set_prox_mix_fade(BGMPlayer* player, BGMPlayerTrack* track, s32 target, s32 duration);
|
||||
void au_bgm_reset_all_voices(BGMPlayer* player);
|
||||
AuResult func_80050970(SongUpdateEvent* arg0);
|
||||
AuResult au_bgm_set_linked_tracks(SongUpdateEvent* arg0);
|
||||
|
||||
// 30450.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
// bgm_control.c
|
||||
// ----------------------------------------------------------------------------------
|
||||
/*
|
||||
void func_80055050(ALHeap* heap);
|
||||
void func_80055068(u32 arg0);
|
||||
*/
|
||||
void func_80055110(BGMPlayer* player);
|
||||
void snd_bgm_clear_legacy_commands(BGMPlayer* player);
|
||||
void snd_bgm_enqueue_legacy_command(u32 arg0);
|
||||
/*
|
||||
void func_8005513C(u32 arg0);
|
||||
void snd_start_sound(s32 soundID, u8 volume, u8 pan);
|
||||
void snd_start_sound_with_shift(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
|
||||
void snd_adjust_sound(s32 soundID, u8 volume, u8 pan);
|
||||
|
@ -238,12 +140,12 @@ AuResult snd_ambient_enable(s32 arg0);
|
|||
void snd_ambient_radio_setup(s32 arg0);
|
||||
AuResult snd_ambient_radio_stop(s32 arg0);
|
||||
AuResult snd_ambient_radio_select(s32 arg0);
|
||||
AuResult au_song_load(s32 songID, s32 playerIndex);
|
||||
AuResult au_song_start_default(s32 songName);
|
||||
AuResult au_song_start_variation(s32 songName, s32 variation);
|
||||
AuResult au_song_stop(s32 songName);
|
||||
void au_stop_songs(void);
|
||||
AuResult au_song_is_playing(s32 songName);
|
||||
AuResult snd_song_load(s32 songID, s32 playerIndex);
|
||||
AuResult snd_song_start_default(s32 songName);
|
||||
AuResult snd_song_start_variation(s32 songName, s32 variation);
|
||||
AuResult snd_song_stop(s32 songName);
|
||||
void snd_stop_songs(void);
|
||||
AuResult snd_song_is_playing(s32 songName);
|
||||
AuResult snd_set_song_variation_fade(s32 songName, s32 variation, s32 fadeInTime, s32 startVolume, s32 endVolume);
|
||||
AuResult snd_set_song_default_fade(s32 songName, s32 fadeInTime, s32 startVolume, s32 endVolume);
|
||||
AuResult snd_set_song_variation_fade_time(s32 songName, s32 fadeTime, s32 variation);
|
||||
|
@ -255,28 +157,29 @@ AuResult func_80055BF0(s32 songName);
|
|||
AuResult func_80055C2C(s32 songName);
|
||||
AuResult func_80055C64(s32 songName);
|
||||
AuResult func_80055C94(s32 songName);
|
||||
AuResult snd_set_song_variation(s32 songName, s32 variation);
|
||||
AuResult snd_set_song_linked_mode(s32 songName, s32 mode);
|
||||
*/
|
||||
AuResult snd_song_get_playing_info(s32 songName, BGMHeader** outTrackData, BGMPlayer** outPlayer);
|
||||
/*
|
||||
AuResult snd_song_set_playback_rate(s32 songName, f32 arg1);
|
||||
*/
|
||||
AuResult snd_song_set_detune(s32 songName, s32 arg1);
|
||||
AuResult func_80055DDC(s32 songName, s32 arg1);
|
||||
AuResult snd_song_set_track_volumes(s32 songName, MusicTrackVols arg1);
|
||||
AuResult snd_song_clear_track_volumes(s32 songName, MusicTrackVols arg1);
|
||||
u8* func_80055EB4(MusicTrackVols arg0);
|
||||
static AuResult snd_song_change_track_volume(s32 arg0, u32 arg1, u32 arg2);
|
||||
AuResult snd_song_set_track_vol_mute(s32 arg0, s32 arg1);
|
||||
AuResult snd_song_set_track_vol_quiet(s32 arg0, s32 arg1);
|
||||
AuResult snd_song_set_track_vol_full(s32 arg0, s32 arg1);
|
||||
void bgm_set_proximity_mix_far(s32 songName, s32 mix);
|
||||
void bgm_set_proximity_mix_near(s32 songName, s32 mix);
|
||||
void bgm_set_proximity_mix_full(s32 songName, s32 mix);
|
||||
void bgm_poll_music_events(u32** arg0, s32* arg1);
|
||||
void bgm_flush_music_events(void);
|
||||
void snd_song_set_proximity_mix_far(s32 songName, s32 mix);
|
||||
void snd_song_set_proximity_mix_near(s32 songName, s32 mix);
|
||||
void snd_song_set_proximity_mix_full(s32 songName, s32 mix);
|
||||
/*
|
||||
void snd_song_poll_music_events(u32** arg0, s32* arg1);
|
||||
void snd_song_flush_music_events(void);
|
||||
void music_event_trigger(s32 arg0, s32 arg1, s32 arg2);
|
||||
void func_8005610C(void);
|
||||
*/
|
||||
void au_register_callback(AuCallback arg0, s32 arg1);
|
||||
void snd_register_callback(AuCallback arg0, s32 arg1);
|
||||
/*
|
||||
void snd_set_stereo(void);
|
||||
void snd_set_mono(void);
|
||||
|
@ -287,58 +190,6 @@ void enable_sounds(void);
|
|||
void disable_sounds(void);
|
||||
*/
|
||||
|
||||
// core/syn_driver.c
|
||||
void au_driver_init(AuSynDriver* driver, ALConfig* config);
|
||||
void au_driver_release(void);
|
||||
//Acmd* alAudioFrame(Acmd* cmdList, s32* cmdLen, s16* outBuf, s32 outLen);
|
||||
void au_use_global_volume(void);
|
||||
void au_set_global_volume(s16 arg0);
|
||||
s16 au_get_global_volume(void);
|
||||
void func_80056D5C(b8 arg0);
|
||||
void au_bus_set_volume(u8 busID, u16 value);
|
||||
u16 au_bus_get_volume(u8 busID);
|
||||
void au_bus_set_effect(u8 busID, u8 effectID);
|
||||
void au_bus_set_fx_params(u8 busID, s16 arg1, s16 arg2, s32 arg3);
|
||||
void au_pvoice_set_bus(u8 voiceIdx, s8 busID);
|
||||
void au_syn_stop_voice(u8 voiceIdx);
|
||||
void au_syn_start_voice(u8 index);
|
||||
void au_syn_start_voice_params(u8 index, u8 reverbType, Instrument* table, f32 pitch, s16 vol, u8 pan, u8 fxMix, s32 delta);
|
||||
void au_syn_set_wavetable(u8 voiceIdx, Instrument* table);
|
||||
void au_syn_set_pitch(u8 voiceIdx, f32 pitchRatio);
|
||||
void au_syn_set_mixer_params(u8 voiceIdx, s16 volume, s32 arg2, u8 arg3, u8 arg4);
|
||||
void au_syn_set_pan_fxmix(u8 voiceIdx, u8 arg1, u8 arg2);
|
||||
void au_syn_set_volume_delta(u8 voiceIdx, s16 arg1, s32 arg2);
|
||||
void au_syn_set_pan(u8 voiceIdx, u8 pan);
|
||||
void au_syn_set_fxmix(u8 voiceIdx, u8 dryAmt);
|
||||
s32 au_syn_get_playing(u8 voiceIdx);
|
||||
s32 au_syn_get_bus(u8 voiceIdx);
|
||||
f32 au_syn_get_pitch(u8 voiceIdx);
|
||||
u8 au_syn_get_pan(u8 voiceIdx);
|
||||
s16 au_syn_get_dryamt(u8 voiceIdx);
|
||||
s16 au_syn_get_wetamt(u8 voiceIdx);
|
||||
s32 au_syn_get_volume_left(u8 voiceIdx);
|
||||
s32 au_syn_get_volume_right(u8 voiceIdx);
|
||||
void au_set_delay_time(s32 arg0);
|
||||
void au_delay_left_channel(u8 arg0);
|
||||
void au_delay_right_channel(u8 arg0);
|
||||
void au_disable_channel_delay(void);
|
||||
void au_init_delay_channel(s16 arg0);
|
||||
//void alHeapInit(ALHeap* hp, u8* base, s32 len);
|
||||
//void alCopy(void* src, void* dst, s32 size);
|
||||
#undef alHeapAlloc
|
||||
void* alHeapAlloc(ALHeap* heap, s32 count, s32 size);
|
||||
|
||||
// core/pull_voice.c
|
||||
Acmd* au_pull_voice(AuPVoice* pvoice, Acmd* cmdBufPos);
|
||||
|
||||
// core/reverb.c
|
||||
void au_fx_create(AuFX* fx, u8 mode, ALHeap* heap);
|
||||
void au_filter_create(AuFilter* kappa, ALHeap* heap);
|
||||
void au_filter_init(AuFilter* kappa, s16 arg1, s16 arg2, s16 fc);
|
||||
void au_fx_load_preset(AuFX* fx, u8 effectType);
|
||||
Acmd* au_pull_fx(AuFX* fx, Acmd* cmdBusPos, s16, s16);
|
||||
s32 au_fx_param_hdl(AuFX* fx, s16 index, s16 paramID, s32 value);
|
||||
|
||||
// sfx.c
|
||||
/*
|
||||
void sfx_reset_door_sounds(void);
|
||||
|
@ -354,7 +205,7 @@ SoundInstance* sfx_get_env_sound_instance(s32 soundID);
|
|||
void sfx_play_sound_looping(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
|
||||
void sfx_register_looping_sound_at_position(s32 soundID, s32 flags, f32 x, f32 y, f32 z);
|
||||
s32 sfx_adjust_env_sound_pos(s32 soundID, s32 sourceFlags, f32 x, f32 y, f32 z);
|
||||
void snd_stop_tracking_env_sound_pos(s32 soundID, s32 keepPlaying);
|
||||
void sfx_stop_tracking_env_sound_pos(s32 soundID, s32 keepPlaying);
|
||||
void sfx_play_sound_with_params(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
|
||||
void sfx_adjust_env_sound_params(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
|
||||
void sfx_stop_sound(s32 soundID);
|
||||
|
@ -367,3 +218,5 @@ void sfx_compute_spatialized_sound_params_ignore_depth(f32 x, f32 y, f32 z, s16*
|
|||
void sfx_compute_spatialized_sound_params_with_depth(f32 x, f32 y, f32 z, s16* volume, s16* pan);
|
||||
void sfx_compute_spatialized_sound_params_full(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags);
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
// 30450.c
|
||||
void func_80055050(ALHeap* heap);
|
||||
void func_80055068(u32 arg0);
|
||||
//void func_80055110(BGMPlayer* player);
|
||||
void func_8005513C(u32 arg0);
|
||||
//void snd_bgm_clear_legacy_commands(BGMPlayer* player);
|
||||
//void snd_bgm_enqueue_legacy_command(u32 arg0);
|
||||
void snd_start_sound(s32 soundID, u8 volume, u8 pan);
|
||||
void snd_start_sound_with_shift(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
|
||||
void snd_adjust_sound(s32 soundID, u8 volume, u8 pan);
|
||||
|
@ -27,12 +27,12 @@ AuResult snd_ambient_enable(s32 arg0);
|
|||
void snd_ambient_radio_setup(s32 arg0);
|
||||
AuResult snd_ambient_radio_stop(s32 arg0);
|
||||
AuResult snd_ambient_radio_select(s32 arg0);
|
||||
AuResult au_song_load(s32 songID, s32 playerIndex);
|
||||
AuResult au_song_start_default(s32 songName);
|
||||
AuResult au_song_start_variation(s32 songName, s32 variation);
|
||||
AuResult au_song_stop(s32 songName);
|
||||
void au_stop_songs(void);
|
||||
AuResult au_song_is_playing(s32 songName);
|
||||
AuResult snd_song_load(s32 songID, s32 playerIndex);
|
||||
AuResult snd_song_start_default(s32 songName);
|
||||
AuResult snd_song_start_variation(s32 songName, s32 variation);
|
||||
AuResult snd_song_stop(s32 songName);
|
||||
void snd_stop_songs(void);
|
||||
AuResult snd_song_is_playing(s32 songName);
|
||||
AuResult snd_set_song_variation_fade(s32 songName, s32 variation, s32 fadeInTime, s32 startVolume, s32 endVolume);
|
||||
AuResult snd_set_song_default_fade(s32 songName, s32 fadeInTime, s32 startVolume, s32 endVolume);
|
||||
AuResult snd_set_song_variation_fade_time(s32 songName, s32 fadeTime, s32 variation);
|
||||
|
@ -44,22 +44,24 @@ AuResult func_80055BF0(s32 songName);
|
|||
AuResult func_80055C2C(s32 songName);
|
||||
AuResult func_80055C64(s32 songName);
|
||||
AuResult func_80055C94(s32 songName);
|
||||
AuResult snd_set_song_variation(s32 songName, s32 variation);
|
||||
AuResult snd_set_song_linked_mode(s32 songName, s32 mode);
|
||||
//AuResult snd_song_get_playing_info(s32 songName, BGMHeader** outTrackData, BGMPlayer** outPlayer);
|
||||
AuResult snd_song_set_playback_rate(s32 songName, f32 arg1);
|
||||
/*
|
||||
AuResult snd_song_set_detune(s32 songName, s32 arg1);
|
||||
AuResult snd_song_set_track_volumes(s32 songName, MusicTrackVols arg1);
|
||||
AuResult snd_song_clear_track_volumes(s32 songName, MusicTrackVols arg1);
|
||||
AuResult snd_song_set_track_vol_mute(s32 arg0, s32 arg1);
|
||||
AuResult snd_song_set_track_vol_quiet(s32 arg0, s32 arg1);
|
||||
AuResult snd_song_set_track_vol_full(s32 arg0, s32 arg1);
|
||||
void bgm_set_proximity_mix_far(s32 songName, s32 mix);
|
||||
void bgm_set_proximity_mix_near(s32 songName, s32 mix);
|
||||
void bgm_set_proximity_mix_full(s32 songName, s32 mix);
|
||||
void bgm_poll_music_events(u32** arg0, s32* arg1);
|
||||
void bgm_flush_music_events(void);
|
||||
void bgm_trigger_music_event(s32 arg0, s32 arg1, s32 arg2);
|
||||
void bgm_clear_music_events(void);
|
||||
void snd_song_set_proximity_mix_far(s32 songName, s32 mix);
|
||||
void snd_song_set_proximity_mix_near(s32 songName, s32 mix);
|
||||
void snd_song_set_proximity_mix_full(s32 songName, s32 mix);
|
||||
*/
|
||||
void snd_song_poll_music_events(u32** arg0, s32* arg1);
|
||||
void snd_song_flush_music_events(void);
|
||||
void snd_song_trigger_music_event(s32 arg0, s32 arg1, s32 arg2);
|
||||
void snd_song_clear_music_events(void);
|
||||
//void func_80056144(AuCallback arg0, s32 arg1);
|
||||
void snd_set_stereo(void);
|
||||
void snd_set_mono(void);
|
||||
|
@ -69,6 +71,28 @@ void snd_set_sfx_reverb_type(s32 arg0);
|
|||
void enable_sounds(void);
|
||||
void disable_sounds(void);
|
||||
|
||||
|
||||
enum AuResult bgm_set_track_volumes(s32 playerIndex, s16 trackVolSet);
|
||||
enum AuResult bgm_clear_track_volumes(s32 playerIndex, s16 trackVolSet);
|
||||
enum AuResult bgm_set_linked_mode(s32 playerIndex, s16 mode);
|
||||
void bgm_quiet_max_volume(void);
|
||||
void bgm_reset_max_volume(void);
|
||||
void bgm_reset_volume(void);
|
||||
s32 bgm_init_music_players(void);
|
||||
s32 bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume);
|
||||
void bgm_set_battle_song(s32, s32);
|
||||
void bgm_push_battle_song(void);
|
||||
s32 bgm_adjust_proximity(s32 playerIndex, s32 arg1, s16 arg2);
|
||||
void func_801491E4(Matrix4f mtx, s32, s32, s32, s32, s32 alpha);
|
||||
s32 bgm_fade_in_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s16 arg4, s16 arg5);
|
||||
|
||||
void bgm_update_music_settings(void);
|
||||
b32 bgm_is_any_song_playing(void);
|
||||
void bgm_reset_sequence_players(void);
|
||||
void bgm_pop_song(void);
|
||||
void bgm_push_song(s32 songID, s32 variation);
|
||||
void bgm_pop_battle_song(void);
|
||||
|
||||
// sfx.h
|
||||
void sfx_reset_door_sounds(void);
|
||||
void sfx_clear_sounds(void);
|
||||
|
@ -81,7 +105,7 @@ void sfx_stop_env_sounds(void);
|
|||
void sfx_play_sound_looping(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
|
||||
void sfx_register_looping_sound_at_position(s32 soundID, s32 flags, f32 x, f32 y, f32 z);
|
||||
s32 sfx_adjust_env_sound_pos(s32 soundID, s32 sourceFlags, f32 x, f32 y, f32 z);
|
||||
void snd_stop_tracking_env_sound_pos(s32 soundID, s32 keepPlaying);
|
||||
void sfx_stop_tracking_env_sound_pos(s32 soundID, s32 keepPlaying);
|
||||
void sfx_play_sound_with_params(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
|
||||
void sfx_adjust_env_sound_params(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
|
||||
void sfx_stop_sound(s32 soundID);
|
||||
|
|
|
@ -444,7 +444,7 @@ s32 sfx_adjust_env_sound_pos(s32 soundID, s32 sourceFlags, f32 x, f32 y, f32 z)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void snd_stop_tracking_env_sound_pos(s32 soundID, s32 keepPlaying) {
|
||||
void sfx_stop_tracking_env_sound_pos(s32 soundID, s32 keepPlaying) {
|
||||
SoundInstance* sound = sfx_get_env_sound_instance(soundID);
|
||||
|
||||
if (sound != NULL) {
|
||||
|
@ -506,7 +506,7 @@ void sfx_stop_sound(s32 soundID) {
|
|||
s32 sound = soundID;
|
||||
|
||||
if (sound & SOUND_ID_TYPE_FLAG) {
|
||||
snd_stop_tracking_env_sound_pos(LoopingSounds[sound & 0xFFFF], FALSE);
|
||||
sfx_stop_tracking_env_sound_pos(LoopingSounds[sound & 0xFFFF], FALSE);
|
||||
} else {
|
||||
snd_stop_sound(sound);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "common.h"
|
||||
#include "audio.h"
|
||||
#include "audio/core.h"
|
||||
|
||||
static void au_sfx_play_sound(SoundManager* manager, SoundPlayer* player, s8* readPos, SoundRequest* request, s32 priority, s32 exclusiveID);
|
||||
static void au_sfx_set_triggers(SoundManager* manager, u32 soundID);
|
||||
|
@ -11,7 +11,7 @@ static void au_sfx_set_player_modifiers(SoundPlayer* player, SoundRequest* reque
|
|||
static void au_sfx_update_basic(SoundManager* manager, SoundPlayer* player, AuVoice* arg2, u8 arg3);
|
||||
static s16 au_sfx_get_scaled_volume(SoundManager* manager, SoundPlayer* player);
|
||||
static void au_sfx_update_sequence(SoundManager* manager, SoundPlayer* player, AuVoice* arg2, u8 arg3);
|
||||
static void snd_set_voice_volume(AuVoice* voice, SoundManager* manager, SoundPlayer* player);
|
||||
static void au_sfx_set_voice_volume(AuVoice* voice, SoundManager* manager, SoundPlayer* player);
|
||||
static u8 au_sfx_get_random_pan(s32 arg0, s32 arg1, s32 arg2);
|
||||
static s32 au_sfx_get_random_pitch(s32 arg0, s32 arg1, s32 arg2);
|
||||
static u8 au_sfx_get_random_vol(s32 arg0, s32 arg1, s32 arg2);
|
||||
|
@ -252,8 +252,8 @@ void (*SeqCmdHandlers[])(BGMPlayer*, BGMPlayerTrack*) = {
|
|||
au_BGMCmd_EE_SubTrackFineTune,
|
||||
au_BGMCmd_EF_SegTrackTune,
|
||||
au_BGMCmd_F0_TrackTremolo,
|
||||
au_BGMCmd_F1_TrackTremoloSpeed,
|
||||
au_BGMCmd_F2_TrackTremoloTime,
|
||||
au_BGMCmd_F1_TrackTremoloRate,
|
||||
au_BGMCmd_F2_TrackTremoloDepth,
|
||||
au_BGMCmd_F3_TrackTremoloStop,
|
||||
au_BGMCmd_F4_SubTrackRandomPan,
|
||||
au_BGMCmd_F5_TrackVoice,
|
||||
|
@ -1357,7 +1357,7 @@ static void au_sfx_update_sequence(SoundManager* manager, SoundPlayer* player, A
|
|||
}
|
||||
|
||||
voice->reverb = player->reverb;
|
||||
snd_set_voice_volume(voice, manager, player);
|
||||
au_sfx_set_voice_volume(voice, manager, player);
|
||||
if (player->envelopCustomPressProfile == NULL) {
|
||||
voice->envelope.cmdListPress = player->envelope.cmdListPress;
|
||||
voice->envelope.cmdListRelease = player->envelope.cmdListRelease;
|
||||
|
@ -1419,7 +1419,7 @@ static void au_sfx_update_sequence(SoundManager* manager, SoundPlayer* player, A
|
|||
}
|
||||
}
|
||||
if (player->changed.volume && voice->priority == manager->priority) {
|
||||
snd_set_voice_volume(voice, manager, player);
|
||||
au_sfx_set_voice_volume(voice, manager, player);
|
||||
voice->envelopeFlags |= AU_VOICE_ENV_FLAG_VOL_CHANGED;
|
||||
}
|
||||
if (player->changed.tune) {
|
||||
|
@ -1441,7 +1441,7 @@ static void au_sfx_update_sequence(SoundManager* manager, SoundPlayer* player, A
|
|||
player->changed.all = 0;
|
||||
}
|
||||
|
||||
static void snd_set_voice_volume(AuVoice* voice, SoundManager* manager, SoundPlayer* player) {
|
||||
static void au_sfx_set_voice_volume(AuVoice* voice, SoundManager* manager, SoundPlayer* player) {
|
||||
s32 x = ((((manager->baseVolume
|
||||
* player->sfxVolume) >> 0xF)
|
||||
* player->playVelocity) >> 7)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "common.h"
|
||||
#include "audio.h"
|
||||
#include "audio/core.h"
|
||||
|
||||
static u8* snd_song_get_track_volumes_set(MusicTrackVols arg0);
|
||||
|
||||
|
@ -105,6 +106,9 @@ void func_80055050(ALHeap* heap) {
|
|||
PreventBGMPlayerUpdate = FALSE;
|
||||
}
|
||||
|
||||
/// Unused
|
||||
/// Seems to be an early function that accepts a command to play any kind of audio asset,
|
||||
// but only BGM and SFX are supported.
|
||||
void func_80055068(u32 arg0) {
|
||||
u16 temp_a0 = D_80078DB4;
|
||||
u32 temp_v1 = arg0 & 0xF;
|
||||
|
@ -119,10 +123,10 @@ void func_80055068(u32 arg0) {
|
|||
break;
|
||||
case 1:
|
||||
if (temp_v1 == 1) {
|
||||
s32 filename = au_song_load((arg0 >> 4) & 0xFF, 0);
|
||||
s32 filename = snd_song_load((arg0 >> 4) & 0xFF, 0);
|
||||
|
||||
if (filename > ASCII_TO_U32('0', ' ', ' ', '\0')) {
|
||||
au_song_start_variation(filename, (arg0 >> 0xC) & 3);
|
||||
snd_song_start_variation(filename, (arg0 >> 0xC) & 3);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -130,53 +134,58 @@ void func_80055068(u32 arg0) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80055110(BGMPlayer* player) {
|
||||
/// Part of an unused system for inter-thread communication with a BGM player using commands.
|
||||
/// Use functions in bgm_control to manipualte gMusicSettings instead.
|
||||
void snd_bgm_clear_legacy_commands(BGMPlayer* player) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(player->unk_238); i++) {
|
||||
player->unk_238[i] = 0;
|
||||
for (i = 0; i < ARRAY_COUNT(player->cmdBufData); i++) {
|
||||
player->cmdBufData[i] = 0;
|
||||
}
|
||||
|
||||
player->unk_25B = 0;
|
||||
player->unk_25A = 0;
|
||||
player->unk_259 = 0;
|
||||
player->unk_258 = 0;
|
||||
player->cmdBufOverflows = 0;
|
||||
player->cmdBufWritePos = 0;
|
||||
player->cmdBufReadPos = 0;
|
||||
player->cmdBufPending = 0;
|
||||
}
|
||||
|
||||
void func_8005513C(u32 arg0) {
|
||||
/// Unused
|
||||
/// Part of an unused system for inter-thread communication with a BGM player using commands.
|
||||
/// Use functions in bgm_control to manipualte gMusicSettings instead.
|
||||
void snd_bgm_enqueue_legacy_command(u32 cmd) {
|
||||
BGMPlayer* player = NULL;
|
||||
u32 playerSwitch = arg0 & 0xF;
|
||||
u32 playerID = cmd & 0xF;
|
||||
|
||||
if (playerSwitch != 0) {
|
||||
if (playerSwitch == 1) {
|
||||
player = gBGMPlayerA;
|
||||
} else if (playerSwitch == 2) {
|
||||
player = gBGMPlayerB;
|
||||
}
|
||||
if (playerID == 0) {
|
||||
return;
|
||||
} else if (playerID == 1) {
|
||||
player = gBGMPlayerA;
|
||||
} else if (playerID == 2) {
|
||||
player = gBGMPlayerB;
|
||||
}
|
||||
|
||||
if (player != NULL) {
|
||||
u32 temp;
|
||||
if (player != NULL) {
|
||||
u32 pos;
|
||||
|
||||
if (player->unk_258 < 8) {
|
||||
temp = player->unk_25A;
|
||||
if (player->cmdBufPending < ARRAY_COUNT(player->cmdBufData)) {
|
||||
pos = player->cmdBufWritePos;
|
||||
|
||||
player->unk_238[temp] = arg0 >> 4;
|
||||
player->cmdBufData[pos] = cmd >> 4;
|
||||
|
||||
temp++;
|
||||
if (temp >= 8) {
|
||||
temp = 0;
|
||||
}
|
||||
player->unk_25A = temp;
|
||||
|
||||
player->unk_258++;
|
||||
} else {
|
||||
temp = player->unk_25B + 1;
|
||||
|
||||
if (temp > 99) {
|
||||
temp = 99;
|
||||
}
|
||||
player->unk_25B = temp;
|
||||
pos++;
|
||||
if (pos >= 8) {
|
||||
pos = 0;
|
||||
}
|
||||
player->cmdBufWritePos = pos;
|
||||
|
||||
player->cmdBufPending++;
|
||||
} else {
|
||||
pos = player->cmdBufOverflows + 1;
|
||||
|
||||
if (pos > 99) {
|
||||
pos = 99;
|
||||
}
|
||||
player->cmdBufOverflows = pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -274,99 +283,99 @@ AuResult snd_load_ambient(s32 ambSoundID) {
|
|||
}
|
||||
|
||||
AuResult snd_ambient_play(s32 index, s32 fadeInTime) {
|
||||
AuResult status = au_amb_check_player_index(index);
|
||||
AuResult status = au_mseq_check_player_index(index);
|
||||
|
||||
if (status != AU_RESULT_OK) {
|
||||
return status;
|
||||
}
|
||||
return au_amb_start(index, fadeInTime);
|
||||
return au_mseq_start(index, fadeInTime);
|
||||
}
|
||||
|
||||
AuResult snd_ambient_stop_quick(s32 index) {
|
||||
AuResult status = au_amb_check_player_index(index);
|
||||
AuResult status = au_mseq_check_player_index(index);
|
||||
|
||||
if (status == AU_RESULT_OK) {
|
||||
au_amb_stop_quick(index);
|
||||
au_mseq_stop_quick(index);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
AuResult snd_ambient_stop_slow(s32 index, s32 fadeOutTime) {
|
||||
AuResult status = au_amb_check_player_index(index);
|
||||
AuResult status = au_mseq_check_player_index(index);
|
||||
|
||||
if (status == AU_RESULT_OK) {
|
||||
au_amb_stop_slow(index, fadeOutTime);
|
||||
au_mseq_stop_slow(index, fadeOutTime);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
AuResult snd_ambient_pause(s32 index, s32 fadeOutTime) {
|
||||
AuResult status = au_amb_check_player_index(index);
|
||||
AuResult status = au_mseq_check_player_index(index);
|
||||
|
||||
if (status == AU_RESULT_OK) {
|
||||
au_amb_pause(index, fadeOutTime);
|
||||
au_mseq_pause(index, fadeOutTime);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
AuResult snd_ambient_resume(s32 index, s32 fadeInTime) {
|
||||
AuResult status = au_amb_check_player_index(index);
|
||||
AuResult status = au_mseq_check_player_index(index);
|
||||
|
||||
if (status == AU_RESULT_OK) {
|
||||
au_amb_resume(index, fadeInTime);
|
||||
au_mseq_resume(index, fadeInTime);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
AuResult snd_ambient_is_stopped(s32 index) {
|
||||
AuResult status = au_amb_check_player_index(index);
|
||||
AuResult status = au_mseq_check_player_index(index);
|
||||
|
||||
if (status != AU_RESULT_OK) {
|
||||
return status;
|
||||
}
|
||||
return au_amb_check_stopped(index);
|
||||
return au_mseq_check_stopped(index);
|
||||
}
|
||||
|
||||
// TODO perhaps inaccurate name
|
||||
AuResult snd_ambient_mute(s32 index, s32 arg1) {
|
||||
AuResult status = au_amb_check_player_index(index);
|
||||
AuResult status = au_mseq_check_player_index(index);
|
||||
|
||||
if (status == AU_RESULT_OK) {
|
||||
au_amb_load_tracks_fade(index, arg1);
|
||||
au_mseq_load_tracks_fade(index, arg1);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
AuResult snd_ambient_set_volume(s32 index, s32 time, s32 volume) {
|
||||
AuResult status = au_amb_check_player_index(index);
|
||||
AuResult status = au_mseq_check_player_index(index);
|
||||
|
||||
if (status == AU_RESULT_OK) {
|
||||
au_amb_set_volume(index, time, volume);
|
||||
au_mseq_set_volume(index, time, volume);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
AuResult snd_ambient_disable(s32 index) {
|
||||
AuResult status = au_amb_check_player_index(index);
|
||||
AuResult status = au_mseq_check_player_index(index);
|
||||
|
||||
if (status == AU_RESULT_OK) {
|
||||
au_amb_set_disabled(index, TRUE);
|
||||
au_mseq_set_disabled(index, TRUE);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
AuResult snd_ambient_enable(s32 index) {
|
||||
AuResult status = au_amb_check_player_index(index);
|
||||
AuResult status = au_mseq_check_player_index(index);
|
||||
|
||||
if (status == AU_RESULT_OK) {
|
||||
au_amb_set_disabled(index, FALSE);
|
||||
au_mseq_set_disabled(index, FALSE);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
@ -432,7 +441,7 @@ AuResult snd_ambient_radio_select(s32 index) {
|
|||
return status;
|
||||
}
|
||||
|
||||
AuResult au_song_load(s32 songID, s32 playerIndex) {
|
||||
AuResult snd_song_load(s32 songID, s32 playerIndex) {
|
||||
BGMHeader* bgmFile;
|
||||
BGMPlayer* player;
|
||||
|
||||
|
@ -445,7 +454,7 @@ AuResult au_song_load(s32 songID, s32 playerIndex) {
|
|||
}
|
||||
}
|
||||
|
||||
AuResult au_song_start_default(s32 songName) {
|
||||
AuResult snd_song_start_default(s32 songName) {
|
||||
AuResult status;
|
||||
SongUpdateEvent s;
|
||||
|
||||
|
@ -462,7 +471,7 @@ AuResult au_song_start_default(s32 songName) {
|
|||
return status;
|
||||
}
|
||||
|
||||
AuResult au_song_start_variation(s32 songName, s32 variation) {
|
||||
AuResult snd_song_start_variation(s32 songName, s32 variation) {
|
||||
AuResult status;
|
||||
SongUpdateEvent s;
|
||||
|
||||
|
@ -479,15 +488,15 @@ AuResult au_song_start_variation(s32 songName, s32 variation) {
|
|||
return status;
|
||||
}
|
||||
|
||||
AuResult au_song_stop(s32 songName) {
|
||||
AuResult snd_song_stop(s32 songName) {
|
||||
return au_bgm_stop_song(songName);
|
||||
}
|
||||
|
||||
void au_stop_songs(void) {
|
||||
void snd_stop_songs(void) {
|
||||
au_bgm_stop_all();
|
||||
}
|
||||
|
||||
AuResult au_song_is_playing(s32 songName) {
|
||||
AuResult snd_song_is_playing(s32 songName) {
|
||||
return au_bgm_is_song_playing(songName);
|
||||
}
|
||||
|
||||
|
@ -624,11 +633,11 @@ AuResult func_80055C94(s32 songName) {
|
|||
return func_8004E0F4(&s);
|
||||
}
|
||||
|
||||
AuResult snd_set_song_variation(s32 songName, s32 variation) {
|
||||
AuResult snd_set_song_linked_mode(s32 songName, s32 mode) {
|
||||
SongUpdateEvent s;
|
||||
s.songName = songName;
|
||||
s.variation = variation;
|
||||
return func_80050970(&s);
|
||||
s.variation = mode;
|
||||
return au_bgm_set_linked_tracks(&s);
|
||||
}
|
||||
|
||||
// get file and player information for a given song name if it's currently playing
|
||||
|
@ -785,39 +794,39 @@ AuResult snd_song_set_track_vol_full(s32 songName, s32 trackIdx) {
|
|||
return snd_song_change_track_volume(songName, trackIdx, AU_MAX_VOLUME_8);
|
||||
}
|
||||
|
||||
void bgm_set_proximity_mix_far(s32 songName, s32 mix) {
|
||||
void snd_song_set_proximity_mix_far(s32 songName, s32 mix) {
|
||||
au_bgm_set_proximity_mix(songName, (u8)mix);
|
||||
}
|
||||
|
||||
void bgm_set_proximity_mix_near(s32 songName, s32 mix) {
|
||||
void snd_song_set_proximity_mix_near(s32 songName, s32 mix) {
|
||||
au_bgm_set_proximity_mix(songName, (u8)mix | ((s32)(0.69f * AU_MAX_VOLUME_8) << 0x18));
|
||||
}
|
||||
|
||||
void bgm_set_proximity_mix_full(s32 songName, s32 mix) {
|
||||
void snd_song_set_proximity_mix_full(s32 songName, s32 mix) {
|
||||
au_bgm_set_proximity_mix(songName, (u8)mix | (AU_MAX_VOLUME_8 << 0x18));
|
||||
}
|
||||
|
||||
void bgm_poll_music_events(MusicEventTrigger** musicEvents, s32* count) {
|
||||
void snd_song_poll_music_events(MusicEventTrigger** musicEvents, s32* count) {
|
||||
AuGlobals* globals = gSoundGlobals;
|
||||
|
||||
*musicEvents = globals->musicEventQueue;
|
||||
*count = globals->musicEventQueueCount;
|
||||
}
|
||||
|
||||
void bgm_flush_music_events(void) {
|
||||
void snd_song_flush_music_events(void) {
|
||||
gSoundGlobals->flushMusicEventQueue = TRUE;
|
||||
}
|
||||
|
||||
void bgm_trigger_music_event(s32 playerID, s32 trackIndex, s32 eventInfo) {
|
||||
void snd_song_trigger_music_event(s32 playerID, s32 trackIndex, s32 eventInfo) {
|
||||
AuGlobals* globals = gSoundGlobals;
|
||||
|
||||
if (globals->musicEventQueueCount < 16) {
|
||||
if (globals->musicEventQueueCount < MUS_QUEUE_SIZE) {
|
||||
*globals->musicEventQueuePos++ = ((playerID << 0x1C) + ((trackIndex & 0xF) << 0x18) + eventInfo);
|
||||
globals->musicEventQueueCount++;
|
||||
}
|
||||
}
|
||||
|
||||
void bgm_clear_music_events(void) {
|
||||
void snd_song_clear_music_events(void) {
|
||||
AuGlobals* globals = gSoundGlobals;
|
||||
s32* buf = globals->musicEventQueue;
|
||||
s32 i = 15;
|
||||
|
@ -831,7 +840,7 @@ void bgm_clear_music_events(void) {
|
|||
globals->musicEventQueuePos = globals->musicEventQueue;
|
||||
}
|
||||
|
||||
void au_register_callback(AuCallback func, s32 index) {
|
||||
void snd_register_callback(AuCallback func, s32 index) {
|
||||
gSoundGlobals->audioThreadCallbacks[index] = func;
|
||||
}
|
||||
|
||||
|
@ -846,15 +855,15 @@ void snd_set_mono(void) {
|
|||
}
|
||||
|
||||
void snd_set_bgm_volume(VolumeLevels volume) {
|
||||
au_unk_80054CE0(AUDIO_TYPE_BGM, volume);
|
||||
au_set_bus_volume_level(AUDIO_TYPE_BGM, volume);
|
||||
}
|
||||
|
||||
void snd_set_sfx_volume(VolumeLevels volume) {
|
||||
au_unk_80054CE0(AUDIO_TYPE_SFX, volume);
|
||||
au_set_bus_volume_level(AUDIO_TYPE_SFX, volume);
|
||||
}
|
||||
|
||||
void snd_set_sfx_reverb_type(s32 reverbType) {
|
||||
au_unk_80054D74(AUDIO_TYPE_SFX, reverbType);
|
||||
au_set_reverb_type(AUDIO_TYPE_SFX, reverbType);
|
||||
}
|
||||
|
||||
void enable_sounds(void) {
|
|
@ -1,5 +1,6 @@
|
|||
#include "common.h"
|
||||
#include "audio.h"
|
||||
#include "audio/public.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "ld_addrs.h"
|
||||
#include "effects.h"
|
||||
|
|
|
@ -401,10 +401,10 @@ API_CALLABLE(N(ProcessPeachStarBeam)) {
|
|||
script->functionTemp[FT_DELAY]--;
|
||||
if (script->functionTemp[FT_DELAY] == 0) {
|
||||
if (!script->functionTemp[FT_IS_PEACH_BEAM]) {
|
||||
snd_stop_tracking_env_sound_pos(SOUND_LRAW_USE_STAR_BEAM, TRUE);
|
||||
sfx_stop_tracking_env_sound_pos(SOUND_LRAW_USE_STAR_BEAM, TRUE);
|
||||
sfx_play_sound(SOUND_LRAW_USE_STAR_BEAM | SOUND_ID_TRIGGER_CHANGE_SOUND);
|
||||
} else {
|
||||
snd_stop_tracking_env_sound_pos(SOUND_LRAW_USE_PEACH_BEAM, TRUE);
|
||||
sfx_stop_tracking_env_sound_pos(SOUND_LRAW_USE_PEACH_BEAM, TRUE);
|
||||
sfx_play_sound(SOUND_LRAW_USE_PEACH_BEAM | SOUND_ID_TRIGGER_CHANGE_SOUND);
|
||||
}
|
||||
}
|
||||
|
@ -444,9 +444,9 @@ API_CALLABLE(N(ProcessPeachStarBeam)) {
|
|||
}
|
||||
|
||||
if (!script->functionTemp[FT_IS_PEACH_BEAM]) {
|
||||
snd_stop_tracking_env_sound_pos(SOUND_LRAW_USE_STAR_BEAM, FALSE);
|
||||
sfx_stop_tracking_env_sound_pos(SOUND_LRAW_USE_STAR_BEAM, FALSE);
|
||||
} else {
|
||||
snd_stop_tracking_env_sound_pos(SOUND_LRAW_USE_PEACH_BEAM, FALSE);
|
||||
sfx_stop_tracking_env_sound_pos(SOUND_LRAW_USE_PEACH_BEAM, FALSE);
|
||||
}
|
||||
script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_SPIRITS_SCATTER;
|
||||
break;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "common.h"
|
||||
#include "audio.h"
|
||||
#include "audio/public.h"
|
||||
#include "effects.h"
|
||||
#include "hud_element.h"
|
||||
#include "message_ids.h"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "audio.h"
|
||||
#include "audio/public.h"
|
||||
#include "npc.h"
|
||||
#include "effects.h"
|
||||
#include "hud_element.h"
|
||||
|
@ -519,7 +521,7 @@ void update_encounters_neutral(void) {
|
|||
}
|
||||
} while (0);
|
||||
|
||||
currentEncounter->songID = -1;
|
||||
currentEncounter->songID = AU_SONG_NONE;
|
||||
currentEncounter->unk_18 = -1;
|
||||
currentEncounter->hitType = 0;
|
||||
currentEncounter->forbidFleeing = FALSE;
|
||||
|
@ -1365,7 +1367,7 @@ void update_encounters_pre_battle(void) {
|
|||
}
|
||||
|
||||
// start battle music
|
||||
if (currentEncounter->songID < 0) {
|
||||
if (currentEncounter->songID <= AU_SONG_NONE) {
|
||||
switch (currentEncounter->firstStrikeType) {
|
||||
case FIRST_STRIKE_NONE:
|
||||
bgm_set_battle_song(SONG_NORMAL_BATTLE, FIRST_STRIKE_NONE);
|
||||
|
@ -1378,7 +1380,7 @@ void update_encounters_pre_battle(void) {
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
bgm_set_battle_song(currentEncounter->songID, FIRST_STRIKE_NONE);
|
||||
bgm_set_battle_song(currentEncounter->songID, BGM_VARIATION_0);
|
||||
}
|
||||
bgm_push_battle_song();
|
||||
HasPreBattleSongPushed = TRUE;
|
||||
|
|
|
@ -144,7 +144,7 @@ void func_802BB314_E2DC44(Entity* entity) {
|
|||
|
||||
void func_802BB34C_E2DC7C(void) {
|
||||
sfx_play_sound(SOUND_LRAW_SPINNING_FLOWER | SOUND_ID_TRIGGER_CHANGE_SOUND);
|
||||
snd_stop_tracking_env_sound_pos(SOUND_LRAW_SPINNING_FLOWER, TRUE);
|
||||
sfx_stop_tracking_env_sound_pos(SOUND_LRAW_SPINNING_FLOWER, TRUE);
|
||||
}
|
||||
|
||||
void entity_PinkFlowerLight_setupGfx(s32 entityIndex) {
|
||||
|
|
|
@ -21,7 +21,7 @@ API_CALLABLE(PollMusicEvents) {
|
|||
u32 count;
|
||||
s32 i;
|
||||
|
||||
bgm_poll_music_events(&list, &count);
|
||||
snd_song_poll_music_events(&list, &count);
|
||||
|
||||
for (i = 0; i < count; i++, list++) {
|
||||
MusicEvent* cur = MusicEventList;
|
||||
|
@ -47,7 +47,7 @@ API_CALLABLE(PollMusicEvents) {
|
|||
}
|
||||
}
|
||||
}
|
||||
bgm_flush_music_events();
|
||||
snd_song_flush_music_events();
|
||||
MusicEventPollCount++;
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ API_CALLABLE(FadeInMusic) {
|
|||
s16 fadeStartVolume = evt_get_variable(script, *args++);
|
||||
s16 fadeEndVolume = evt_get_variable(script, *args++);
|
||||
|
||||
if (func_8014A964(musicPlayer, songID, variation, fadeTime, fadeStartVolume, fadeEndVolume)) {
|
||||
if (bgm_fade_in_song(musicPlayer, songID, variation, fadeTime, fadeStartVolume, fadeEndVolume)) {
|
||||
return ApiStatus_DONE2;
|
||||
} else {
|
||||
return ApiStatus_BLOCK;
|
||||
|
@ -232,7 +232,7 @@ API_CALLABLE(StopTrackingSoundPos) {
|
|||
Bytecode* args = script->ptrReadPos;
|
||||
s32 soundID = evt_get_variable(script, *args++);
|
||||
|
||||
snd_stop_tracking_env_sound_pos(soundID, TRUE);
|
||||
sfx_stop_tracking_env_sound_pos(soundID, TRUE);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
#include "audio/public.h"
|
||||
#include "ld_addrs.h"
|
||||
#include "hud_element.h"
|
||||
#include "sprite.h"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "common.h"
|
||||
#include "audio.h"
|
||||
#include "audio/public.h"
|
||||
#include "ld_addrs.h"
|
||||
#include "nu/nusys.h"
|
||||
#include "camera.h"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "common.h"
|
||||
#include "ld_addrs.h"
|
||||
#include "audio/public.h"
|
||||
#include "npc.h"
|
||||
#include "nu/nusys.h"
|
||||
#include "hud_element.h"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "common.h"
|
||||
#include "hud_element.h"
|
||||
#include "audio/public.h"
|
||||
#include "fio.h"
|
||||
#include "sprite.h"
|
||||
#include "game_modes.h"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "common.h"
|
||||
#include "audio.h"
|
||||
#include "audio/public.h"
|
||||
#include "nu/nusys.h"
|
||||
#include "hud_element.h"
|
||||
#include "sprite.h"
|
||||
|
|
|
@ -22,13 +22,13 @@ MapSettings N(settings) = {
|
|||
|
||||
#include "world/common/todo/SpawnSunEffect.inc.c"
|
||||
|
||||
API_CALLABLE(N(StartOasisSongVariation)) {
|
||||
bgm_set_variation(0, 1);
|
||||
API_CALLABLE(N(StartOasisTracks)) {
|
||||
bgm_set_linked_mode(0, 1);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(StopOasisSongVariation)) {
|
||||
bgm_set_variation(0, 0);
|
||||
API_CALLABLE(N(StopOasisTracks)) {
|
||||
bgm_set_linked_mode(0, 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ EvtScript N(EVS_ExitWalk_sbk_55_1) = {
|
|||
SetGroup(EVT_GROUP_EXIT_MAP)
|
||||
Call(UseExitHeading, 60, sbk_56_ENTRY_0)
|
||||
Exec(ExitWalk)
|
||||
Call(N(StopOasisSongVariation))
|
||||
Call(N(StopOasisTracks))
|
||||
Call(GotoMap, Ref("sbk_55"), sbk_55_ENTRY_1)
|
||||
Wait(100)
|
||||
Return
|
||||
|
@ -47,7 +47,7 @@ EvtScript N(EVS_ExitWalk_sbk_46_3) = {
|
|||
SetGroup(EVT_GROUP_EXIT_MAP)
|
||||
Call(UseExitHeading, 60, sbk_56_ENTRY_2)
|
||||
Exec(ExitWalk)
|
||||
Call(N(StopOasisSongVariation))
|
||||
Call(N(StopOasisTracks))
|
||||
Call(GotoMap, Ref("sbk_46"), sbk_46_ENTRY_3)
|
||||
Wait(100)
|
||||
Return
|
||||
|
@ -58,7 +58,7 @@ EvtScript N(EVS_ExitWalk_sbk_66_2) = {
|
|||
SetGroup(EVT_GROUP_EXIT_MAP)
|
||||
Call(UseExitHeading, 60, sbk_56_ENTRY_3)
|
||||
Exec(ExitWalk)
|
||||
Call(N(StopOasisSongVariation))
|
||||
Call(N(StopOasisTracks))
|
||||
Call(GotoMap, Ref("sbk_66"), sbk_66_ENTRY_2)
|
||||
Wait(100)
|
||||
Return
|
||||
|
@ -100,7 +100,7 @@ EvtScript N(EVS_Main) = {
|
|||
Exec(N(EVS_TexPan_Water))
|
||||
Call(MakeTransformGroup, MODEL_sui)
|
||||
Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, VOL_LEVEL_8)
|
||||
Call(N(StartOasisSongVariation))
|
||||
Call(N(StartOasisTracks))
|
||||
Call(PlaySound, SOUND_LOOP_SBK_OASIS_WATER)
|
||||
Set(LVar0, Ref(N(EVS_BindExitTriggers)))
|
||||
Exec(EnterWalk)
|
||||
|
|
|
@ -91,7 +91,7 @@ segments:
|
|||
- [auto, c, audio/core/voice]
|
||||
- [auto, c, audio/core/engine]
|
||||
- [auto, c, audio/load_banks]
|
||||
- [auto, c, audio/30450]
|
||||
- [auto, c, audio/snd_interface]
|
||||
- [auto, c, audio/core/syn_driver]
|
||||
- [auto, c, audio/core/pull_voice]
|
||||
- [auto, c, audio/core/tables]
|
||||
|
@ -795,7 +795,7 @@ segments:
|
|||
- [auto, c, windows]
|
||||
- [auto, c, sprite_shading]
|
||||
- [auto, c, audio/sfx]
|
||||
- [auto, c, audio/e0b30_len_b80]
|
||||
- [auto, c, audio/bgm_control]
|
||||
- [auto, c, bss/engine2_post_bss]
|
||||
- start: 0xE1D60
|
||||
type: .data
|
||||
|
|
|
@ -97,7 +97,7 @@ segments:
|
|||
- [auto, c, audio/core/voice]
|
||||
- [auto, c, audio/core/engine]
|
||||
- [auto, c, audio/load_banks]
|
||||
- [auto, c, audio/30450]
|
||||
- [auto, c, audio/snd_interface]
|
||||
- [auto, c, audio/core/syn_driver]
|
||||
- [auto, c, audio/core/pull_voice]
|
||||
- [auto, c, audio/core/tables] # data only
|
||||
|
@ -808,7 +808,7 @@ segments:
|
|||
- [auto, c, windows]
|
||||
- [auto, c, sprite_shading]
|
||||
- [auto, c, audio/sfx]
|
||||
- [auto, c, audio/e0b30_len_b80]
|
||||
- [auto, c, audio/bgm_control]
|
||||
- [auto, c, bss/engine2_post_bss]
|
||||
- start: 0xE6620
|
||||
type: .data
|
||||
|
|
|
@ -928,7 +928,7 @@ func_800EF3D4 = 0x800EF368; // type:func rom:0x88818
|
|||
fx_damage_stars = 0x80070170; // type:func rom:0x4B570
|
||||
enable_status_bar_input = 0x800E97DC; // type:func rom:0x82C8C
|
||||
fx_shiny_flare = 0x80072150; // type:func rom:0x4D550
|
||||
bgm_flush_music_events = 0x80055D58; // type:func rom:0x31158
|
||||
snd_song_flush_music_events = 0x80055D58; // type:func rom:0x31158
|
||||
set_npc_yaw = 0x8003B000; // type:func rom:0x16400
|
||||
fx_effect_46 = 0x800712B0; // type:func rom:0x4C6B0
|
||||
fx_music_note = 0x800706B0; // type:func rom:0x4BAB0
|
||||
|
@ -963,7 +963,7 @@ fx_moving_cloud = 0x800723F0; // type:func rom:0x4D7F0
|
|||
create_worker_scene = 0x80128368; // type:func rom:0xBD1F8
|
||||
fx_bulb_glow = 0x80070EF0; // type:func rom:0x4C2F0
|
||||
fx_blast = 0x80070FB0; // type:func rom:0x4C3B0
|
||||
bgm_poll_music_events = 0x80055D3C; // type:func rom:0x3113C
|
||||
snd_song_poll_music_events = 0x80055D3C; // type:func rom:0x3113C
|
||||
fx_recover = 0x80071070; // type:func rom:0x4C470
|
||||
fx_smoke_ring = 0x80070110; // type:func rom:0x4B510
|
||||
move_player = 0x800E2758; // type:func rom:0x7BC08
|
||||
|
@ -1997,28 +1997,28 @@ entity_Signpost_idle = 0x802E4000; // type:func rom:0x10A8E0
|
|||
Entity_Signpost_Script = 0x802E5F60; // rom:0x10C840
|
||||
Entity_Signpost_RenderScript = 0x802E5F70; // rom:0x10C850
|
||||
Entity_Signpost = 0x802E5F8C; // rom:0x10C86C
|
||||
au_song_stop = 0x80055674; // type:func rom:0x30A74
|
||||
au_song_load = 0x80055584; // type:func rom:0x30984
|
||||
snd_song_stop = 0x80055674; // type:func rom:0x30A74
|
||||
snd_song_load = 0x80055584; // type:func rom:0x30984
|
||||
snd_set_song_variation_fade_time = 0x8005576C; // type:func rom:0x30B6C
|
||||
func_80055B80 = 0x80055830; // type:func rom:0x30C30
|
||||
snd_ambient_stop_slow = 0x80055198; // type:func rom:0x30598
|
||||
world_action_sneaky_parasol_ROM_END = 0x00E343B0;
|
||||
bgm_set_proximity_mix_full = 0x80055D18; // type:func rom:0x31118
|
||||
snd_song_set_proximity_mix_full = 0x80055D18; // type:func rom:0x31118
|
||||
load_asset_by_name = 0x8005A9A0; // type:func rom:0x35DA0
|
||||
guRotateRPYF = 0x800642A0; // type:func rom:0x3F6A0
|
||||
gCurrentDisplayContextIndex = 0x800741D4; // rom:0x4F5D4
|
||||
func_800E06C0 = 0x800E06A0; // type:func rom:0x79B50
|
||||
snd_set_song_variation_fade = 0x800556C8; // type:func rom:0x30AC8
|
||||
gItemIconPaletteOffsets = 0x8008E91C; // rom:0x69D1C
|
||||
bgm_set_proximity_mix_near = 0x80055CF4; // type:func rom:0x310F4
|
||||
snd_song_set_proximity_mix_near = 0x80055CF4; // type:func rom:0x310F4
|
||||
gItemEntityScripts = 0x8008DDA4; // rom:0x691A4
|
||||
npc_raycast_down_sides = 0x800DCB5C; // type:func rom:0x7600C
|
||||
test_ray_entities = 0x8005D0F8; // type:func rom:0x384F8
|
||||
snd_set_song_variation = 0x80055974; // type:func rom:0x30D74
|
||||
snd_set_song_linked_mode = 0x80055974; // type:func rom:0x30D74
|
||||
mem_clear = 0x800295C0; // type:func rom:0x49C0
|
||||
nuGfxCfbNum = 0x800773D0; // rom:0x527D0
|
||||
int_to_string = 0x80029484; // type:func rom:0x4884
|
||||
au_song_is_playing = 0x800556AC; // type:func rom:0x30AAC
|
||||
snd_song_is_playing = 0x800556AC; // type:func rom:0x30AAC
|
||||
SparkleScript_Coin = 0x80104C50; // rom:0x9E100
|
||||
gAreas = 0x800934C0; // rom:0x6E8C0
|
||||
npc_test_move_complex_with_slipping = 0x800DDD74; // type:func rom:0x77224
|
||||
|
@ -2039,13 +2039,13 @@ snd_ambient_pause = 0x800551EC; // type:func rom:0x305EC
|
|||
general_heap_free = 0x8002AC38; // type:func rom:0x6038
|
||||
CreateEntityVarArgBuffer = 0x80161750;
|
||||
gCurrentModels = 0x8015632C;
|
||||
au_song_start_variation = 0x80055620; // type:func rom:0x30A20
|
||||
snd_song_start_variation = 0x80055620; // type:func rom:0x30A20
|
||||
snd_song_set_track_volumes = 0x80055A8C; // type:func rom:0x30E8C
|
||||
gWindows = 0x8015ECD0;
|
||||
gPlayerStatusPtr = 0x800F7CC0; // rom:0x91170
|
||||
guOrtho = 0x80063A10; // type:func rom:0x3EE10
|
||||
guScale = 0x800676E0; // type:func rom:0x42AE0
|
||||
bgm_set_proximity_mix_far = 0x80055CD8; // type:func rom:0x310D8
|
||||
snd_song_set_proximity_mix_far = 0x80055CD8; // type:func rom:0x310D8
|
||||
func_80055BB8 = 0x80055868; // type:func rom:0x30C68
|
||||
_heap_malloc = 0x8002902C; // type:func rom:0x442C
|
||||
gItemIconRasterOffsets = 0x8008E3A8; // rom:0x697A8
|
||||
|
@ -2476,7 +2476,7 @@ sfx_get_env_sound_instance = 0x8014E974; // type:func rom:0xE3804
|
|||
sfx_play_sound_looping = 0x8014E9B8; // type:func rom:0xE3848
|
||||
sfx_register_looping_sound_at_position = 0x8014EA24; // type:func rom:0xE38B4
|
||||
sfx_adjust_env_sound_pos = 0x8014EA9C; // type:func rom:0xE392C
|
||||
snd_stop_tracking_env_sound_pos = 0x8014EB1C; // type:func rom:0xE39AC
|
||||
sfx_stop_tracking_env_sound_pos = 0x8014EB1C; // type:func rom:0xE39AC
|
||||
sfx_adjust_env_sound_params = 0x8014EC94; // type:func rom:0xE3B24
|
||||
sfx_play_sound_at_npc = 0x8014EDB8; // type:func rom:0xE3C48
|
||||
sfx_compute_spatialized_sound_params_ignore_depth = 0x8014F008; // type:func rom:0xE3E98
|
||||
|
@ -2489,11 +2489,11 @@ bgm_reset_volume = 0x8014F5DC; // type:func rom:0xE446C
|
|||
bgm_set_target_volume = 0x8014FD34; // type:func rom:0xE4BC4
|
||||
bgm_update_volume = 0x8014FD44; // type:func rom:0xE4BD4
|
||||
_bgm_set_song = 0x8014F890; // type:func rom:0xE4720
|
||||
func_8014A964 = 0x8014FA14; // type:func rom:0xE48A4
|
||||
bgm_fade_in_song = 0x8014FA14; // type:func rom:0xE48A4
|
||||
bgm_adjust_proximity = 0x8014FB04; // type:func rom:0xE4994
|
||||
bgm_set_track_volumes = 0x8014FBBC; // type:func rom:0xE4A4C
|
||||
bgm_clear_track_volumes = 0x8014FC10; // type:func rom:0xE4AA0
|
||||
bgm_set_variation = 0x8014FC64; // type:func rom:0xE4AF4
|
||||
bgm_set_linked_mode = 0x8014FC64; // type:func rom:0xE4AF4
|
||||
bgm_init_music_players = 0x8014FCB8; // type:func rom:0xE4B48
|
||||
bgm_quiet_max_volume = 0x8014FD0C; // type:func rom:0xE4B9C
|
||||
bgm_reset_max_volume = 0x8014FD20; // type:func rom:0xE4BB0
|
||||
|
|
|
@ -97,7 +97,7 @@ segments:
|
|||
- [auto, c, audio/core/voice]
|
||||
- [auto, c, audio/core/engine]
|
||||
- [auto, c, audio/load_banks]
|
||||
- [auto, c, audio/30450]
|
||||
- [auto, c, audio/snd_interface]
|
||||
- [auto, c, audio/core/syn_driver]
|
||||
- [auto, c, audio/core/pull_voice]
|
||||
- [auto, c, audio/core/tables]
|
||||
|
@ -874,7 +874,7 @@ segments:
|
|||
- [auto, c, windows]
|
||||
- [auto, c, sprite_shading]
|
||||
- [auto, c, audio/sfx]
|
||||
- [auto, c, audio/e0b30_len_b80]
|
||||
- [auto, c, audio/bgm_control]
|
||||
- [auto, c, bss/engine2_post_bss]
|
||||
- start: 0xE1610
|
||||
type: .data
|
||||
|
|
|
@ -140,7 +140,7 @@ segments:
|
|||
- [auto, c, audio/core/voice]
|
||||
- [auto, c, audio/core/engine]
|
||||
- [auto, c, audio/load_banks]
|
||||
- [auto, c, audio/30450]
|
||||
- [auto, c, audio/snd_interface]
|
||||
- [auto, c, audio/core/syn_driver]
|
||||
- [auto, c, audio/core/pull_voice]
|
||||
- [auto, c, audio/core/tables]
|
||||
|
@ -841,7 +841,7 @@ segments:
|
|||
- [auto, c, windows]
|
||||
- [auto, c, sprite_shading]
|
||||
- [auto, c, audio/sfx]
|
||||
- [auto, c, audio/e0b30_len_b80]
|
||||
- [auto, c, audio/bgm_control]
|
||||
- [auto, c, bss/engine2_post_bss]
|
||||
- start: 0xE2DF0
|
||||
type: .data
|
||||
|
|
|
@ -515,7 +515,7 @@ au_sfx_manager_audio_frame_update = 0x8004C444; // type:func rom:0x27844
|
|||
au_sfx_update_basic = 0x8004C578; // type:func rom:0x27978
|
||||
au_sfx_get_scaled_volume = 0x8004C844; // type:func rom:0x27C44
|
||||
au_sfx_update_sequence = 0x8004C884; // type:func rom:0x27C84
|
||||
snd_set_voice_volume = 0x8004CD94; // type:func rom:0x28194
|
||||
au_sfx_set_voice_volume = 0x8004CD94; // type:func rom:0x28194
|
||||
func_8004CDF8 = 0x8004CDF8; // type:func rom:0x281F8
|
||||
au_SEFCmd_00_SetVolume = 0x8004CE70; // type:func rom:0x28270
|
||||
au_SEFCmd_01_SetPan = 0x8004CEA4; // type:func rom:0x282A4
|
||||
|
@ -567,13 +567,13 @@ au_bgm_player_audio_frame_update = 0x8004E4B8; // type:func rom:0x298B8
|
|||
au_bgm_player_initialize = 0x8004E5D8; // type:func rom:0x299D8
|
||||
bgm_clear_custom_note_press = 0x8004E844; // type:func rom:0x29C44
|
||||
bgm_set_tick_resolution = 0x8004E880; // type:func rom:0x29C80
|
||||
au_bgm_player_read_segment = 0x8004E904; // type:func rom:0x29D04
|
||||
au_bgm_end_segment_loop = 0x8004EA34; // type:func rom:0x29E34
|
||||
au_bgm_load_subsegment = 0x8004EAD4; // type:func rom:0x29ED4
|
||||
au_bgm_player_read_composition = 0x8004E904; // type:func rom:0x29D04
|
||||
au_bgm_end_composition_loop = 0x8004EA34; // type:func rom:0x29E34
|
||||
au_bgm_load_phrase = 0x8004EAD4; // type:func rom:0x29ED4
|
||||
au_bgm_player_update_stop = 0x8004EC04; // type:func rom:0x2A004
|
||||
au_bgm_player_update_playing = 0x8004EC68; // type:func rom:0x2A068
|
||||
au_BGMCmd_E0_MasterTempo = 0x8004FBBC; // type:func rom:0x2AFBC
|
||||
snd_bpm_to_tempo = 0x8004FC08; // type:func rom:0x2B008
|
||||
au_bgm_bpm_to_tempo = 0x8004FC08; // type:func rom:0x2B008
|
||||
au_BGMCmd_E1_MasterVolume = 0x8004FCB4; // type:func rom:0x2B0B4
|
||||
au_BGMCmd_E2_MasterPitchShift = 0x8004FCE4; // type:func rom:0x2B0E4
|
||||
au_BGMCmd_E3 = 0x8004FD04; // type:func rom:0x2B104
|
||||
|
@ -590,8 +590,8 @@ au_BGMCmd_ED_SubTrackCoarseTune = 0x8004FF88; // type:func rom:0x2B388
|
|||
au_BGMCmd_EE_SubTrackFineTune = 0x8004FFA8; // type:func rom:0x2B3A8
|
||||
au_BGMCmd_EF_SegTrackTune = 0x8004FFB4; // type:func rom:0x2B3B4
|
||||
au_BGMCmd_F0_TrackTremolo = 0x8004FFC8; // type:func rom:0x2B3C8
|
||||
au_BGMCmd_F1_TrackTremoloSpeed = 0x8004FFE4; // type:func rom:0x2B3E4
|
||||
au_BGMCmd_F2_TrackTremoloTime = 0x8004FFF0; // type:func rom:0x2B3F0
|
||||
au_BGMCmd_F1_TrackTremoloRate = 0x8004FFE4; // type:func rom:0x2B3E4
|
||||
au_BGMCmd_F2_TrackTremoloDepth = 0x8004FFF0; // type:func rom:0x2B3F0
|
||||
au_BGMCmd_F3_TrackTremoloStop = 0x8004FFFC; // type:func rom:0x2B3FC
|
||||
au_BGMCmd_F4_SubTrackRandomPan = 0x80050004; // type:func rom:0x2B404
|
||||
au_BGMCmd_F5_TrackVoice = 0x80050020; // type:func rom:0x2B420
|
||||
|
@ -612,7 +612,7 @@ au_bgm_change_track_volume = 0x8005083C; // type:func rom:0x2BC3C
|
|||
func_8005087C = 0x8005087C; // type:func rom:0x2BC7C
|
||||
au_bgm_set_prox_mix_fade = 0x80050888; // type:func rom:0x2BC88
|
||||
au_bgm_reset_all_voices = 0x80050900; // type:func rom:0x2BD00
|
||||
func_80050970 = 0x80050970; // type:func rom:0x2BD70
|
||||
au_bgm_set_linked_tracks = 0x80050970; // type:func rom:0x2BD70
|
||||
au_amb_manager_init = 0x80050B90; // type:func rom:0x2BF90
|
||||
au_amb_check_player_index = 0x80050C30; // type:func rom:0x2C030
|
||||
au_amb_load_tracks_fade = 0x80050C54; // type:func rom:0x2C054
|
||||
|
@ -672,15 +672,15 @@ au_load_INIT = 0x800542BC; // type:func rom:0x2F6BC
|
|||
au_fetch_SBN_file = 0x8005447C; // type:func rom:0x2F87C
|
||||
au_load_PER = 0x800544F8; // type:func rom:0x2F8F8
|
||||
au_load_PRG = 0x800545B4; // type:func rom:0x2F9B4
|
||||
snd_load_BGM = 0x8005465C; // type:func rom:0x2FA5C
|
||||
au_load_BGM = 0x8005465C; // type:func rom:0x2FA5C
|
||||
au_get_BK_instruments = 0x80054744; // type:func rom:0x2FB44
|
||||
au_load_BK_to_bank = 0x800547C8; // type:func rom:0x2FBC8
|
||||
au_swizzle_BK_instruments = 0x800549F8; // type:func rom:0x2FDF8
|
||||
au_load_static_BK_to_bank = 0x80054AA0; // type:func rom:0x2FEA0
|
||||
snd_load_BK = 0x80054C4C; // type:func rom:0x3004C
|
||||
func_80054C84 = 0x80054C84; // type:func rom:0x30084
|
||||
au_unk_80054CE0 = 0x80054CE0; // type:func rom:0x300E0
|
||||
au_unk_80054D74 = 0x80054D74; // type:func rom:0x30174
|
||||
au_set_bus_volume_level = 0x80054CE0; // type:func rom:0x300E0
|
||||
au_set_reverb_type = 0x80054D74; // type:func rom:0x30174
|
||||
au_unk_80054DA8 = 0x80054DA8; // type:func rom:0x301A8
|
||||
au_read_rom = 0x80054E00; // type:func rom:0x30200
|
||||
au_memset = 0x80054E90; // type:func rom:0x30290
|
||||
|
@ -689,8 +689,8 @@ au_copy_words = 0x80054F74; // type:func rom:0x30374
|
|||
au_load_BK_headers = 0x80054FC0; // type:func rom:0x303C0
|
||||
func_80055050 = 0x80055050; // type:func rom:0x30450
|
||||
func_80055068 = 0x80055068; // type:func rom:0x30468
|
||||
func_80055110 = 0x80055110; // type:func rom:0x30510
|
||||
func_8005513C = 0x8005513C; // type:func rom:0x3053C
|
||||
snd_bgm_clear_legacy_commands = 0x80055110; // type:func rom:0x30510
|
||||
snd_bgm_enqueue_legacy_command = 0x8005513C; // type:func rom:0x3053C
|
||||
snd_start_sound = 0x800551E0; // type:func rom:0x305E0
|
||||
snd_start_sound_with_shift = 0x80055240; // type:func rom:0x30640
|
||||
snd_adjust_sound = 0x800552D0; // type:func rom:0x306D0
|
||||
|
@ -712,12 +712,12 @@ snd_ambient_enable = 0x80055718; // type:func rom:0x30B18
|
|||
snd_ambient_radio_setup = 0x80055760; // type:func rom:0x30B60
|
||||
snd_ambient_radio_stop = 0x800557CC; // type:func rom:0x30BCC
|
||||
snd_ambient_radio_select = 0x80055848; // type:func rom:0x30C48
|
||||
au_song_load = 0x800558D4; // type:func rom:0x30CD4
|
||||
au_song_start_default = 0x8005591C; // type:func rom:0x30D1C
|
||||
au_song_start_variation = 0x80055970; // type:func rom:0x30D70
|
||||
au_song_stop = 0x800559C4; // type:func rom:0x30DC4
|
||||
au_stop_songs = 0x800559E0; // type:func rom:0x30DE0
|
||||
au_song_is_playing = 0x800559FC; // type:func rom:0x30DFC
|
||||
snd_song_load = 0x800558D4; // type:func rom:0x30CD4
|
||||
snd_song_start_default = 0x8005591C; // type:func rom:0x30D1C
|
||||
snd_song_start_variation = 0x80055970; // type:func rom:0x30D70
|
||||
snd_song_stop = 0x800559C4; // type:func rom:0x30DC4
|
||||
snd_stop_songs = 0x800559E0; // type:func rom:0x30DE0
|
||||
snd_song_is_playing = 0x800559FC; // type:func rom:0x30DFC
|
||||
snd_set_song_variation_fade = 0x80055A18; // type:func rom:0x30E18
|
||||
snd_set_song_default_fade = 0x80055A6C; // type:func rom:0x30E6C
|
||||
snd_set_song_variation_fade_time = 0x80055ABC; // type:func rom:0x30EBC
|
||||
|
@ -729,7 +729,7 @@ func_80055BF0 = 0x80055BF0; // type:func rom:0x30FF0
|
|||
func_80055C2C = 0x80055C2C; // type:func rom:0x3102C
|
||||
func_80055C64 = 0x80055C64; // type:func rom:0x31064
|
||||
func_80055C94 = 0x80055C94; // type:func rom:0x31094
|
||||
snd_set_song_variation = 0x80055CC4; // type:func rom:0x310C4
|
||||
snd_set_song_linked_mode = 0x80055CC4; // type:func rom:0x310C4
|
||||
snd_song_get_playing_info = 0x80055CE8; // type:func rom:0x310E8
|
||||
snd_song_set_playback_rate = 0x80055D38; // type:func rom:0x31138
|
||||
snd_song_set_detune = 0x80055D8C; // type:func rom:0x3118C
|
||||
|
@ -740,11 +740,11 @@ snd_song_change_track_volume = 0x80055F58; // type:func rom:0x31358
|
|||
snd_song_set_track_vol_mute = 0x80055FD4; // type:func rom:0x313D4
|
||||
snd_song_set_track_vol_quiet = 0x80055FF0; // type:func rom:0x313F0
|
||||
snd_song_set_track_vol_full = 0x8005600C; // type:func rom:0x3140C
|
||||
bgm_set_proximity_mix_far = 0x80056028; // type:func rom:0x31428
|
||||
bgm_set_proximity_mix_near = 0x80056044; // type:func rom:0x31444
|
||||
bgm_set_proximity_mix_full = 0x80056068; // type:func rom:0x31468
|
||||
bgm_poll_music_events = 0x8005608C; // type:func rom:0x3148C
|
||||
bgm_flush_music_events = 0x800560A8; // type:func rom:0x314A8
|
||||
snd_song_set_proximity_mix_far = 0x80056028; // type:func rom:0x31428
|
||||
snd_song_set_proximity_mix_near = 0x80056044; // type:func rom:0x31444
|
||||
snd_song_set_proximity_mix_full = 0x80056068; // type:func rom:0x31468
|
||||
snd_song_poll_music_events = 0x8005608C; // type:func rom:0x3148C
|
||||
snd_song_flush_music_events = 0x800560A8; // type:func rom:0x314A8
|
||||
music_event_trigger = 0x800560BC; // type:func rom:0x314BC
|
||||
func_8005610C = 0x8005610C; // type:func rom:0x3150C
|
||||
func_80056144 = 0x80056144; // type:func rom:0x31544
|
||||
|
@ -4412,7 +4412,7 @@ sfx_get_env_sound_instance = 0x801498C4; // type:func rom:0xDFFC4
|
|||
sfx_play_sound_looping = 0x80149908; // type:func rom:0xE0008
|
||||
sfx_register_looping_sound_at_position = 0x80149974; // type:func rom:0xE0074
|
||||
sfx_adjust_env_sound_pos = 0x801499EC; // type:func rom:0xE00EC
|
||||
snd_stop_tracking_env_sound_pos = 0x80149A6C; // type:func rom:0xE016C
|
||||
sfx_stop_tracking_env_sound_pos = 0x80149A6C; // type:func rom:0xE016C
|
||||
sfx_play_sound_with_params = 0x80149AB8; // type:func rom:0xE01B8
|
||||
sfx_adjust_env_sound_params = 0x80149BE4; // type:func rom:0xE02E4
|
||||
sfx_stop_sound = 0x80149C6C; // type:func rom:0xE036C
|
||||
|
@ -4429,11 +4429,11 @@ bgm_reset_volume = 0x8014A52C; // type:func rom:0xE0C2C
|
|||
bgm_update_music_settings = 0x8014A548; // type:func rom:0xE0C48
|
||||
_bgm_set_song = 0x8014A7E0; // type:func rom:0xE0EE0
|
||||
bgm_set_song = 0x8014A918; // type:func rom:0xE1018
|
||||
func_8014A964 = 0x8014A964; // type:func rom:0xE1064
|
||||
bgm_fade_in_song = 0x8014A964; // type:func rom:0xE1064
|
||||
bgm_adjust_proximity = 0x8014AA54; // type:func rom:0xE1154
|
||||
bgm_set_track_volumes = 0x8014AB0C; // type:func rom:0xE120C
|
||||
bgm_clear_track_volumes = 0x8014AB60; // type:func rom:0xE1260
|
||||
bgm_set_variation = 0x8014ABB4; // type:func rom:0xE12B4
|
||||
bgm_set_linked_mode = 0x8014ABB4; // type:func rom:0xE12B4
|
||||
bgm_init_music_players = 0x8014AC08; // type:func rom:0xE1308
|
||||
bgm_quiet_max_volume = 0x8014AC5C; // type:func rom:0xE135C
|
||||
bgm_reset_max_volume = 0x8014AC70; // type:func rom:0xE1370
|
||||
|
@ -16734,8 +16734,8 @@ sbk_55_SetInstigatorValue_3 = 0x80240040; // type:func rom:0x952A90
|
|||
sbk_55_foliage_setup_shear_mtx = 0x80240060; // type:func rom:0x952AB0
|
||||
sbk_55_TransformFoliage = 0x802400D0; // type:func rom:0x952B20
|
||||
sbk_56_SpawnSunEffect = 0x80240000; // type:func rom:0x953FC0
|
||||
sbk_56_StartOasisSongVariation = 0x80240038; // type:func rom:0x953FF8
|
||||
sbk_56_StopOasisSongVariation = 0x8024005C; // type:func rom:0x95401C
|
||||
sbk_56_StartOasisTracks = 0x80240038; // type:func rom:0x953FF8
|
||||
sbk_56_StopOasisTracks = 0x8024005C; // type:func rom:0x95401C
|
||||
sbk_56_SuperBlock_SetOverride40 = 0x80240080; // type:func rom:0x954040
|
||||
sbk_56_SuperBlock_ClearOverride40 = 0x8024009C; // type:func rom:0x95405C
|
||||
sbk_56_SuperBlock_HideBlockContent = 0x802400BC; // type:func rom:0x95407C
|
||||
|
|
Loading…
Reference in New Issue