Mario Kart 64
playback.h
Go to the documentation of this file.
1 #ifndef AUDIO_PLAYBACK_H
2 #define AUDIO_PLAYBACK_H
3 
4 #include <PR/ultratypes.h>
5 
6 #include "internal.h"
7 
8 // Mask bits denoting where to allocate notes from, according to a channel's
9 // noteAllocPolicy. Despite being checked as bitmask bits, the bits are not
10 // orthogonal; rather, the smallest bit wins, except for NOTE_ALLOC_LAYER,
11 // which *is* orthogonal to the other. SEQ implicitly includes CHANNEL.
12 // If none of the CHANNEL/SEQ/GLOBAL_FREELIST bits are set, all three locations
13 // are tried.
14 #define NOTE_ALLOC_LAYER 1
15 #define NOTE_ALLOC_CHANNEL 2
16 #define NOTE_ALLOC_SEQ 4
17 #define NOTE_ALLOC_GLOBAL_FREELIST 8
18 
19 void note_set_vel_pan_reverb(struct Note *note, f32 velocity, u8 pan, u8 reverbVol);
20 void note_set_resampling_rate(struct Note *note, f32 resamplingRateInput);
21 s32 build_synthetic_wave(struct Note *note, struct SequenceChannelLayer *seqLayer, s32 waveId);
22 void init_synthetic_wave(struct Note *note, struct SequenceChannelLayer *seqLayer);
23 void init_note_list(struct AudioListItem *list);
24 void init_note_lists(struct NotePool *pool);
25 void init_note_free_list(void);
26 void note_pool_clear(struct NotePool *pool);
27 void note_pool_fill(struct NotePool *pool, s32 count);
28 void audio_list_push_front(struct AudioListItem *list, struct AudioListItem *item);
29 void audio_list_remove(struct AudioListItem *item);
30 struct Note *pop_node_with_lower_prio(struct AudioListItem *list, s32 limit);
31 void note_init_for_layer(struct Note *note, struct SequenceChannelLayer *seqLayer);
32 void note_disable(struct Note *note);
33 void process_notes(void);
34 struct AudioBankSound *instrument_get_audio_bank_sound(struct Instrument *instrument, s32 semitone);
35 struct Instrument *get_instrument_inner(s32 bankId, s32 instId);
36 struct Drum *get_drum(s32 bankId, s32 drumId);
37 void note_init(struct Note *note);
41 void func_800BD8F4(struct Note *note, struct SequenceChannelLayer *seqLayer);
42 void note_release_and_take_ownership(struct Note *note, struct SequenceChannelLayer *seqLayer);
43 struct Note *alloc_note_from_disabled(struct NotePool *pool, struct SequenceChannelLayer *seqLayer);
44 struct Note *alloc_note_from_decaying(struct NotePool *pool, struct SequenceChannelLayer *seqLayer);
45 struct Note *alloc_note_from_active(struct NotePool *pool, struct SequenceChannelLayer *seqLayer);
46 struct Note *alloc_note(struct SequenceChannelLayer *seqLayer);
47 void note_init_all(void);
48 
49 #endif // AUDIO_PLAYBACK_H
void audio_list_remove(struct AudioListItem *item)
Definition: playback.c:583
void note_init_for_layer(struct Note *note, struct SequenceChannelLayer *seqLayer)
Definition: playback.c:620
struct Note * alloc_note_from_disabled(struct NotePool *pool, struct SequenceChannelLayer *seqLayer)
Definition: playback.c:667
void note_set_vel_pan_reverb(struct Note *note, f32 velocity, u8 pan, u8 reverbVol)
Definition: playback.c:13
struct Note * pop_node_with_lower_prio(struct AudioListItem *list, s32 limit)
Definition: playback.c:594
void init_synthetic_wave(struct Note *note, struct SequenceChannelLayer *seqLayer)
Definition: playback.c:436
void seq_channel_layer_note_decay(struct SequenceChannelLayer *seqLayer)
Definition: playback.c:390
void process_notes(void)
Definition: playback.c:211
void seq_channel_layer_decay_release_internal(struct SequenceChannelLayer *seqLayer, s32 target)
Definition: playback.c:334
void note_init(struct Note *note)
Definition: playback.c:188
struct Note * alloc_note_from_decaying(struct NotePool *pool, struct SequenceChannelLayer *seqLayer)
Definition: playback.c:676
struct AudioBankSound * instrument_get_audio_bank_sound(struct Instrument *instrument, s32 semitone)
Definition: playback.c:118
void note_pool_fill(struct NotePool *pool, s32 count)
Definition: playback.c:521
void note_release_and_take_ownership(struct Note *note, struct SequenceChannelLayer *seqLayer)
Definition: playback.c:660
void note_set_resampling_rate(struct Note *note, f32 resamplingRateInput)
Definition: playback.c:90
struct Note * alloc_note(struct SequenceChannelLayer *seqLayer)
Definition: playback.c:700
struct Drum * get_drum(s32 bankId, s32 drumId)
Definition: playback.c:155
void note_init_all(void)
Definition: playback.c:768
void audio_list_push_front(struct AudioListItem *list, struct AudioListItem *item)
Definition: playback.c:569
void note_disable(struct Note *note)
Definition: playback.c:198
void note_pool_clear(struct NotePool *pool)
Definition: playback.c:476
void init_note_free_list(void)
Definition: playback.c:465
void init_note_lists(struct NotePool *pool)
Definition: playback.c:454
s32 build_synthetic_wave(struct Note *note, struct SequenceChannelLayer *seqLayer, s32 waveId)
Definition: playback.c:400
void func_800BD8F4(struct Note *note, struct SequenceChannelLayer *seqLayer)
Definition: playback.c:655
struct Instrument * get_instrument_inner(s32 bankId, s32 instId)
Definition: playback.c:130
void seq_channel_layer_note_release(struct SequenceChannelLayer *seqLayer)
Definition: playback.c:394
void init_note_list(struct AudioListItem *list)
Definition: playback.c:448
struct Note * alloc_note_from_active(struct NotePool *pool, struct SequenceChannelLayer *seqLayer)
Definition: playback.c:685
Definition: internal.h:143
Definition: internal.h:68
Definition: internal.h:159
Definition: internal.h:148
Definition: internal.h:85
Definition: internal.h:435
Definition: internal.h:344
signed int s32
Definition: ultratypes.h:15
float f32
Definition: ultratypes.h:32
unsigned char u8
Definition: ultratypes.h:12