![]() |
VR-Forces Developer's Guide
|
Manages persistence of the procedural sound configuration list.
A per-DtDe singleton that stores DtProceduralSoundConfig entries, persists them to a .psndx settings file, and propagates changes to DtProceduralSoundFactory (the runtime factory).
The Forest sound is provided as a factory default so that it appears in the editor even before a user-saved file exists. The hardcoded DtForestSoundCreator class is no longer registered by vrvAudio::init(); this manager is the single source of truth for all procedural sounds.

Public Member Functions | |
| virtual | ~DtProceduralSoundsSettingsManager () |
Sound config accessors | |
| virtual void | setSounds (const std::vector< DtProceduralSoundConfig > &sounds) |
| virtual const std::vector < DtProceduralSoundConfig > & | sounds () const |
| virtual void | pushSoundsToRuntime () |
Inherited from DtBaseSettingsManager | |
| virtual void | setFromRecord (const DtProceduralSoundsSettingsRecord &rec) |
| virtual void | getRecord (DtProceduralSoundsSettingsRecord &rec) const |
Public Member Functions inherited from makVrv::DtBaseSettingsManager< DtProceduralSoundsSettingsRecord > | |
| DtBaseSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext) | |
| virtual | ~DtBaseSettingsManager () |
| virtual void | initializeBackup () |
| virtual bool | getOverriddenFactoryRecord (DtProceduralSoundsSettingsRecord &record) const |
Public Member Functions inherited from makVrv::DtCommonBaseSettingsManager< DtProceduralSoundsSettingsRecord > | |
| DtCommonBaseSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext) | |
| virtual | ~DtCommonBaseSettingsManager () |
| virtual void | autoSaveIfNecessary () |
| virtual void | setAutoSave (bool doit) |
| virtual bool | autoSave () const |
| virtual void | setUseDefaultSettingsRecord (bool useit) |
| virtual bool | useDefaultSettingsRecord () const |
| virtual DtDeSettings * | settings () |
| virtual const DtDeSettings * | settings () const |
| virtual DtSettingsBackup * | settingsBackup () |
| virtual const DtSettingsBackup * | settingsBackup () const |
| virtual void | loadDefaults () |
| virtual void | saveDefaultSettings () |
| virtual void | loadDefaultSettings (bool loadOnlyFactorySettings) |
| virtual void | importSettings (const std::string &filePath) |
| virtual void | exportSettings (const std::string &filePath) const |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtProceduralSoundsSettingsManager & | instance (DtDe &de) |
| static void | registerInstance (DtDe &de, DtProceduralSoundsSettingsManager *mgr) |
| static const std::string & | theClassName () |
Public Attributes | |
| boost::signalslib::signal < void(const std::vector < DtProceduralSoundConfig > &)> | signal_soundsChanged |
Protected Member Functions | |
| DtProceduralSoundsSettingsManager (DtDe &de) | |
| virtual void | slot_postInitialize () |
| virtual bool | applyFactoryOverrides (DtProceduralSoundsSettingsRecord &rec) const |
Protected Attributes | |
| std::vector < DtProceduralSoundConfig > | mySounds |
Protected Attributes inherited from makVrv::DtCommonBaseSettingsManager< DtProceduralSoundsSettingsRecord > | |
| DtSignalConnectionManager | myConnections |
| std::string | myName |
| std::string | myExtension |
| std::string | myDisplayName |
| bool | myUseDefaultSettingsRecordFlag |
| bool | myAutoSaveFlag |
| DtSettingsBackup * | mySettingsBackup |
| DtDe & | myDe |
Additional Inherited Members | |
Protected Types inherited from makVrv::DtBaseSettingsManager< DtProceduralSoundsSettingsRecord > | |
| typedef DtRecordSettingsBackup < DtBaseSettingsManager < DtProceduralSoundsSettingsRecord > , DtProceduralSoundsSettingsRecord > | RecordBackupType |
|
virtual |
Virtual DTOR.
|
explicitprotected |
Protected CTOR - use instance().
|
static |
Get-or-create the singleton for de.
|
static |
Register a custom subclass (must be called before the first instance()).
|
static |
Class name used for DtDe registration.
|
virtual |
Replace the entire sound config list. Fires signal_soundsChanged, pushes to runtime, and auto-saves.
|
virtual |
Get the current sound config list.
|
virtual |
Register all current configs with DtProceduralSoundFactory. Safe to call at any time after DtProceduralSoundFactory::instance() has been created.
|
virtual |
Apply a deserialized settings record to this manager.
| rec | The record loaded from a .psndx file. Replaces the current sound config list, fires signal_soundsChanged, and calls pushSoundsToRuntime(). |
Implements makVrv::DtBaseSettingsManager< DtProceduralSoundsSettingsRecord >.
|
virtual |
Populate rec with the current manager state for serialization.
| rec | Output record to write into. |
Implements makVrv::DtBaseSettingsManager< DtProceduralSoundsSettingsRecord >.
|
protectedvirtual |
Slot connected to DtDe::signal_postInitialize by vrvAudio::init().
Calls loadDefaults() to apply saved (or factory-default) settings, then pushSoundsToRuntime() to register all configured sounds with DtProceduralSoundFactory.
|
protectedvirtual |
Get overrides to the factory record, if any. If there are overrides, this function returns true. This is an internal utility function used by VR-Vantage engineers to update factory defaults. As a result, this function returns false in releases but can be overriden by toolkit users if desired; however, generally toolkit users can and should use DtDeInitializer::addDefaultSettingsRecord(...) instead.
Implements makVrv::DtBaseSettingsManager< DtProceduralSoundsSettingsRecord >.
| boost::signalslib::signal<void (const std::vector<DtProceduralSoundConfig>&)> makVrv::DtProceduralSoundsSettingsManager::signal_soundsChanged |
Emitted whenever the sound config list changes.
|
protected |