Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
30450.c
Go to the documentation of this file.
1#include "common.h"
2#include "audio.h"
3
4static u8* snd_song_get_track_volumes_set(MusicTrackVols arg0);
5
7u16 D_80078DB4 = 0;
9
10// lists of data:
11// u8 trackIdx
12// u8 volume?
13// repeated until idx = 0
14u8 D_80078DB8[] = {
15 2, 94,
16 3, 80,
17 4, 100,
18 5, 84,
19 0
20};
21u8 D_80078DC4[] = {
22 2, 100,
23 3, 110,
24 4, 90,
25 0
26};
27u8 D_80078DCC[] = {
28 2, 95,
29 0
30};
31u8 D_80078DD0[] = {
32 5, 70,
33 6, 90,
34 7, 90,
35 8, 100,
36 0
37};
38// used in kpa_60-63
40 5, 0,
41 6, 0,
42 7, 0,
43 8, 0,
44 9, 0,
45 10, 0,
46 11, 0,
47 12, 0,
48 13, 0,
49 14, 0,
50 15, 0,
51 16, 0,
52 0
53};
54// starting areas, only basic instrumentation
56 5, 100,
57 6, 102,
58 7, 88,
59 8, 110,
60 9, 0,
61 10, 0,
62 11, 0,
63 12, 0,
64 13, 0,
65 14, 0,
66 15, 0,
67 16, 0,
68 0
69};
70// middle areas
72 5, 100,
73 6, 102,
74 7, 88,
75 8, 110,
76 9, 126,
77 10, 88,
78 11, 100,
79 12, 0,
80 13, 0,
81 14, 0,
82 15, 0,
83 16, 0,
84 0
85};
86// final areas, full instrumentation
88 5, 100,
89 6, 102,
90 7, 88,
91 8, 110,
92 9, 126,
93 10, 88,
94 11, 100,
95 12, 100,
96 13, 106,
97 14, 100,
98 15, 100,
99 16, 110,
100 0
101};
102
103void func_80055050(ALHeap* heap) {
104 D_80078DB4 = 1;
106}
107
108void func_80055068(u32 arg0) {
109 u16 temp_a0 = D_80078DB4;
110 u32 temp_v1 = arg0 & 0xF;
111
112 if (temp_a0 == 1) {
113 switch (temp_v1) {
114 case 2:
115 case 3:
116 break;
117 case 4:
118 snd_start_sound_with_shift(arg0 >> 4, 0, 0, 0);
119 break;
120 case 1:
121 if (temp_v1 == 1) {
122 s32 filename = au_song_load((arg0 >> 4) & 0xFF, 0);
123
124 if (filename > ASCII_TO_U32('0', ' ', ' ', '\0')) {
125 au_song_start_variation(filename, (arg0 >> 0xC) & 3);
126 }
127 }
128 break;
129 }
130 }
131}
132
134 s32 i;
135
136 for (i = 0; i < ARRAY_COUNT(player->unk_238); i++) {
137 player->unk_238[i] = 0;
138 }
139
140 player->unk_25B = 0;
141 player->unk_25A = 0;
142 player->unk_259 = 0;
143 player->unk_258 = 0;
144}
145
146void func_8005513C(u32 arg0) {
147 BGMPlayer* player = NULL;
148 u32 playerSwitch = arg0 & 0xF;
149
150 if (playerSwitch != 0) {
151 if (playerSwitch == 1) {
152 player = gBGMPlayerA;
153 } else if (playerSwitch == 2) {
154 player = gBGMPlayerB;
155 }
156
157 if (player != NULL) {
158 u32 temp;
159
160 if (player->unk_258 < 8) {
161 temp = player->unk_25A;
162
163 player->unk_238[temp] = arg0 >> 4;
164
165 temp++;
166 if (temp >= 8) {
167 temp = 0;
168 }
169 player->unk_25A = temp;
170
171 player->unk_258++;
172 } else {
173 temp = player->unk_25B + 1;
174
175 if (temp > 99) {
176 temp = 99;
177 }
178 player->unk_25B = temp;
179 }
180 }
181 }
182}
183
184void snd_start_sound(s32 soundID, u8 volume, u8 pan) {
185 SoundManager* soundManager = gSoundManager;
186 s16 vol = volume << 8;
187
188 if (vol != 0) {
189 vol |= 0xFF;
190 }
191
192 if (pan > 0x7F) {
193 pan = 0x7F;
194 }
195
196 au_sfx_enqueue_event(soundManager, soundID, vol, 0, pan);
197}
198
199void snd_start_sound_with_shift(s32 soundID, u8 volume, u8 pan, s16 pitchShift) {
200 SoundManager* soundManager = gSoundManager;
201 s16 vol = volume << 8;
202
203 if (vol != 0) {
204 vol |= 0xFF;
205 }
206
207 if (pan > 0x7F) {
208 pan = 0x7F;
209 }
210
211 if (pitchShift > 2400) {
212 pitchShift = 2400;
213 } else if (pitchShift < -2400) {
214 pitchShift = -2400;
215 }
216
217 au_sfx_enqueue_event(soundManager, soundID, vol, pitchShift, pan);
218}
219
220void snd_adjust_sound(s32 soundID, u8 volume, u8 pan) {
221 SoundManager* soundManager = gSoundManager;
222 s16 vol = volume << 8;
223
224 if (vol != 0) {
225 vol |= 0xFF;
226 }
227
228 if (pan > 0x7F) {
229 pan = 0x7F;
230 }
231
232 au_sfx_enqueue_event(soundManager, soundID | SOUND_ID_ADJUST, vol, 0, pan);
233}
234
235void snd_adjust_sound_with_shift(s32 soundID, u8 volume, u8 pan, s16 pitchShift) {
236 SoundManager* soundManager = gSoundManager;
237 s16 vol = volume << 8;
238
239 if (vol != 0) {
240 vol |= 0xFF;
241 }
242
243 if (pan > 0x7F) {
244 pan = 0x7F;
245 }
246
247 if (pitchShift > 2400) {
248 pitchShift = 2400;
249 } else if (pitchShift < -2400) {
250 pitchShift = -2400;
251 }
252
253 au_sfx_enqueue_event(soundManager, soundID | SOUND_ID_ADJUST, vol, pitchShift, pan);
254}
255
256void snd_stop_sound(s32 soundID) {
257 SoundManager* soundManager = gSoundManager;
258
259 au_sfx_enqueue_event(soundManager, soundID | SOUND_ID_STOP, 0, 0, 0);
260}
261
262void snd_reset(void) {
264}
265
266void snd_start_sound_raw(s32 soundID, s16 volume, s16 pitchShift, s32 pan) {
267 SoundManager* soundManager = gSoundManager;
268
269 au_sfx_enqueue_event(soundManager, soundID, volume, pitchShift, pan);
270}
271
272AuResult snd_load_ambient(s32 ambSoundID) {
273 return au_ambient_load(ambSoundID);
274}
275
276AuResult snd_ambient_play(s32 index, s32 fadeInTime) {
277 AuResult status = au_amb_check_player_index(index);
278
279 if (status != AU_RESULT_OK) {
280 return status;
281 }
282 return au_amb_start(index, fadeInTime);
283}
284
286 AuResult status = au_amb_check_player_index(index);
287
288 if (status == AU_RESULT_OK) {
289 au_amb_stop_quick(index);
290 }
291
292 return status;
293}
294
295AuResult snd_ambient_stop_slow(s32 index, s32 fadeOutTime) {
296 AuResult status = au_amb_check_player_index(index);
297
298 if (status == AU_RESULT_OK) {
299 au_amb_stop_slow(index, fadeOutTime);
300 }
301
302 return status;
303}
304
305AuResult snd_ambient_pause(s32 index, s32 fadeOutTime) {
306 AuResult status = au_amb_check_player_index(index);
307
308 if (status == AU_RESULT_OK) {
309 au_amb_pause(index, fadeOutTime);
310 }
311
312 return status;
313}
314
315AuResult snd_ambient_resume(s32 index, s32 fadeInTime) {
316 AuResult status = au_amb_check_player_index(index);
317
318 if (status == AU_RESULT_OK) {
319 au_amb_resume(index, fadeInTime);
320 }
321
322 return status;
323}
324
326 AuResult status = au_amb_check_player_index(index);
327
328 if (status != AU_RESULT_OK) {
329 return status;
330 }
331 return au_amb_is_stopped(index);
332}
333
334// TODO perhaps inaccurate name
335AuResult snd_ambient_mute(s32 index, s32 arg1) {
336 AuResult status = au_amb_check_player_index(index);
337
338 if (status == AU_RESULT_OK) {
339 au_amb_load_tracks_fade(index, arg1);
340 }
341
342 return status;
343}
344
345AuResult snd_ambient_set_volume(s32 index, s32 time, s32 volume) {
346 AuResult status = au_amb_check_player_index(index);
347
348 if (status == AU_RESULT_OK) {
349 au_amb_set_volume(index, time, volume);
350 }
351
352 return status;
353}
354
356 AuResult status = au_amb_check_player_index(index);
357
358 if (status == AU_RESULT_OK) {
359 au_amb_set_disabled(index, TRUE);
360 }
361
362 return status;
363}
364
366 AuResult status = au_amb_check_player_index(index);
367
368 if (status == AU_RESULT_OK) {
369 au_amb_set_disabled(index, FALSE);
370 }
371
372 return status;
373}
374
375// snd_ambient_init_tracks ?
376void snd_ambient_80055760(s32 index) {
377 u32 i;
378 s32 lim = 4;
379
381
382 for (i = 0; i < lim; i++) {
383 if (snd_ambient_play(i, 0) != AU_RESULT_OK) {
384 return;
385 }
386 }
387
389}
390
392 AuResult status = AU_RESULT_OK;
393 s32 lim = 4;
394 u32 i;
395
396 for (i = 0; i < lim; i++) {
397 if (i == AuAmbiencePlayOnlyIndex) {
398 status = snd_ambient_stop_slow(i, time);
399 } else {
400 status = snd_ambient_stop_quick(i);
401 }
402 if (status != AU_RESULT_OK) {
403 break;
404 }
405 }
406 return status;
407}
408
410 AuResult status = AU_RESULT_OK;
411 s32 lim = 4;
412
413 if (index != AuAmbiencePlayOnlyIndex) {
414 u32 i;
415
416 for (i = 0; i < lim; i++) {
417 if (i == index) {
418 status = snd_ambient_enable(i);
419 } else {
420 status = snd_ambient_disable(i); // mute
421 }
422
423 if (status != AU_RESULT_OK) {
424 break;
425 }
426 }
427
428 if (status == AU_RESULT_OK) {
430 }
431 }
432
433 return status;
434}
435
436AuResult au_song_load(s32 songID, s32 playerIndex) {
437 BGMHeader* bgmFile;
438 BGMPlayer* player;
439
440 au_get_bgm_player_and_file(playerIndex, &bgmFile, &player);
441
442 if (bgmFile != NULL) {
443 return au_load_song_files(songID, bgmFile, player);
444 } else {
446 }
447}
448
449AuResult au_song_start(s32 songName) {
450 AuResult status;
452
454 s.songName = songName;
455 s.duration = 0;
456 s.startVolume = 127;
457 s.finalVolume = 127;
458 s.variation = 0;
459 s.unk14 = 0;
460 status = au_bgm_dispatch_player_event(&s);
462
463 return status;
464}
465
466AuResult au_song_start_variation(s32 songName, s32 variation) {
467 AuResult status;
469
471 s.songName = songName;
472 s.duration = 0;
473 s.startVolume = 127;
474 s.finalVolume = 127;
475 s.variation = variation;
476 s.unk14 = 0;
477 status = au_bgm_dispatch_player_event(&s);
479
480 return status;
481}
482
483AuResult au_song_stop(s32 songName) {
484 return au_bgm_stop_song(songName);
485}
486
487void au_stop_songs(void) {
489}
490
492 return au_bgm_is_song_playing(songName);
493}
494
495AuResult snd_set_song_variation_fade(s32 songName, s32 variation, s32 fadeInTime, s32 startVolume, s32 endVolume) {
496 AuResult status;
498
500 s.songName = songName;
501 s.duration = fadeInTime;
502 s.startVolume = startVolume;
503 s.finalVolume = endVolume;
504 s.variation = variation;
505 s.unk14 = 0;
506 status = au_bgm_dispatch_player_event(&s);
508
509 return status;
510}
511
512AuResult snd_set_song_fade(s32 songName, s32 fadeInTime, s32 startVolume, s32 endVolume) {
513 AuResult status;
515
517 s.songName = songName;
518 s.duration = fadeInTime;
519 s.startVolume = startVolume;
520 s.finalVolume = endVolume;
521 s.variation = 0;
522 s.unk14 = 0;
523 status = au_bgm_dispatch_player_event(&s);
525
526 return status;
527}
528
529AuResult snd_set_song_variation_fade_time(s32 songName, s32 fadeTime, s32 variation) {
531 s.songName = songName;
532 s.duration = fadeTime;
533 s.startVolume = 0;
534 s.finalVolume = 0;
535 s.variation = variation;
536 s.unk14 = 0;
537 return func_8004DB4C(&s);
538}
539
540AuResult func_80055AF0(s32 songName) {
542 s.songName = songName;
543 s.duration = 0;
544 s.startVolume = 0;
545 s.finalVolume = 0;
546 s.variation = 0;
547 s.unk14 = 0;
548 return func_8004DCB8(&s, 0);
549}
550
551AuResult func_80055B28(s32 songName) {
552 AuResult status;
554
556 s.songName = songName;
557 s.duration = 2000;
558 s.startVolume = 1;
559 s.finalVolume = 127;
560 s.variation = 0;
561 s.unk14 = 0;
562 status = func_8004DE2C(&s);
564
565 return status;
566}
567
568AuResult func_80055B80(s32 songName) {
570 s.songName = songName;
571 s.duration = 0;
572 s.startVolume = 0;
573 s.finalVolume = 0;
574 s.variation = 0;
575 s.unk14 = 0;
576 return func_8004DCB8(&s, 1);
577}
578
579AuResult func_80055BB8(s32 songName, s32 fadeTime) {
581 s.songName = songName;
582 s.duration = fadeTime;
583 s.startVolume = 0;
584 s.finalVolume = 0;
585 s.variation = 0;
586 s.unk14 = 1;
587 return func_8004DB4C(&s);
588}
589
590AuResult func_80055BF0(s32 songName) {
592 s.songName = songName;
593 s.duration = 0;
594 s.startVolume = 0;
595 s.finalVolume = 0;
596 s.variation = 0;
597 s.unk14 = 1;
598 return func_8004DCB8(&s, 0);
599}
600
601AuResult func_80055C2C(s32 songName) {
603 s.songName = songName;
604 s.duration = 0;
605 s.startVolume = 0;
606 s.finalVolume = 0;
607 s.variation = 0;
608 s.unk14 = 1;
609 return func_8004DE2C(&s);
610}
611
612AuResult func_80055C64(s32 songName) {
614 s.songName = songName;
615 s.duration = 500;
616 s.finalVolume = 0x2000;
617 return func_8004E0F4(&s);
618}
619
620AuResult func_80055C94(s32 songName) {
622 s.songName = songName;
623 s.duration = 500;
624 s.finalVolume = 0x7FFF;
625 return func_8004E0F4(&s);
626}
627
628AuResult snd_set_song_variation(s32 songName, s32 variation) {
630 s.songName = songName;
631 s.variation = variation;
632 return func_80050970(&s);
633}
634
635// get file and player information for a given song name if it's currently playing
636AuResult snd_song_get_playing_info(s32 songName, BGMHeader** outFile, BGMPlayer** outPlayer) {
637 AuResult status = AU_RESULT_OK;
638 BGMHeader* bgmFile;
639
640 bgmFile = gSoundGlobals->dataBGM[0];
641 if (songName == bgmFile->name) {
642 *outPlayer = gBGMPlayerA;
643 *outFile = bgmFile;
644 } else {
645 bgmFile = gSoundGlobals->dataBGM[1];
646 if (songName == bgmFile->name) {
647 *outPlayer = gBGMPlayerB;
648 *outFile = bgmFile;
649 } else {
650 status = AU_ERROR_1;
651 }
652 }
653 return status;
654}
655
656AuResult snd_song_set_playback_rate(s32 songName, f32 rate) {
657 BGMPlayer* bgmPlayer;
658 BGMHeader* bgmFile;
659 AuResult status;
660
661 status = snd_song_get_playing_info(songName, &bgmFile, &bgmPlayer);
662
663 if (status == AU_RESULT_OK) {
664 au_bgm_set_playback_rate(bgmPlayer, rate);
665 }
666
667 return status;
668}
669
670AuResult snd_song_set_detune(s32 songName, s32 detune) {
671 BGMPlayer* bgmPlayer;
672 BGMHeader* bgmFile;
673 AuResult status;
674
675 status = snd_song_get_playing_info(songName, &bgmFile, &bgmPlayer);
676
677 if (status == AU_RESULT_OK) {
678 au_bgm_player_set_detune(bgmPlayer, detune);
679 }
680
681 return status;
682}
683
685 BGMPlayer* bgmPlayer;
686 BGMHeader* bgmFile;
687 AuResult status;
688
689 status = snd_song_get_playing_info(songName, &bgmFile, &bgmPlayer);
690
691 if (status == AU_RESULT_OK) {
692 u8* trackVols = snd_song_get_track_volumes_set(trackVolSet);
693
694 if (trackVols != NULL) {
695 au_bgm_set_track_volumes(bgmPlayer, trackVols, TRUE);
696 } else {
697 status = AU_ERROR_11;
698 }
699 }
700
701 return status;
702}
703
705 BGMPlayer* bgmPlayer;
706 BGMHeader* bgmFile;
707 AuResult status;
708
709 status = snd_song_get_playing_info(songName, &bgmFile, &bgmPlayer);
710
711 if (status == AU_RESULT_OK) {
712 u8* trackVols = snd_song_get_track_volumes_set(trackVolSet);
713
714 if (trackVols != NULL) {
715 au_bgm_set_track_volumes(bgmPlayer, trackVols, FALSE);
716 } else {
717 status = AU_ERROR_11;
718 }
719 }
720
721 return status;
722}
723
724static u8* snd_song_get_track_volumes_set(MusicTrackVols trackVolSet) {
725 u8* trackVols = NULL;
726
727 switch (trackVolSet) {
728 case TRACK_VOLS_0:
729 trackVols = D_80078DB8;
730 break;
731 case TRACK_VOLS_1:
732 trackVols = D_80078DC4;
733 break;
734 case TRACK_VOLS_2:
735 trackVols = D_80078DCC;
736 break;
737 case TRACK_VOLS_3:
738 trackVols = D_80078DD0;
739 break;
741 trackVols = TrackVols_KPA_Outside;
742 break;
743 case TRACK_VOLS_KPA_1:
744 trackVols = TrackVols_KPA_1;
745 break;
746 case TRACK_VOLS_KPA_2:
747 trackVols = TrackVols_KPA_2;
748 break;
749 case TRACK_VOLS_KPA_3:
750 trackVols = TrackVols_KPA_3;
751 break;
752 }
753
754 return trackVols;
755}
756
757static const f32 padding[] = {0.0f};
758
759static AuResult snd_song_change_track_volume(s32 songName, u32 trackIdx, u32 volume) {
760 BGMPlayer* bgmPlayer;
761 BGMHeader* bgmFile;
762 AuResult status;
763
764 status = snd_song_get_playing_info(songName, &bgmFile, &bgmPlayer);
765 if (status == AU_RESULT_OK) {
766 if (volume > 0x7F) {
767 volume = 0x7F;
768 }
769 if (trackIdx > 15) {
770 trackIdx = 15;
771 }
772 au_bgm_change_track_volume(bgmPlayer, trackIdx, 96, volume);
773 }
774 return status;
775}
776
777AuResult snd_song_set_track_vol_mute(s32 songName, s32 trackIdx) {
778 return snd_song_change_track_volume(songName, trackIdx, 0);
779}
780
781AuResult snd_song_set_track_vol_quiet(s32 songName, s32 trackIdx) {
782 return snd_song_change_track_volume(songName, trackIdx, 0x3F);
783}
784
785AuResult snd_song_set_track_vol_full(s32 songName, s32 trackIdx) {
786 return snd_song_change_track_volume(songName, trackIdx, 0x7F);
787}
788
789void bgm_set_proximity_mix_far(s32 songName, s32 mix) {
790 au_bgm_set_proximity_mix(songName, (u8)mix);
791}
792
793void bgm_set_proximity_mix_near(s32 songName, s32 mix) {
794 au_bgm_set_proximity_mix(songName, (u8)mix | 0x57000000);
795}
796
797void bgm_set_proximity_mix_full(s32 songName, s32 mix) {
798 au_bgm_set_proximity_mix(songName, (u8)mix | 0x7F000000);
799}
800
801void bgm_poll_music_events(MusicEventTrigger** musicEvents, s32* count) {
802 AuGlobals* globals = gSoundGlobals;
803
804 *musicEvents = globals->musicEventQueue;
805 *count = globals->musicEventQueueCount;
806}
807
811
812void bgm_trigger_music_event(s32 playerID, s32 trackIndex, s32 eventInfo) {
813 AuGlobals* globals = gSoundGlobals;
814
815 if (globals->musicEventQueueCount < 16) {
816 *globals->musicEventQueuePos++ = ((playerID << 0x1C) + ((trackIndex & 0xF) << 0x18) + eventInfo);
817 globals->musicEventQueueCount++;
818 }
819}
820
822 AuGlobals* globals = gSoundGlobals;
823 s32* buf = globals->musicEventQueue;
824 s32 i = 15;
825
826 do {
827 *buf++ = 0;
828 } while (i-- != 0);
829
830 globals->musicEventQueueCount = 0;
831 globals->flushMusicEventQueue = FALSE;
832 globals->musicEventQueuePos = globals->musicEventQueue;
833}
834
835void au_register_callback(AuCallback func, s32 index) {
836 gSoundGlobals->audioThreadCallbacks[index] = func;
837}
838
840 func_80056D5C(1);
841 func_80054DA8(0);
842}
843
844void audio_set_mono(void) {
845 func_80056D5C(0);
846 func_80054DA8(1);
847}
848
849void func_800561A4(s32 arg0) {
850 func_80054CE0(1, arg0);
851}
852
853void func_800561C4(s32 arg0) {
854 func_80054CE0(0x10, arg0);
855}
856
857void func_800561E4(s32 arg0) {
858 func_80054D74(0x10, arg0);
859}
860
864
void au_bgm_set_proximity_mix(s32 songName, u32 mix)
AuResult au_bgm_dispatch_player_event(SongUpdateEvent *event)
AuResult au_bgm_is_song_playing(s32 songName)
void au_bgm_change_track_volume(BGMPlayer *player, s32 trackIdx, s16 time, u8 volume)
AuResult func_8004DCB8(SongUpdateEvent *update, s32 clearChanged)
AuResult func_8004E0F4(SongUpdateEvent *update)
void au_bgm_set_track_volumes(BGMPlayer *player, u8 *trackVols, s32 mode)
AuResult au_bgm_stop_song(s32 songName)
AuResult func_8004DB4C(SongUpdateEvent *s)
AuResult func_8004DE2C(SongUpdateEvent *update)
void au_bgm_stop_all(void)
AuResult func_80050970(SongUpdateEvent *update)
void au_bgm_set_playback_rate(BGMPlayer *player, f32 rate)
void au_bgm_player_set_detune(BGMPlayer *player, s32 detune)
void au_amb_set_disabled(s32 index, s32 disable)
Definition 2BF90.c:72
void au_amb_stop_quick(s32 index)
Definition 2BF90.c:157
AuResult au_amb_check_player_index(u32 index)
Definition 2BF90.c:60
AuResult au_amb_is_stopped(s32 index)
Definition 2BF90.c:206
void au_amb_load_tracks_fade(s32 arg0, s32 arg1)
Definition 2BF90.c:68
void au_amb_resume(s32 index, s32 time)
Definition 2BF90.c:141
void au_amb_set_volume(s32 index, s32 time, s32 volume)
Definition 2BF90.c:187
void au_amb_stop_slow(s32 index, s32 time)
Definition 2BF90.c:172
void au_amb_pause(s32 index, s32 time)
Definition 2BF90.c:126
AuResult au_amb_start(s32 index, s32 time)
Definition 2BF90.c:83
void func_80054CE0(s32 arg0, u32 idx)
void func_80054DA8(u32 bMonoSound)
void au_get_bgm_player_and_file(u32 playerIndex, BGMHeader **outFile, BGMPlayer **outPlayer)
AuResult au_load_song_files(u32 songID, BGMHeader *bgmFile, BGMPlayer *player)
AuResult au_ambient_load(u32 ambSoundID)
s32 func_80054D74(s32 arg0, s32 arg1)
AuResult snd_ambient_disable(s32 index)
Definition 30450.c:355
void snd_stop_sound(s32 soundID)
Definition 30450.c:256
u8 TrackVols_KPA_3[]
Definition 30450.c:87
u8 TrackVols_KPA_2[]
Definition 30450.c:71
u8 TrackVols_KPA_Outside[]
Definition 30450.c:39
void snd_start_sound_with_shift(s32 soundID, u8 volume, u8 pan, s16 pitchShift)
Definition 30450.c:199
AuResult snd_set_song_fade(s32 songName, s32 fadeInTime, s32 startVolume, s32 endVolume)
Definition 30450.c:512
void audio_set_stereo(void)
Definition 30450.c:839
AuResult snd_load_ambient(s32 ambSoundID)
Definition 30450.c:272
AuResult snd_song_set_track_vol_mute(s32 songName, s32 trackIdx)
Definition 30450.c:777
AuResult snd_song_set_track_vol_quiet(s32 songName, s32 trackIdx)
Definition 30450.c:781
u8 D_80078DC4[]
Definition 30450.c:21
AuResult func_80055AF0(s32 songName)
Definition 30450.c:540
AuResult snd_ambient_stop_slow(s32 index, s32 fadeOutTime)
Definition 30450.c:295
void disable_sounds(void)
Definition 30450.c:865
void snd_ambient_80055760(s32 index)
Definition 30450.c:376
AuResult snd_song_set_track_volumes(s32 songName, MusicTrackVols trackVolSet)
Definition 30450.c:684
void snd_reset(void)
Definition 30450.c:262
void snd_start_sound(s32 soundID, u8 volume, u8 pan)
Definition 30450.c:184
AuResult au_song_stop(s32 songName)
Definition 30450.c:483
void bgm_set_proximity_mix_full(s32 songName, s32 mix)
Definition 30450.c:797
u16 AuAmbiencePlayOnlyIndex
Definition 30450.c:8
void snd_start_sound_raw(s32 soundID, s16 volume, s16 pitchShift, s32 pan)
Definition 30450.c:266
void func_80055110(BGMPlayer *player)
Definition 30450.c:133
AuResult snd_song_set_detune(s32 songName, s32 detune)
Definition 30450.c:670
AuResult func_80055C64(s32 songName)
Definition 30450.c:612
AuResult snd_ambient_set_volume(s32 index, s32 time, s32 volume)
Definition 30450.c:345
AuResult func_80055C2C(s32 songName)
Definition 30450.c:601
AuResult snd_song_set_playback_rate(s32 songName, f32 rate)
Definition 30450.c:656
void bgm_flush_music_events(void)
Definition 30450.c:808
AuResult func_80055C94(s32 songName)
Definition 30450.c:620
AuResult snd_ambient_play_only(s32 index)
Definition 30450.c:409
void snd_adjust_sound_with_shift(s32 soundID, u8 volume, u8 pan, s16 pitchShift)
Definition 30450.c:235
AuResult func_80055B80(s32 songName)
Definition 30450.c:568
AuResult snd_ambient_mute(s32 index, s32 arg1)
Definition 30450.c:335
AuResult au_song_start(s32 songName)
Definition 30450.c:449
void enable_sounds(void)
Definition 30450.c:861
AuResult snd_ambient_enable(s32 index)
Definition 30450.c:365
AuResult snd_ambient_stop_all(s32 time)
Definition 30450.c:391
AuResult snd_song_set_track_vol_full(s32 songName, s32 trackIdx)
Definition 30450.c:785
AuResult snd_ambient_resume(s32 index, s32 fadeInTime)
Definition 30450.c:315
void func_80055050(ALHeap *heap)
Definition 30450.c:103
AuResult snd_song_clear_track_volumes(s32 songName, MusicTrackVols trackVolSet)
Definition 30450.c:704
AuResult au_song_load(s32 songID, s32 playerIndex)
Definition 30450.c:436
u8 TrackVols_KPA_1[]
Definition 30450.c:55
s32 PreventBGMPlayerUpdate
Definition 30450.c:6
AuResult snd_ambient_stop_quick(s32 index)
Definition 30450.c:285
void bgm_poll_music_events(MusicEventTrigger **musicEvents, s32 *count)
Definition 30450.c:801
AuResult snd_ambient_pause(s32 index, s32 fadeOutTime)
Definition 30450.c:305
AuResult au_song_is_playing(s32 songName)
Definition 30450.c:491
AuResult func_80055BB8(s32 songName, s32 fadeTime)
Definition 30450.c:579
void bgm_trigger_music_event(s32 playerID, s32 trackIndex, s32 eventInfo)
Definition 30450.c:812
AuResult snd_set_song_variation_fade(s32 songName, s32 variation, s32 fadeInTime, s32 startVolume, s32 endVolume)
Definition 30450.c:495
void snd_adjust_sound(s32 soundID, u8 volume, u8 pan)
Definition 30450.c:220
void func_800561A4(s32 arg0)
Definition 30450.c:849
AuResult func_80055B28(s32 songName)
Definition 30450.c:551
AuResult snd_set_song_variation_fade_time(s32 songName, s32 fadeTime, s32 variation)
Definition 30450.c:529
AuResult au_song_start_variation(s32 songName, s32 variation)
Definition 30450.c:466
void audio_set_mono(void)
Definition 30450.c:844
void func_800561C4(s32 arg0)
Definition 30450.c:853
u8 D_80078DCC[]
Definition 30450.c:27
void func_8005513C(u32 arg0)
Definition 30450.c:146
void bgm_set_proximity_mix_near(s32 songName, s32 mix)
Definition 30450.c:793
AuResult snd_ambient_play(s32 index, s32 fadeInTime)
Definition 30450.c:276
u16 D_80078DB4
Definition 30450.c:7
void au_stop_songs(void)
Definition 30450.c:487
AuResult snd_song_get_playing_info(s32 songName, BGMHeader **outFile, BGMPlayer **outPlayer)
Definition 30450.c:636
void func_80055068(u32 arg0)
Definition 30450.c:108
AuResult snd_ambient_is_stopped(s32 index)
Definition 30450.c:325
void bgm_clear_music_events(void)
Definition 30450.c:821
void bgm_set_proximity_mix_far(s32 songName, s32 mix)
Definition 30450.c:789
u8 D_80078DD0[]
Definition 30450.c:31
AuResult snd_set_song_variation(s32 songName, s32 variation)
Definition 30450.c:628
void func_800561E4(s32 arg0)
Definition 30450.c:857
AuResult func_80055BF0(s32 songName)
Definition 30450.c:590
u8 D_80078DB8[]
Definition 30450.c:14
void au_register_callback(AuCallback func, s32 index)
Definition 30450.c:835
void func_80056D5C(u8 bStereoSound)
Definition 31650.c:262
@ SND_MANAGER_STATE_DISABLED
Definition audio.h:238
@ SND_MANAGER_STATE_ENABLED
Definition audio.h:237
BGMPlayer * gBGMPlayerB
u8 unk_25B
Definition audio.h:1080
u8 unk_25A
Definition audio.h:1079
u8 unk_258
Definition audio.h:1077
MusicEventTrigger * musicEventQueue
Definition audio.h:921
SoundManager * gSoundManager
AuGlobals * gSoundGlobals
s32 flushMusicEventQueue
Definition audio.h:923
AuCallback audioThreadCallbacks[2]
Definition audio.h:925
u8 unk_259
Definition audio.h:1078
s32 name
Definition audio.h:758
BGMPlayer * gBGMPlayerA
void(* AuCallback)(void)
Definition audio.h:260
s32 unk_238[8]
Definition audio.h:1076
struct BGMHeader * dataBGM[2]
Definition audio.h:910
s32 resetPending
Definition audio.h:692
u32 musicEventQueueCount
Definition audio.h:922
MusicEventTrigger * musicEventQueuePos
Definition audio.h:920
u32 MusicEventTrigger
@ SOUND_ID_ADJUST
Definition enums.h:529
@ SOUND_ID_STOP
Definition enums.h:526
MusicTrackVols
Definition enums.h:1788
@ TRACK_VOLS_1
Definition enums.h:1790
@ TRACK_VOLS_KPA_3
Definition enums.h:1796
@ TRACK_VOLS_3
Definition enums.h:1792
@ TRACK_VOLS_KPA_OUTSIDE
Definition enums.h:1793
@ TRACK_VOLS_KPA_1
Definition enums.h:1794
@ TRACK_VOLS_KPA_2
Definition enums.h:1795
@ TRACK_VOLS_2
Definition enums.h:1791
@ TRACK_VOLS_0
Definition enums.h:1789
AuResult
Definition enums.h:1755
@ AU_ERROR_NULL_SONG_NAME
Definition enums.h:1761
@ AU_ERROR_11
Definition enums.h:1766
@ AU_ERROR_1
Definition enums.h:1757
@ AU_RESULT_OK
Definition enums.h:1756
void au_sfx_enqueue_event(SoundManager *manager, u32 soundID, s16 volume, s16 pitchShift, u8 pan)
Definition sfx_player.c:543
void au_sfx_set_state(SoundManager *manager, s32 arg1)
Definition sfx_player.c:684
#define ASCII_TO_U32(a, b, c, d)
Definition macros.h:179
#define ARRAY_COUNT(arr)
Definition macros.h:40