146 static int Find(
unsigned short id);
A program loaded into a bank, linked to its run of sample descriptors.
Definition bankprogram.h:12
A sample descriptor loaded into a bank, linked to the sample it plays.
Definition banksampledesc.h:12
static constexpr int kMaxSampleDescs
Definition bank.h:21
static constexpr int kMaxSamples
Definition bank.h:22
bool SetSample(Sample *sample, int index)
Store a sample.
BankSampleDesc * mSampleDescs[kMaxSampleDescs]
Definition bank.h:168
Sample * mSamples[kMaxSamples]
Definition bank.h:169
static void InitPools()
Allocate the shared pools.
static void NewProgram(BankProgram **program)
Take a program from the pool and Init() it.
void Clear()
Return every program, descriptor, and sample to the pools, then Init().
static constexpr int kMaxBanks
Definition bank.h:19
BankSampleDesc * GetSampleDesc(BankProgram *program, int index)
Look up one descriptor of a program's run.
static int Find(unsigned short id)
Find the loaded bank with an identifier.
unsigned int mSpuSize
Definition bank.h:171
static Bank sBanks[kMaxBanks]
Definition bank.h:173
void Init()
Reset the header, forget every program, descriptor, and sample, and mark the bank unloaded.
static void NewSample(Sample **sample)
Take a sample from the pool and Init() it.
static void NewSampleDesc(BankSampleDesc **sampleDesc)
Take a descriptor from the pool and Init() it.
static constexpr int kMaxPrograms
Definition bank.h:20
Bank()
Construct an empty, unloaded bank.
Definition bank.h:25
unsigned char mLoaded
Definition bank.h:165
BankProgram * GetProgram(int index)
Look up a program by slot.
static int ReleasePools()
Release the shared pools.
BankProgram * mPrograms[kMaxPrograms]
Definition bank.h:167
BankHeader mHeader
Definition bank.h:166
void SetSampleDesc(BankSampleDesc *sampleDesc, int index)
Store a descriptor and link it to its sample.
unsigned int mSpuAddress
Definition bank.h:170
void SetProgram(BankProgram *program, int index)
Store a program and point it at its run of descriptors.
A fixed-size allocator over one block of IOP memory.
Definition poolallocator.h:15
One waveform of a bank, as the bank file records it.
Definition sample.h:10