2019-08-25 04:46:40 +00:00
|
|
|
#ifndef _AUDIO_PLAYBACK_H
|
|
|
|
#define _AUDIO_PLAYBACK_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
|
|
|
|
|
2019-12-02 02:52:53 +00:00
|
|
|
void process_notes(void);
|
2019-08-25 04:46:40 +00:00
|
|
|
void seq_channel_layer_note_decay(struct SequenceChannelLayer *seqLayer);
|
|
|
|
void seq_channel_layer_note_release(struct SequenceChannelLayer *seqLayer);
|
2019-12-02 02:52:53 +00:00
|
|
|
void init_synthetic_wave(struct Note *note, struct SequenceChannelLayer *seqLayer);
|
2019-08-25 04:46:40 +00:00
|
|
|
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 *alloc_note(struct SequenceChannelLayer *seqLayer);
|
2019-12-02 02:52:53 +00:00
|
|
|
void reclaim_notes(void);
|
2019-08-25 04:46:40 +00:00
|
|
|
void note_init_all(void);
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* _AUDIO_PLAYBACK_H */
|