Mario Kart 64
Loading...
Searching...
No Matches
libaudio_internal.h
Go to the documentation of this file.
1#ifndef _LIBAUDIO_INTERNAL_H_
2#define _LIBAUDIO_INTERNAL_H_
3#include <ultra64.h>
4#define AL_BANK_VERSION 0x4231 /* 'B1' */
5
6typedef u8 ALPan;
8
9/* Possible wavetable types */
11
12typedef struct {
16} ALRawLoop;
17
18typedef struct {
22 ADPCM_STATE state;
24
25typedef struct {
28 s16 book[1]; // variable size, 8-byte aligned
30
38
47
52
53typedef struct {
56
57typedef struct ALWaveTable_s {
58 u8* base; /* ptr to start of wave data */
59 s32 len; /* length of data in bytes */
60 u8 type; /* compression type */
61 u8 flags; /* offset/address flags */
62 union {
67
76
77typedef struct {
78 u8 volume; /* overall volume for this instrument */
79 ALPan pan; /* 0 = hard left, 127 = hard right */
80 u8 priority; /* voice priority for this instrument */
82 u8 tremType; /* the type of tremelo osc. to use */
83 u8 tremRate; /* the rate of the tremelo osc. */
84 u8 tremDepth; /* the depth of the tremelo osc */
85 u8 tremDelay; /* the delay for the tremelo osc */
86 u8 vibType; /* the type of tremelo osc. to use */
87 u8 vibRate; /* the rate of the tremelo osc. */
88 u8 vibDepth; /* the depth of the tremelo osc */
89 u8 vibDelay; /* the delay for the tremelo osc */
90 s16 bendRange; /* pitch bend range in cents */
91 s16 soundCount; /* number of sounds in this array */
92 ALSound* soundArray[1];
94
95typedef struct ALBank_s {
96 s16 instCount; /* number of programs in this bank */
99 s32 sampleRate; /* e.g. 44100, 22050, etc... */
100 ALInstrument* percussion; /* default percussion for GM */
101 ALInstrument* instArray[1]; /* ARRAY of instruments */
103
104typedef struct { /* Note: sizeof won't be correct */
105 s16 revision; /* format revision of this file */
106 s16 bankCount; /* number of banks */
107 ALBank* bankArray[1]; /* ARRAY of bank offsets */
108} ALBankFile;
109
110void alBnkfNew(ALBankFile* f, u8* table);
111#endif
s32 ALMicroTime
Definition libaudio_internal.h:7
u8 ALPan
Definition libaudio_internal.h:6
@ AL_ADPCM_WAVE
Definition libaudio_internal.h:10
@ AL_RAW16_WAVE
Definition libaudio_internal.h:10
struct ALWaveTable_s ALWaveTable
void alBnkfNew(ALBankFile *f, u8 *table)
Definition alBnkfNew.c:63
struct ALSound_s ALSound
struct ALBank_s ALBank
Definition libaudio_internal.h:25
s32 order
Definition libaudio_internal.h:26
s32 npredictors
Definition libaudio_internal.h:27
Definition libaudio_internal.h:48
ALADPCMBook * book
Definition libaudio_internal.h:50
ALADPCMloop * loop
Definition libaudio_internal.h:49
Definition libaudio_internal.h:18
u32 end
Definition libaudio_internal.h:20
ADPCM_STATE state
Definition libaudio_internal.h:22
u32 start
Definition libaudio_internal.h:19
u32 count
Definition libaudio_internal.h:21
Definition libaudio_internal.h:104
s16 bankCount
Definition libaudio_internal.h:106
s16 revision
Definition libaudio_internal.h:105
Definition libaudio_internal.h:95
s16 instCount
Definition libaudio_internal.h:96
ALInstrument * percussion
Definition libaudio_internal.h:100
ALInstrument * instArray[1]
Definition libaudio_internal.h:101
u8 pad
Definition libaudio_internal.h:98
u8 flags
Definition libaudio_internal.h:97
s32 sampleRate
Definition libaudio_internal.h:99
Definition libaudio_internal.h:31
ALMicroTime releaseTime
Definition libaudio_internal.h:34
ALMicroTime decayTime
Definition libaudio_internal.h:33
u8 decayVolume
Definition libaudio_internal.h:36
u8 attackVolume
Definition libaudio_internal.h:35
ALMicroTime attackTime
Definition libaudio_internal.h:32
Definition libaudio_internal.h:77
ALPan pan
Definition libaudio_internal.h:79
u8 vibType
Definition libaudio_internal.h:86
u8 tremType
Definition libaudio_internal.h:82
u8 tremDelay
Definition libaudio_internal.h:85
u8 priority
Definition libaudio_internal.h:80
u8 vibDepth
Definition libaudio_internal.h:88
u8 vibRate
Definition libaudio_internal.h:87
s16 bendRange
Definition libaudio_internal.h:90
u8 tremRate
Definition libaudio_internal.h:83
u8 vibDelay
Definition libaudio_internal.h:89
u8 volume
Definition libaudio_internal.h:78
s16 soundCount
Definition libaudio_internal.h:91
u8 tremDepth
Definition libaudio_internal.h:84
u8 flags
Definition libaudio_internal.h:81
Definition libaudio_internal.h:39
u8 keyMin
Definition libaudio_internal.h:42
s8 detune
Definition libaudio_internal.h:45
u8 keyMax
Definition libaudio_internal.h:43
u8 velocityMin
Definition libaudio_internal.h:40
u8 velocityMax
Definition libaudio_internal.h:41
u8 keyBase
Definition libaudio_internal.h:44
Definition libaudio_internal.h:53
ALRawLoop * loop
Definition libaudio_internal.h:54
Definition libaudio_internal.h:12
u32 start
Definition libaudio_internal.h:13
u32 end
Definition libaudio_internal.h:14
u32 count
Definition libaudio_internal.h:15
Definition libaudio_internal.h:68
u8 flags
Definition libaudio_internal.h:74
ALPan samplePan
Definition libaudio_internal.h:72
ALWaveTable * wavetable
Definition libaudio_internal.h:71
u8 sampleVolume
Definition libaudio_internal.h:73
ALEnvelope * envelope
Definition libaudio_internal.h:69
ALKeyMap * keyMap
Definition libaudio_internal.h:70
Definition libaudio_internal.h:57
ALRAWWaveInfo rawWave
Definition libaudio_internal.h:64
s32 len
Definition libaudio_internal.h:59
u8 * base
Definition libaudio_internal.h:58
union ALWaveTable_s::@12 waveInfo
ALADPCMWaveInfo adpcmWave
Definition libaudio_internal.h:63
u8 flags
Definition libaudio_internal.h:61
u8 type
Definition libaudio_internal.h:60
signed int s32
Definition ultratypes.h:15
unsigned int u32
Definition ultratypes.h:16
signed char s8
Definition ultratypes.h:11
signed short int s16
Definition ultratypes.h:13
unsigned char u8
Definition ultratypes.h:12