ModuleConfig

Module and audio routin configurator. Loads an SDL file, then configures the modules and sets up their routing, presets, etc. See modulesetup.md on documentation about how the format works internally.

Constructors

this
this(string src, ModuleManager manager)

Loads an audio configuration, and parses it. Does not automatically compile it.

this
this(ModuleManager manager)

Creates an empty audio configuration, e.g. for editors.

Members

Functions

addModule
void addModule(string type, string name)

Adds a new module to the configuration.

addModule
void addModule(Tag backup)

Adds a module from backup.

addPreset
void addPreset(string modID, Tag backup)

Adds a preset to the configuration either from a backup or an import.

addRouting
void addRouting(string from, string to)

Adds a routing to the audio configuration. Automatically creates nodes if names are not recognized either as module ports or audio outputs.

compile
void compile(bool isRunning)

Compiles the current configuration, then configures the modules accordingly.

editPresetParameter
void editPresetParameter(string modID, int presetID, Value paramID, Value value, Value backup, string name)

Edits a preset parameter.

getModule
AudioModule getModule(string name)

Returns the module with the given name, or null if not found.

getModuleList
string[2][] getModuleList()

Returns a list of modules.

getPresetList
auto getPresetList(string modID)

Returns the list of presets associated with the module identified by modID.

getRoutingTable
string[2][] getRoutingTable()

Returns the routing table of this audio configuration as an array of pairs of strings.

loadAudioFile
void loadAudioFile(string modID, int waveID, string path, string dataPak)

Loads an audio file into the given audio module. This function is external, with the intent of being able to alter default voicebanks for e.g. mods, localizations, etc.

loadAudioFile
void loadAudioFile(AudioModule mod, int waveID, string path, string dataPak)

Loads an audio file into the given audio module.

loadConfig
void loadConfig(string src)

Loads a configuration file from text.

loadConfigFromFile
void loadConfigFromFile(string path)

Loads a configuration file from file

loadVocFile
void loadVocFile(AudioModule mod, int waveID, string path, string dataPak)

Loads a Dialogic ADPCM (voc) file into a module.

loadWaveFile
void loadWaveFile(AudioModule mod, int waveID, string path, string dataPak)

Loads a Microsoft Wave (wav) file into a module.

removeModule
Tag removeModule(string name)

Removes a module from the configuration.

removePreset
Tag removePreset(string modID, int presetID)

Removes a preset from the configuration.

removeRouting
bool removeRouting(string from, string to)

Removes a routing from the audio configuration.

renameModule
void renameModule(string oldName, string newName)

Renames a module.

save
void save(string path)

Saves the configuration into a file.

Static variables

outChannelNames
string[] outChannelNames;

Registered output channel names.

Structs

RoutingNode
struct RoutingNode

Defines a routing node. Can contain multiple inputs and outputs.

Variables

manager
ModuleManager manager;

The target for audio handling.

midiGroups
ubyte[] midiGroups;

Group identifiers for tracks.

midiRouting
uint[] midiRouting;

Track routing for MIDI devices.

modNames
string[] modNames;

The names of the modules.

modules
AudioModule[] modules;

The audio modules stored by this configuration.

rns
RoutingNode[] rns;

Routing nodes that have been parsed so far.

root
Tag root;

Stores most of the document data here when uncompiled.

Meta