VR-Engage  2.2
Loading...
Searching...
No Matches
DtHumanAudioUpdater Class Reference

Detailed Description

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>

Inheritance diagram for DtHumanAudioUpdater:
[legend]

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 (float reloadTimer)
 
- Public Member Functions inherited from makVre::DtPlayerComponent
 DtPlayerComponent ()
 
virtual ~DtPlayerComponent ()
 
virtual bool postInitialize ()
 
virtual void setName (const std::string &name)
 
virtual const std::string & name ()
 
virtual DtPlayerStationplayer ()
 
virtual DtAttributeHandleplayerAttributeStore ()
 
virtual const DtAttributeHandleplayerAttributeStore () const
 

Protected Attributes

makAudio::DtSound * myParachuteFreefallSound
 
makAudio::DtSound * myParachuteOpenSound
 
makAudio::DtSound * myParachuteInteriorSound
 
makAudio::DtSound * myReloadSound
 
double myFreefallNormalSpeed
 
double myFreefallNormalVolume
 
makVre::DtSoundscapemySoundscape
 
double mySoundscapeVolume
 
makVre::HumanPosture myCachedPosture
 
- Protected Attributes inherited from makVre::DtPlayerComponent
std::string myName
 
DtInitTable myConfig
 
DtPlayerStationmyPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolvermyResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 

Additional Inherited Members

- Protected Member Functions inherited from makVre::DtPlayerComponent
virtual void initializeStateAttributes ()
 

Constructor & Destructor Documentation

◆ DtHumanAudioUpdater()

DtHumanAudioUpdater::DtHumanAudioUpdater ( )

Default constructor.

◆ ~DtHumanAudioUpdater()

virtual DtHumanAudioUpdater::~DtHumanAudioUpdater ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ initialize()

virtual bool DtHumanAudioUpdater::initialize ( makVre::DtPlayerStation * player,
makVre::DtInitTable & config )
overridevirtual

Initializes the audio updater.

Parameters
playerPointer to the player station
configConfiguration settings for initialization
Returns
True if initialization was successful, false otherwise

Reimplemented from makVre::DtPlayerComponent.

References makVre::DtPlayerComponent::player().

◆ tick()

virtual void DtHumanAudioUpdater::tick ( double dt)
overridevirtual

Updates audio effects for the current frame.

Parameters
dtDelta time since the last frame in seconds

Implements makVre::DtPlayerComponent.

◆ shutdown()

virtual void DtHumanAudioUpdater::shutdown ( )
overridevirtual

Cleans up resources when the component is being shut down.

Reimplemented from makVre::DtPlayerComponent.

◆ type()

virtual const char * DtHumanAudioUpdater::type ( ) const
overridevirtual

Returns the component type identifier.

Returns
String identifier for this component type

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.

◆ onReloadTimerChanged()

virtual void DtHumanAudioUpdater::onReloadTimerChanged ( float reloadTimer)
virtual

Handles changes in the weapon reload timer.

Parameters
reloadTimerCurrent value of the reload timer in seconds

Called when the weapon reload timer changes, to update reload sound effects

Member Data Documentation

◆ myParachuteFreefallSound

makAudio::DtSound* DtHumanAudioUpdater::myParachuteFreefallSound
protected

Sound played during parachute freefall.

◆ myParachuteOpenSound

makAudio::DtSound* DtHumanAudioUpdater::myParachuteOpenSound
protected

Sound played when parachute opens.

◆ myParachuteInteriorSound

makAudio::DtSound* DtHumanAudioUpdater::myParachuteInteriorSound
protected

Sound played when inside an open parachute.

◆ myReloadSound

makAudio::DtSound* DtHumanAudioUpdater::myReloadSound
protected

Sound played during weapon reload.

◆ myFreefallNormalSpeed

double DtHumanAudioUpdater::myFreefallNormalSpeed
protected

Normal speed for freefall sound playback.

◆ myFreefallNormalVolume

double DtHumanAudioUpdater::myFreefallNormalVolume
protected

Normal volume for freefall sound.

◆ mySoundscape

makVre::DtSoundscape* DtHumanAudioUpdater::mySoundscape
protected

Current environmental soundscape.

◆ mySoundscapeVolume

double DtHumanAudioUpdater::mySoundscapeVolume
protected

Volume of the current soundscape.

◆ myCachedPosture

makVre::HumanPosture DtHumanAudioUpdater::myCachedPosture
protected

Cached posture of the human entity.

Stored here so the open parachute sound can be triggered at the right time.


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