Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Data Structures | Macros | Functions | Variables
synthesis.c File Reference
#include <ultra64.h>
#include <macros.h>
#include "synthesis.h"
#include "memory.h"
#include "data.h"
#include "load.h"
#include "seqplayer.h"
#include "external.h"

Data Structures

struct  VolumeChange
 

Macros

#define aSetLoadBufferPair(pkt, c, off)
 
#define aSetSaveBufferPair(pkt, c, d, off)
 
#define ALIGN(val, amnt)   (((val) + (1 << amnt) - 1) & ~((1 << amnt) - 1))
 
#define FIX(a)   (u16 *) ((u8 *) (a) + 0x80000000U)
 

Functions

u64func_80313E54 (u16 *aiBuf, s32 bufLen, u64 *cmd, u32 updateIndex)
 
u64func_80314480 (u16 *aiBuf, s32 arg1, u64 *cmd)
 
u64func_80314F08 (u64 *cmd, struct Note *note, s32 arg2)
 
u64func_80314FD4 (u64 *cmd, struct Note *note, s32 arg2, u16 arg3, u16 arg4, u32 arg5)
 
u64func_80315030 (u64 *cmd, struct Note *note, s32 arg2, u16 arg3, s32 arg4, u32 arg5)
 
u64func_80315094 (u64 *cmd, struct Note *note, s32 arg2, u16 arg3, s32 arg4, struct VolumeChange *vol)
 
u64func_803155F4 (u64 *cmd, struct Note *note, s32 arg2, s32 arg3, s32 arg4)
 
void func_80313920 (s32 arg0, u32 updateIndex)
 
s32 get_volume_ramping (u16 sourceVol, u16 targetVol, s32 arg2)
 
u64func_80313CD4 (u64 *cmdBuf, s32 *writtenCmds, u16 *aiBuf, s32 bufLen)
 
u64func_80315030 (u64 *cmd, struct Note *note, s32 arg2, u16 arg3, s32 arg4, UNUSED u32 arg5)
 
void note_init_volume (struct Note *note)
 
void note_set_vel_pan_reverb (struct Note *note, f32 velocity, f32 pan, u8 reverb)
 
void note_set_frequency (struct Note *note, f32 frequency)
 
void note_enable (struct Note *note)
 
void note_disable (struct Note *note)
 

Variables

struct Struct802211B0 D_802211B0
 
u8 sAudioSynthesisPad [0x20]
 

Macro Definition Documentation

◆ ALIGN

#define ALIGN (   val,
  amnt 
)    (((val) + (1 << amnt) - 1) & ~((1 << amnt) - 1))

◆ aSetLoadBufferPair

#define aSetLoadBufferPair (   pkt,
  c,
  off 
)
Value:
aSetBuffer(pkt, 0, c + 0x740, 0, 0x140 - c); \
aLoadBuffer(pkt, FIX(&D_802211B0.unk14.unk00[off])); \
aSetBuffer(pkt, 0, c + 0x880, 0, 0x140 - c); \
aLoadBuffer(pkt, FIX(&D_802211B0.unk14.unk04[off]));
#define FIX(a)
Definition: synthesis.c:24
s16 * unk00
Definition: synthesis.h:31
s16 * unk04
Definition: synthesis.h:32
struct Struct802211B0 D_802211B0
Definition: synthesis.c:26
struct Struct802211B0::@9 unk14

◆ aSetSaveBufferPair

#define aSetSaveBufferPair (   pkt,
  c,
  d,
  off 
)
Value:
aSetBuffer(pkt, 0, 0, c + 0x740, d); \
aSaveBuffer(pkt, FIX(&D_802211B0.unk14.unk00[off])); \
aSetBuffer(pkt, 0, 0, c + 0x880, d); \
aSaveBuffer(pkt, FIX(&D_802211B0.unk14.unk04[off]));
#define FIX(a)
Definition: synthesis.c:24
s16 * unk00
Definition: synthesis.h:31
s16 * unk04
Definition: synthesis.h:32
struct Struct802211B0 D_802211B0
Definition: synthesis.c:26
struct Struct802211B0::@9 unk14

◆ FIX

#define FIX (   a)    (u16 *) ((u8 *) (a) + 0x80000000U)

Function Documentation

◆ func_80313920()

void func_80313920 ( s32  arg0,
u32  updateIndex 
)

◆ func_80313CD4()

u64* func_80313CD4 ( u64 cmdBuf,
s32 writtenCmds,
u16 aiBuf,
s32  bufLen 
)

◆ func_80313E54()

u64 * func_80313E54 ( u16 aiBuf,
s32  bufLen,
u64 cmd,
u32  updateIndex 
)

◆ func_80314480()

u64 * func_80314480 ( u16 aiBuf,
s32  arg1,
u64 cmd 
)

◆ func_80314F08()

u64 * func_80314F08 ( u64 cmd,
struct Note note,
s32  arg2 
)

◆ func_80314FD4()

u64 * func_80314FD4 ( u64 cmd,
struct Note note,
s32  arg2,
u16  arg3,
u16  arg4,
u32  arg5 
)

◆ func_80315030() [1/2]

u64* func_80315030 ( u64 cmd,
struct Note note,
s32  arg2,
u16  arg3,
s32  arg4,
u32  arg5 
)

◆ func_80315030() [2/2]

u64* func_80315030 ( u64 cmd,
struct Note note,
s32  arg2,
u16  arg3,
s32  arg4,
UNUSED u32  arg5 
)

◆ func_80315094()

u64 * func_80315094 ( u64 cmd,
struct Note note,
s32  arg2,
u16  arg3,
s32  arg4,
struct VolumeChange vol 
)

◆ func_803155F4()

u64 * func_803155F4 ( u64 cmd,
struct Note note,
s32  arg2,
s32  arg3,
s32  arg4 
)

◆ get_volume_ramping()

s32 get_volume_ramping ( u16  sourceVol,
u16  targetVol,
s32  arg2 
)

◆ note_disable()

void note_disable ( struct Note note)

◆ note_enable()

void note_enable ( struct Note note)

◆ note_init_volume()

void note_init_volume ( struct Note note)

◆ note_set_frequency()

void note_set_frequency ( struct Note note,
f32  frequency 
)

◆ note_set_vel_pan_reverb()

void note_set_vel_pan_reverb ( struct Note note,
f32  velocity,
f32  pan,
u8  reverb 
)

Variable Documentation

◆ D_802211B0

struct Struct802211B0 D_802211B0

◆ sAudioSynthesisPad

u8 sAudioSynthesisPad[0x20]