|
VR-Engage
2.2
|
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 (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 DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
Protected Attributes | |
| makAudio::DtSound * | myParachuteFreefallSound |
| makAudio::DtSound * | myParachuteOpenSound |
| makAudio::DtSound * | myParachuteInteriorSound |
| makAudio::DtSound * | myReloadSound |
| double | myFreefallNormalSpeed |
| double | myFreefallNormalVolume |
| makVre::DtSoundscape * | mySoundscape |
| double | mySoundscapeVolume |
| makVre::HumanPosture | myCachedPosture |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
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 |
Called when the weapon reload timer changes, to update reload sound effects
|
protected |
Sound played during parachute freefall.
|
protected |
Sound played when parachute opens.
|
protected |
Sound played when inside an open parachute.
|
protected |
Sound played during weapon reload.
|
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.