|
VR-Engage
2.3
|
DtHumanAudioUpdater handles the audio effects related to the human entity, such as parachute sounds, weapon reload sounds, and environment soundscapes. It controls the timing and volume of audio cues based on player state and actions.
#include <humanAudioUpdater.h>
Public Member Functions | |
| DtHumanAudioUpdater () | |
| virtual | ~DtHumanAudioUpdater () override |
| virtual bool | initialize (makVre::DtPlayerStation *player, makVre::DtInitTable &config) override |
| virtual void | tick (double dt) override |
| virtual void | shutdown () override |
| virtual const char * | type () const override |
| virtual void | onReloadTimerChanged (double reloadTimer) |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual bool | postInitialize () |
| bool | componentReady () const |
| void | setComponentReady (bool ready) |
| virtual DtInitTickStatus | finalizeInitTick (double dt) |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
| virtual const DtAttributeHandle & | ownshipState () const |
| virtual void | setExtendedData (const std::string &key, const std::string &value, DtEntityIdentifier entity=DtEntityIdentifier::nullId()) |
Protected Attributes | |
| makAudio::DtSound * | myParachuteFreefallSound |
| makAudio::DtSound * | myParachuteOpenSound |
| makAudio::DtSound * | myParachuteInteriorSound |
| makAudio::DtSound * | myReloadSound |
| bool | myReloadInProgress |
| double | myReloadSoundDelay |
| double | myReloadSoundTimer |
| double | myFreefallNormalSpeed |
| double | myFreefallNormalVolume |
| makVre::DtSoundscape * | mySoundscape |
| double | mySoundscapeVolume |
| makVre::HumanPosture | myCachedPosture |
| makVre::DtAttributeHandleType< makVre::HumanPosture > | myPostureAttr |
| makVre::DtAttributeHandleType< DtVector32 > | myVelocityAttr |
| makVre::DtAttributeHandleType< bool > | myEmbarkedOnAircraftAttr |
| makVre::DtAttributeHandleType< DtVector > | myPositionAttr |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| bool | myComponentReady = true |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
| DtVreMessageHandlerGroup | myMessageHandlers |
Additional Inherited Members | |
Protected Member Functions inherited from makVre::DtPlayerComponent | |
| virtual void | initializeStateAttributes () |
| DtHumanAudioUpdater::DtHumanAudioUpdater | ( | ) |
Default constructor.
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Initializes the audio updater.
| player | Pointer to the player station |
| config | Configuration settings for initialization |
Reimplemented from makVre::DtPlayerComponent.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Updates audio effects for the current frame.
| dt | Delta time since the last frame in seconds |
Implements makVre::DtPlayerComponent.
|
overridevirtual |
Cleans up resources when the component is being shut down.
Reimplemented from makVre::DtPlayerComponent.
|
overridevirtual |
Returns the component type identifier.
Returns the type identifier string for this component, which is used by the VR-Engage framework for component identification and management. The returned value matches DtHumanAudioUpdaterType.
Implements makVre::DtPlayerComponent.
|
virtual |
Handles changes in the weapon reload timer.
| reloadTimer | Current value of the reload timer in seconds |
Schedules the reload sound when a reload starts.
|
protected |
Sound played during parachute freefall.
|
protected |
Sound played when parachute opens.
|
protected |
Sound played when inside an open parachute.
|
protected |
Sound played shortly after a weapon reload starts.
|
protected |
Whether a weapon reload is currently in progress.
|
protected |
Delay before playing the reload sound, in seconds.
|
protected |
Remaining delay before the pending reload sound plays, in seconds.
|
protected |
Normal speed for freefall sound playback.
|
protected |
Normal volume for freefall sound.
|
protected |
Current environmental soundscape.
|
protected |
Volume of the current soundscape.
|
protected |
Cached posture of the human entity.
Stored here so the open parachute sound can be triggered at the right time.
|
protected |
Handle for current human posture.
| Attribute Store Key | posture |
|---|
|
protected |
Handle for ownship velocity.
| Attribute Store Key | ownship.velocity |
|---|
|
protected |
Handle indicating whether ownship is embarked on an aircraft.
| Attribute Store Key | ownship.embarked.embarkedOnAircraft |
|---|
|
protected |
Handle for ownship position.
| Attribute Store Key | ownship.position |
|---|