sm64

A Super Mario 64 decompilation
Log | Files | Refs | README | LICENSE

playback.h (2000B)


      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 process_notes(void);
     20 void seq_channel_layer_note_decay(struct SequenceChannelLayer *seqLayer);
     21 void seq_channel_layer_note_release(struct SequenceChannelLayer *seqLayer);
     22 void init_synthetic_wave(struct Note *note, struct SequenceChannelLayer *seqLayer);
     23 void init_note_lists(struct NotePool *pool);
     24 void init_note_free_list(void);
     25 void note_pool_clear(struct NotePool *pool);
     26 void note_pool_fill(struct NotePool *pool, s32 count);
     27 void audio_list_push_front(struct AudioListItem *list, struct AudioListItem *item);
     28 void audio_list_remove(struct AudioListItem *item);
     29 struct Note *alloc_note(struct SequenceChannelLayer *seqLayer);
     30 void reclaim_notes(void);
     31 void note_init_all(void);
     32 
     33 #if defined(VERSION_SH)
     34 void note_set_vel_pan_reverb(struct Note *note, struct ReverbInfo *reverbInfo);
     35 #elif defined(VERSION_EU)
     36 void note_set_vel_pan_reverb(struct Note *note, f32 velocity, u8 pan, u8 reverbVol);
     37 #endif
     38 
     39 #if defined(VERSION_EU) || defined(VERSION_SH)
     40 struct AudioBankSound *instrument_get_audio_bank_sound(struct Instrument *instrument, s32 semitone);
     41 struct Instrument *get_instrument_inner(s32 bankId, s32 instId);
     42 struct Drum *get_drum(s32 bankId, s32 drumId);
     43 void note_init_volume(struct Note *note);
     44 void note_set_frequency(struct Note *note, f32 frequency);
     45 void note_enable(struct Note *note);
     46 void note_disable(struct Note *note);
     47 #endif
     48 
     49 
     50 #endif // AUDIO_PLAYBACK_H