![]() |
Umsci
Upmix Spatial Control Interface — OCA/OCP.1 spatial audio utility
|
Persists all Umsci user settings to an XML file via the JUCEAppBasics::AppConfigurationBase framework.
More...
#include <UmsciAppConfiguration.h>
Inheritance diagram for UmsciAppConfiguration:
Collaboration diagram for UmsciAppConfiguration:Public Types | |
| enum | TagID { CONNECTIONCONFIG , VISUCONFIG , CONTROLCOLOUR , LOOKANDFEEL , CONTROLCONFIG , CONTROLFORMAT , UPMIXCONFIG , CONTROLSIZE , EXTERNALCONTROLCONFIG , MIDIINPUTDEVICE , MIDI_UPMIXROT , MIDI_UPMIXSCALE , MIDI_UPMIXHEIGHTSCALE , MIDI_UPMIXANGLESTRETCH , MIDI_UPMIXOFFSETX , MIDI_UPMIXOFFSETY , UPMIXSNAPSHOTCONFIG , OSCINPUTPORT , OSC_UPMIXROT , OSC_UPMIXSCALE , OSC_UPMIXHEIGHTSCALE , OSC_UPMIXANGLESTRETCH , OSC_UPMIXOFFSETX , OSC_UPMIXOFFSETY } |
| Enumerates every XML element tag used in the config file. More... | |
| enum | AttributeID { ENABLED , IP , PORT , IOSIZE , UPMIXSOURCESTARTID , UPMIXLIVEMODE , UPMIXSHAPE , UPMIXSHOWALLSOURCES } |
| Enumerates every XML attribute name used within config elements. More... | |
Public Member Functions | |
| UmsciAppConfiguration (const File &file) | |
| ~UmsciAppConfiguration () override | |
| bool | isValid () override |
| Returns true if the XML file exists and contains the expected root tags. | |
| bool | ResetToDefault () |
| Overwrites all settings with built-in defaults and triggers a dump. | |
Static Public Member Functions | |
| static juce::String | getTagName (TagID ID) |
| static juce::String | getAttributeName (AttributeID ID) |
| static bool | isValid (const std::unique_ptr< juce::XmlElement > &xmlConfig) |
| Static overload for validating a pre-loaded XmlElement without an instance. | |
Protected Member Functions | |
| bool | HandleConfigVersionConflict (const Version &configVersionFound) override |
Called by the base class when the config file's version string does not match Umsci_CONFIG_VERSION. Currently discards the old file and resets to defaults rather than attempting migration. | |
Persists all Umsci user settings to an XML file via the JUCEAppBasics::AppConfigurationBase framework.
| Tag (TagID) | Contents |
|---|---|
| CONNECTIONCONFIG | IP, port, I/O size (enabled flag, target address). |
| VISUCONFIG | Look-and-feel style, control colour. |
| CONTROLCOLOUR | Packed colour value for source/speaker icons. |
| LOOKANDFEEL | LookAndFeel variant index. |
| CONTROLCONFIG | Control size (S/M/L). |
| CONTROLFORMAT | Upmix channel format (e.g. 5.1, 7.1.4). |
| UPMIXCONFIG | Start source ID, live mode, shape, show-all-sources flag. |
| CONTROLSIZE | Icon size override. |
| UPMIXROT | Upmix ring rotation (float). |
| UPMIXSCALE | Upmix ring radial scale (float). |
| UPMIXHEIGHTSCALE | Upmix height ring scale relative to floor ring (float). |
| UPMIXANGLESTRETCH | Upmix angular stretch factor (float). |
| UPMIXOFFSETX/Y | Upmix ring X/Y centre offset (float each). |
MainComponent owns the single instance, registered as both Dumper and Watcher so that settings are written on change and re-applied on external file updates.
Definition at line 54 of file UmsciAppConfiguration.h.
Enumerates every XML attribute name used within config elements.
Definition at line 144 of file UmsciAppConfiguration.h.
Enumerates every XML element tag used in the config file.
Definition at line 59 of file UmsciAppConfiguration.h.
|
explicit |
Definition at line 22 of file UmsciAppConfiguration.cpp.
References Umsci_CONFIG_VERSION.
|
override |
Definition at line 28 of file UmsciAppConfiguration.cpp.
|
inlinestatic |
Definition at line 155 of file UmsciAppConfiguration.h.
References ENABLED, IOSIZE, IP, PORT, UPMIXLIVEMODE, UPMIXSHAPE, UPMIXSHOWALLSOURCES, and UPMIXSOURCESTARTID.
Referenced by UmsciControlComponent::createStateXml(), isValid(), MainComponent::onConfigUpdated(), MainComponent::performConfigurationDump(), and UmsciControlComponent::setStateXml().
|
inlinestatic |
Definition at line 86 of file UmsciAppConfiguration.h.
References CONNECTIONCONFIG, CONTROLCOLOUR, CONTROLCONFIG, CONTROLFORMAT, CONTROLSIZE, EXTERNALCONTROLCONFIG, LOOKANDFEEL, MIDI_UPMIXANGLESTRETCH, MIDI_UPMIXHEIGHTSCALE, MIDI_UPMIXOFFSETX, MIDI_UPMIXOFFSETY, MIDI_UPMIXROT, MIDI_UPMIXSCALE, MIDIINPUTDEVICE, OSC_UPMIXANGLESTRETCH, OSC_UPMIXHEIGHTSCALE, OSC_UPMIXOFFSETX, OSC_UPMIXOFFSETY, OSC_UPMIXROT, OSC_UPMIXSCALE, OSCINPUTPORT, UPMIXCONFIG, UPMIXSNAPSHOTCONFIG, and VISUCONFIG.
Referenced by UmsciControlComponent::createStateXml(), isValid(), MainComponent::onConfigUpdated(), MainComponent::performConfigurationDump(), and UmsciControlComponent::setStateXml().
|
overrideprotected |
Called by the base class when the config file's version string does not match Umsci_CONFIG_VERSION. Currently discards the old file and resets to defaults rather than attempting migration.
Definition at line 149 of file UmsciAppConfiguration.cpp.
References ResetToDefault(), and Umsci_CONFIG_VERSION.
|
override |
Returns true if the XML file exists and contains the expected root tags.
Definition at line 32 of file UmsciAppConfiguration.cpp.
References isValid().
Referenced by isValid(), and ResetToDefault().
|
static |
Static overload for validating a pre-loaded XmlElement without an instance.
Definition at line 37 of file UmsciAppConfiguration.cpp.
References CONNECTIONCONFIG, CONTROLCOLOUR, CONTROLCONFIG, getAttributeName(), getTagName(), IOSIZE, IP, LOOKANDFEEL, PORT, UPMIXCONFIG, UPMIXLIVEMODE, UPMIXSHAPE, UPMIXSOURCESTARTID, and VISUCONFIG.
| bool UmsciAppConfiguration::ResetToDefault | ( | ) |
Overwrites all settings with built-in defaults and triggers a dump.
Definition at line 106 of file UmsciAppConfiguration.cpp.
References isValid().
Referenced by HandleConfigVersionConflict().