Mario Kart 64
Loading...
Searching...
No Matches
seqplayer.c File Reference
#include <ultra64.h>
#include <macros.h>
#include "audio/data.h"
#include "audio/internal.h"
#include "audio/seqplayer.h"
#include "audio/load.h"
#include "audio/heap.h"
#include "audio/effects.h"
#include "audio/playback.h"
#include "audio/external.h"
Include dependency graph for seqplayer.c:

Macros

#define LAYERS_SIZE   ARRAY_COUNT(gSequenceLayers)
 

Functions

void sequence_channel_init (struct SequenceChannel *seqChannel)
 
s32 seq_channel_set_layer (struct SequenceChannel *seqChannel, s32 layerIndex)
 
void seq_channel_layer_disable (struct SequenceChannelLayer *layer)
 
void seq_channel_layer_free (struct SequenceChannel *seqChannel, s32 layerIndex)
 
void sequence_channel_disable (struct SequenceChannel *seqChannel)
 
struct SequenceChannelallocate_sequence_channel (void)
 
void sequence_player_init_channels (struct SequencePlayer *seqPlayer, u16 channelBits)
 
void sequence_player_disable_channels (struct SequencePlayer *seqPlayer, u16 channelBits)
 
void sequence_channel_enable (struct SequencePlayer *seqPlayer, u8 channelIndex, void *script)
 
void sequence_player_disable (struct SequencePlayer *seqPlayer)
 
void audio_list_push_back (struct AudioListItem *list, struct AudioListItem *item)
 
void * audio_list_pop_back (struct AudioListItem *list)
 
void init_layer_freelist (void)
 
u8 m64_read_u8 (struct M64ScriptState *state)
 
s16 m64_read_s16 (struct M64ScriptState *state)
 
u16 m64_read_compressed_u16 (struct M64ScriptState *state)
 
void seq_channel_layer_process_script (struct SequenceChannelLayer *layer)
 
u8 get_instrument (struct SequenceChannel *seqChannel, u8 instId, struct Instrument **instOut, struct AdsrSettings *adsr)
 
void set_instrument (struct SequenceChannel *seqChannel, u8 instId)
 
void sequence_channel_set_volume (struct SequenceChannel *seqChannel, u8 volume)
 
void sequence_channel_process_script (struct SequenceChannel *seqChannel)
 
void sequence_player_process_sequence (struct SequencePlayer *seqPlayer)
 
void process_sequences (UNUSED s32 iterationsRemaining)
 
void init_sequence_player (u32 player)
 
void init_sequence_players (void)
 

Variables

char seqplayer_unused_string00 [] = "Audio:Track:Warning: No Free Notetrack\n"
 
char seqplayer_unused_string01 [] = "SUBTRACK DIM\n"
 
char seqplayer_unused_string02 [] = "Audio:Track: Warning :SUBTRACK had been stolen by other Group.\n"
 
char seqplayer_unused_string03 [] = "SEQID %d,BANKID %d\n"
 
char seqplayer_unused_string04 [] = "ERR:SUBTRACK %d NOT ALLOCATED\n"
 
char seqplayer_unused_string05 [] = "Error:Same List Add\n"
 
char seqplayer_unused_string06 [] = "Macro Level Over Error!\n"
 
char seqplayer_unused_string07 [] = "Macro Level Over Error!\n"
 
char seqplayer_unused_string08 [] = "WARNING: NPRG: cannot change %d\n"
 
char seqplayer_unused_string09 [] = "Audio:Track:NOTE:UNDEFINED NOTE COM. %x\n"
 
char seqplayer_unused_string10 [] = "Audio: Note:Velocity Error %d\n"
 
char seqplayer_unused_string11 [] = "Error: Subtrack no prg.\n"
 
char seqplayer_unused_string12 [] = "ERR %x\n"
 
char seqplayer_unused_string13 [] = "Error: Your assignchannel is stolen.\n"
 
char seqplayer_unused_string14 [] = "Audio:Track :Call Macro Level Over Error!\n"
 
