wavelength 1.0.0
Loading...
Searching...
No Matches
BankHeader Class Reference

Identity and mix settings of an instrument bank, as the bank file records them. More...

#include <bankheader.h>

Public Member Functions

 BankHeader ()
 Construct a header with the defaults Init() sets.
void Init ()
 Reset every field to its default.
int Unpack (const unsigned char *data)
 Read the header from a serialised record.
int Pack (unsigned char *data) const
 Write the header as a serialised record of the current version.
int PackedSize () const
 Report the size of a serialised record of the current version.

Public Attributes

unsigned short mId
unsigned char mVolume
unsigned short mNumPrograms

Detailed Description

Identity and mix settings of an instrument bank, as the bank file records them.

The class has no RTTI, and its name is inferred from its role. The serialised record is a version word followed by the fields in member order, with no padding.

Constructor & Destructor Documentation

◆ BankHeader()

BankHeader::BankHeader ( )

Construct a header with the defaults Init() sets.

Ghidra address:
NTSC-U/C: 0x00000000
Ghidra address:
PAL: 0x00000000

Member Function Documentation

◆ Init()

void BankHeader::Init ( )

Reset every field to its default.

Ghidra address:
NTSC-U/C: 0x00000028
Ghidra address:
PAL: 0x00000028

◆ Unpack()

int BankHeader::Unpack ( const unsigned char * data)

Read the header from a serialised record.

A record of an unknown version does not change the header.

Parameters
dataThe record, at any alignment.
Returns
The bytes consumed, four for an unknown version.
Ghidra address:
NTSC-U/C: 0x0000003c
Ghidra address:
PAL: 0x0000003c

◆ Pack()

int BankHeader::Pack ( unsigned char * data) const

Write the header as a serialised record of the current version.

Parameters
dataReceives the record, at any alignment.
Returns
The bytes written.
Ghidra address:
NTSC-U/C: 0x000000cc
Ghidra address:
PAL: 0x000000cc

◆ PackedSize()

int BankHeader::PackedSize ( ) const

Report the size of a serialised record of the current version.

Returns
The size in bytes.
Ghidra address:
NTSC-U/C: 0x00000124
Ghidra address:
PAL: 0x00000124

Member Data Documentation

◆ mId

unsigned short BankHeader::mId

Bank identifier a bank select requests.

◆ mVolume

unsigned char BankHeader::mVolume

Bank volume, an index into the volume curve.

◆ mNumPrograms

unsigned short BankHeader::mNumPrograms

Programs the bank defines.


The documentation for this class was generated from the following file: