VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
makVrv::DtProceduralSoundCreator Class Referenceabstract

Abstract factory interface for creating a named DtProceduralSound.

Toolkit plugin developers subclass DtProceduralSoundCreator and register an instance with DtProceduralSoundFactory to make a new procedural sound available under a key string.

Example:

class DtForestSoundCreator : public DtProceduralSoundCreator
{
public:
DtProceduralSound* create(DtDe& de, DtUniqueID id) override
{
auto* sc = new DtProceduralSound(de, id);
auto& birds = sc->addLayer("birds");
birds.addClip(de.dePathConfiguration().resolvePath(
"$(SHARED_DATA_DIR)/Audio/soundscapes/Forest/bird_chirp1.wav"), 2.0f);
birds.setDensity(1.5f);
birds.setGainRange(0.05f, 1.0f);
birds.setPitchRange(0.93f, 1.07f);
return sc;
}
};
// At startup:
"Forest", new DtForestSoundCreator);
Inheritance diagram for makVrv::DtProceduralSoundCreator:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtProceduralSoundCreator ()=default
 
virtual DtProceduralSound * create (DtDe &de, DtUniqueID id)=0
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Constructor & Destructor Documentation

virtual makVrv::DtProceduralSoundCreator::~DtProceduralSoundCreator ( )
virtualdefault

Member Function Documentation

virtual DtProceduralSound* makVrv::DtProceduralSoundCreator::create ( DtDe &  de,
DtUniqueID  id 
)
pure virtual

Construct and configure a new DtProceduralSound.

The caller (DtProceduralSoundFactory) takes ownership of the returned pointer. Implementations should add layers, clips, and density/gain/pitch parameters here and return the configured object. The sound must NOT be started (play() must not be called) - the DtProceduralSoundPlayer owns playback lifetime.

Parameters
deThe display engine context; use for path resolution and any VRV service lookups.
idA unique ID for the underlying DtSound; generated by the factory from an atomic counter, same pattern as ambient sounds.

Implemented in makVrv::DtForestSoundCreator.


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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)