Files
SpaghettiKart/src/audio/playback.h
T
coco875 a1f0d32d66 Update decomp clang (#67)
* Update menus.c (#634)

* Update common_data.yml (#635)

* Renames for screenId and other changes (#636)

* screenId renames

* Rename surface map to collision mesh (#637)

* Rename some stack vars (#638)

* Fix syntax error (#639)

* Rename some stack vars

* Update collision.c

* Collision Documentation (#640)

* Collision related renames

* update doxygen (#649)

* change bool (#644)

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>

* Update (#642)

* Delete trig_tables_bss.c (#650)

* fix typo audio (#656)

* fix typo src actor (#657)

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>

* fix typo include (#658)

* fix course (#659)

* fix typo debug (#660)

* fix typo data (#661)

* replace number with const (#665)

* fix typo buffers (#655)

* fix typo buffers

* tweak ld file

* rename to sMemoryPool

* add a warning

---------

* fix typo src (#654)

* fix typo src

* fix non matcing

* Update code_80091750.c

---------

* fix typo racing (#653)

* fix typo racing

* get it match

* replace G_LINE3D to G_QUAD

---------

* fix typo src (#652)

* fix ending typo (#651)

* Action more info when it doesn't match and fix first diff (#662)

* Update linux-compile.yml

* fix first-diff

* Update first-diff.py

---------

* document texture of kart (#663)

* document texture of kart

* change screenPlayerId to screenId

* some documentation around object

* Revert "some documentation around object"

This reverts commit cbb39078e036bf2a417bed67359e910213acab28.

* more rename

---------

* Make evaluate_collision_players_palm_tree better (#667)

This matches just the same as before,	but using those two casts instead of
shifts seems more likely to be accurate to the original source code

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>

* add fedora instruciton (#666)

* start documenting animation (#668)

* start documenting animation

* Update course_data.c

* change comment

* update libultra asm (#648)

* update libultra asm

* fix gcc __osThreadTail

---------

* Document Vehicles (#641)

* start doc collision

* fix merge

* finish rename fonction related to vehicle

* document around waypoint of vehicle

* make some modification

* make some change and rename one

* copy_ to oldPos

* doc smoke ferry and train

* some rename

* fix some renaming

* precise index

* rename a funciton

* simplify waypoint_vehicles

* change some name

* change some name

* rename move_to_point_direction

* fix some conflict

* Update code_80005FD0.c

* Update code_80005FD0.h

---------

* Label a save info loop (#645)

* save info

* more gcc progress

* fix a value and do a rename (#669)

* update clang and add action (#664)

* update clang and add action

* try clang on course folder only

* forget two file

* Update course_displaylists.inc.c

* forget few other file

* Update course_vertices.inc.c

* format all code while get it match

* second pass

* format other dir

* disable clang format on bad ido code

* fix some tabulation

* revert format on tool dir

* Update clang-format.yml

* ignore gbi.h

* add some read me instruction

* fix error

* format and fixing error

* Update README.md

---------

* Update linkonly_generator.py (#670)

* format more file

* update

* fix compilation issue

* remove course_metadata folder

* re add course metadata folder

* fix banshee bordwalk crash

* fix windows eurk

* Update CMakeLists.txt

---------
2024-08-27 17:47:39 -06:00

50 lines
2.6 KiB
C

#ifndef AUDIO_PLAYBACK_H
#define AUDIO_PLAYBACK_H
#include <libultra/types.h>
#include "internal.h"
// Mask bits denoting where to allocate notes from, according to a channel's
// noteAllocPolicy. Despite being checked as bitmask bits, the bits are not
// orthogonal; rather, the smallest bit wins, except for NOTE_ALLOC_LAYER,
// which *is* orthogonal to the other. SEQ implicitly includes CHANNEL.
// If none of the CHANNEL/SEQ/GLOBAL_FREELIST bits are set, all three locations
// are tried.
#define NOTE_ALLOC_LAYER 1
#define NOTE_ALLOC_CHANNEL 2
#define NOTE_ALLOC_SEQ 4
#define NOTE_ALLOC_GLOBAL_FREELIST 8
void note_set_vel_pan_reverb(struct Note* note, f32 velocity, u8 pan, u8 reverbVol);
void note_set_resampling_rate(struct Note* note, f32 resamplingRateInput);
s32 build_synthetic_wave(struct Note* note, struct SequenceChannelLayer* seqLayer, s32 waveId);
void init_synthetic_wave(struct Note* note, struct SequenceChannelLayer* seqLayer);
void init_note_list(struct AudioListItem* list);
void init_note_lists(struct NotePool* pool);
void init_note_free_list(void);
void note_pool_clear(struct NotePool* pool);
void note_pool_fill(struct NotePool* pool, s32 count);
void audio_list_push_front(struct AudioListItem* list, struct AudioListItem* item);
void audio_list_remove(struct AudioListItem* item);
struct Note* pop_node_with_lower_prio(struct AudioListItem* list, s32 limit);
void note_init_for_layer(struct Note* note, struct SequenceChannelLayer* seqLayer);
void note_disable(struct Note* note);
void process_notes(void);
struct AudioBankSound* instrument_get_audio_bank_sound(struct Instrument* instrument, s32 semitone);
struct Instrument* get_instrument_inner(s32 bankId, s32 instId);
struct Drum* get_drum(s32 bankId, s32 drumId);
void note_init(struct Note* note);
void seq_channel_layer_decay_release_internal(struct SequenceChannelLayer* seqLayer, s32 target);
void seq_channel_layer_note_decay(struct SequenceChannelLayer* seqLayer);
void seq_channel_layer_note_release(struct SequenceChannelLayer* seqLayer);
void func_800BD8F4(struct Note* note, struct SequenceChannelLayer* seqLayer);
void note_release_and_take_ownership(struct Note* note, struct SequenceChannelLayer* seqLayer);
struct Note* alloc_note_from_disabled(struct NotePool* pool, struct SequenceChannelLayer* seqLayer);
struct Note* alloc_note_from_decaying(struct NotePool* pool, struct SequenceChannelLayer* seqLayer);
struct Note* alloc_note_from_active(struct NotePool* pool, struct SequenceChannelLayer* seqLayer);
struct Note* alloc_note(struct SequenceChannelLayer* seqLayer);
void note_init_all(void);
#endif // AUDIO_PLAYBACK_H