Xeno-rat
Loading...
Searching...
No Matches
NAudio.SoundFont.ZoneBuilder Class Reference
Inheritance diagram for NAudio.SoundFont.ZoneBuilder:
Collaboration diagram for NAudio.SoundFont.ZoneBuilder:

Public Member Functions

override Zone Read (BinaryReader br)
 Reads a Zone from the provided BinaryReader and returns the read Zone.
 
override void Write (BinaryWriter bw, Zone zone)
 Writes the data to the specified binary writer for the given zone.
 
void Load (Modulator[] modulators, Generator[] generators)
 Loads the modulators and generators into the specified zones.
 

Properties

Zone[] Zones [get]
 
override int Length [get]
 

Private Attributes

Zone lastZone = null
 

Member Function Documentation

◆ Load()

void NAudio.SoundFont.ZoneBuilder.Load ( Modulator[] modulators,
Generator[] generators )
inline

Loads the modulators and generators into the specified zones.

Parameters
modulatorsAn array of modulators to be loaded.
generatorsAn array of generators to be loaded.
Exceptions
IndexOutOfRangeExceptionThrown when the zone index is out of range.

This method loads the specified modulators and generators into each zone, excluding the last zone, which is simply End of Zone (EOZ). It iterates through each zone, copies the corresponding generators and modulators into the zone, and then removes the End of Program (EOP) record.

◆ Read()

override Zone NAudio.SoundFont.ZoneBuilder.Read ( BinaryReader br)
inline

Reads a Zone from the provided BinaryReader and returns the read Zone.

Parameters
brThe BinaryReader to read the Zone from.
Returns
The Zone read from the BinaryReader.

This method reads a Zone from the provided BinaryReader. It reads the generatorIndex and modulatorIndex from the BinaryReader and populates the lastZone's generatorCount and modulatorCount if lastZone is not null. It then adds the read Zone to the data list and sets lastZone to the read Zone before returning it.

◆ Write()

override void NAudio.SoundFont.ZoneBuilder.Write ( BinaryWriter bw,
Zone zone )
inline

Writes the data to the specified binary writer for the given zone.

Parameters
bwThe binary writer to write the data to.
zoneThe zone for which the data is being written.

This method is responsible for writing the data to the specified binary writer for the given zone. The specific data to be written and the format of writing may vary based on the implementation of this method in derived classes.

Member Data Documentation

◆ lastZone

Zone NAudio.SoundFont.ZoneBuilder.lastZone = null
private

Property Documentation

◆ Length

override int NAudio.SoundFont.ZoneBuilder.Length
get

◆ Zones

Zone [] NAudio.SoundFont.ZoneBuilder.Zones
get

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