char seqplayer_unused_string15 [] = "Audio:Track :Loops Macro Level Over Error!\n"
 
char seqplayer_unused_string16 [] = "SUB:ERR:BANK %d NOT CACHED.\n"
 
char seqplayer_unused_string17 [] = "SUB:ERR:BANK %d NOT CACHED.\n"
 
char seqplayer_unused_string18 [] = "Audio:Track: CTBLCALL Macro Level Over Error!\n"
 
char seqplayer_unused_string19 [] = "[%2x] \n"
 
char seqplayer_unused_string20 [] = "Err :Sub %x ,address %x:Undefined SubTrack Function %x"
 
char seqplayer_unused_string21 [] = "Disappear Sequence or Bank %d\n"
 
char seqplayer_unused_string22 [] = "Macro Level Over Error!\n"
 
char seqplayer_unused_string23 [] = "Macro Level Over Error!\n"
 
char seqplayer_unused_string24 [] = "Group:Undefine upper C0h command (%x)\n"
 
char seqplayer_unused_string25 [] = "Group:Undefined Command\n"
 

Macro Definition Documentation

◆ LAYERS_SIZE

#define LAYERS_SIZE   ARRAY_COUNT(gSequenceLayers)

Function Documentation

◆ allocate_sequence_channel()

struct SequenceChannel * allocate_sequence_channel ( void )
Here is the caller graph for this function:

◆ audio_list_pop_back()

void * audio_list_pop_back ( struct AudioListItem * list)
Here is the caller graph for this function:

◆ audio_list_push_back()

void audio_list_push_back ( struct AudioListItem * list,
struct AudioListItem * item )
Here is the caller graph for this function:

◆ get_instrument()

u8 get_instrument ( struct SequenceChannel * seqChannel,
u8 instId,
struct Instrument ** instOut,
struct AdsrSettings * adsr )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_layer_freelist()

void init_layer_freelist ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_sequence_player()

void init_sequence_player ( u32 player)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_sequence_players()

void init_sequence_players ( void )
Bug
Size of wrong array. Zeroes out second half of gSequenceChannels[0], all of gSequenceChannels[1..31], and part of gSequenceLayers[0]. However, this is only called at startup, so it's harmless.
Here is the call graph for this function:

◆ m64_read_compressed_u16()

u16 m64_read_compressed_u16 ( struct M64ScriptState * state)
Here is the caller graph for this function:

◆ m64_read_s16()

s16 m64_read_s16 ( struct M64ScriptState * state)
Here is the caller graph for this function:

◆ m64_read_u8()

u8 m64_read_u8 ( struct M64ScriptState * state)
Here is the caller graph for this function:

◆ process_sequences()

void process_sequences ( UNUSED s32 iterationsRemaining)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ seq_channel_layer_disable()

void seq_channel_layer_disable ( struct SequenceChannelLayer * layer)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ seq_channel_layer_free()

void seq_channel_layer_free ( struct SequenceChannel * seqChannel,
s32 layerIndex )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ seq_channel_layer_process_script()

void seq_channel_layer_process_script ( struct SequenceChannelLayer * layer)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ seq_channel_set_layer()

s32 seq_channel_set_layer ( struct SequenceChannel * seqChannel,
s32 layerIndex )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sequence_channel_disable()

void sequence_channel_disable ( struct SequenceChannel * seqChannel)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sequence_channel_enable()

void sequence_channel_enable ( struct SequencePlayer * seqPlayer,
u8 channelIndex,
void * script )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sequence_channel_init()

void sequence_channel_init ( struct SequenceChannel * seqChannel)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sequence_channel_process_script()

void sequence_channel_process_script ( struct SequenceChannel * seqChannel)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sequence_channel_set_volume()

void sequence_channel_set_volume ( struct SequenceChannel * seqChannel,
u8 volume )
Here is the caller graph for this function:

◆ sequence_player_disable()

void sequence_player_disable ( struct SequencePlayer * seqPlayer)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sequence_player_disable_channels()

void sequence_player_disable_channels ( struct SequencePlayer * seqPlayer,
u16 channelBits )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sequence_player_init_channels()

void sequence_player_init_channels ( struct SequencePlayer * seqPlayer,
u16 channelBits )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sequence_player_process_sequence()

void sequence_player_process_sequence ( struct SequencePlayer * seqPlayer)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_instrument()

void set_instrument ( struct SequenceChannel * seqChannel,
u8 instId )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ seqplayer_unused_string00

char seqplayer_unused_string00[] = "Audio:Track:Warning: No Free Notetrack\n"

Given that (almost) all of these are format strings, it is highly likely that they are meant to be used in some sort of printf variant. But I don't care to try and figure out which function gets which string(s) So I've place them all here instead. This means some printf stubs have been commented out to avoid duplication of some strings (i.e seqplayer_unused_string00)

◆ seqplayer_unused_string01

char seqplayer_unused_string01[] = "SUBTRACK DIM\n"

◆ seqplayer_unused_string02

char seqplayer_unused_string02[] = "Audio:Track: Warning :SUBTRACK had been stolen by other Group.\n"

◆ seqplayer_unused_string03

char seqplayer_unused_string03[] = "SEQID %d,BANKID %d\n"

◆ seqplayer_unused_string04

char seqplayer_unused_string04[] = "ERR:SUBTRACK %d NOT ALLOCATED\n"

◆ seqplayer_unused_string05

char seqplayer_unused_string05[] = "Error:Same List Add\n"

◆ seqplayer_unused_string06

char seqplayer_unused_string06[] = "Macro Level Over Error!\n"

◆ seqplayer_unused_string07

char seqplayer_unused_string07[] = "Macro Level Over Error!\n"

◆ seqplayer_unused_string08

char seqplayer_unused_string08[] = "WARNING: NPRG: cannot change %d\n"

◆ seqplayer_unused_string09

char seqplayer_unused_string09[] = "Audio:Track:NOTE:UNDEFINED NOTE COM. %x\n"

◆ seqplayer_unused_string10

char seqplayer_unused_string10[] = "Audio: Note:Velocity Error %d\n"

◆ seqplayer_unused_string11

char seqplayer_unused_string11[] = "Error: Subtrack no prg.\n"

◆ seqplayer_unused_string12

char seqplayer_unused_string12[] = "ERR %x\n"

◆ seqplayer_unused_string13

char seqplayer_unused_string13[] = "Error: Your assignchannel is stolen.\n"

◆ seqplayer_unused_string14

char seqplayer_unused_string14[] = "Audio:Track :Call Macro Level Over Error!\n"

◆ seqplayer_unused_string15

char seqplayer_unused_string15[] = "Audio:Track :Loops Macro Level Over Error!\n"

◆ seqplayer_unused_string16

char seqplayer_unused_string16[] = "SUB:ERR:BANK %d NOT CACHED.\n"

◆ seqplayer_unused_string17

char seqplayer_unused_string17[] = "SUB:ERR:BANK %d NOT CACHED.\n"

◆ seqplayer_unused_string18

char seqplayer_unused_string18[] = "Audio:Track: CTBLCALL Macro Level Over Error!\n"

◆ seqplayer_unused_string19

char seqplayer_unused_string19[] = "[%2x] \n"

◆ seqplayer_unused_string20

char seqplayer_unused_string20[] = "Err :Sub %x ,address %x:Undefined SubTrack Function %x"

◆ seqplayer_unused_string21

char seqplayer_unused_string21[] = "Disappear Sequence or Bank %d\n"

◆ seqplayer_unused_string22

char seqplayer_unused_string22[] = "Macro Level Over Error!\n"

◆ seqplayer_unused_string23

char seqplayer_unused_string23[] = "Macro Level Over Error!\n"

◆ seqplayer_unused_string24

char seqplayer_unused_string24[] = "Group:Undefine upper C0h command (%x)\n"

◆ seqplayer_unused_string25

char seqplayer_unused_string25[] = "Group:Undefined Command\n"