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

Public Member Functions

override Preset Read (BinaryReader br)
 Reads and returns a Preset object from the provided BinaryReader.
 
override void Write (BinaryWriter bw, Preset preset)
 Writes the preset data to the specified binary writer.
 
void LoadZones (Zone[] presetZones)
 Loads the preset zones into the data and removes the last preset zone, which is simply EOP.
 

Properties

override int Length [get]
 
Preset[] Presets [get]
 

Private Attributes

Preset lastPreset = null
 

Member Function Documentation

◆ LoadZones()

void NAudio.SoundFont.PresetBuilder.LoadZones ( Zone[] presetZones)
inline

Loads the preset zones into the data and removes the last preset zone, which is simply EOP.

Parameters
presetZonesAn array of preset zones to be loaded.

This method loads the preset zones into the data, excluding the last preset zone, which is simply EOP. It iterates through the preset zones and assigns them to the corresponding presets in the data. The method then removes the EOP record from the data.

◆ Read()

override Preset NAudio.SoundFont.PresetBuilder.Read ( BinaryReader br)
inline

Reads and returns a Preset object from the provided BinaryReader.

Parameters
brThe BinaryReader used to read the Preset object.
Returns
The Preset object read from the BinaryReader.

This method reads a Preset object from the provided BinaryReader by reading various properties such as Name, PatchNumber, Bank, startPresetZoneIndex, library, genre, and morphology. If the lastPreset is not null, it updates the endPresetZoneIndex of the lastPreset. The read Preset object is added to the data collection and becomes the lastPreset.

◆ Write()

override void NAudio.SoundFont.PresetBuilder.Write ( BinaryWriter bw,
Preset preset )
inline

Writes the preset data to the specified binary writer.

Parameters
bwThe binary writer to write the data to.
presetThe preset data to be written.

Member Data Documentation

◆ lastPreset

Preset NAudio.SoundFont.PresetBuilder.lastPreset = null
private

Property Documentation

◆ Length

override int NAudio.SoundFont.PresetBuilder.Length
get

◆ Presets

Preset [] NAudio.SoundFont.PresetBuilder.Presets
get

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