VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtSoundscape::Periodic Struct Reference

Detailed Description

Represents a sound that plays at random intervals from random positions within a configurable range.

#include <soundscape.h>

Public Member Functions

 Periodic (DtSoundscape *soundscape)
 
void update (double dt)
 

Public Attributes

makAudio::DtSound * sound
 
DtVector minRange
 
DtVector maxRange
 
float nextTime
 
float minDelay
 
float maxDelay
 
float minPitch
 
float maxPitch
 
DtSoundscapemySoundscape
 

Constructor & Destructor Documentation

◆ Periodic()

makVre::DtSoundscape::Periodic::Periodic ( DtSoundscape * soundscape)
inline

Constructor that initializes with parent soundscape reference.

Parameters
soundscapePointer to the parent soundscape

References makVre::DtSoundscape::DtSoundscape(), and mySoundscape.

Member Function Documentation

◆ update()

void makVre::DtSoundscape::Periodic::update ( double dt)

Updates the timer and triggers the sound when appropriate.

Parameters
dtTime elapsed since last update in seconds

Decrements the timer and when it reaches zero, plays the sound at a random position with random pitch, then resets the timer.

Member Data Documentation

◆ sound

makAudio::DtSound* makVre::DtSoundscape::Periodic::sound

The sound resource to play periodically.

◆ minRange

DtVector makVre::DtSoundscape::Periodic::minRange

Minimum position coordinates for random placement.

◆ maxRange

DtVector makVre::DtSoundscape::Periodic::maxRange

Maximum position coordinates for random placement.

◆ nextTime

float makVre::DtSoundscape::Periodic::nextTime

Time remaining until next sound trigger (seconds)

◆ minDelay

float makVre::DtSoundscape::Periodic::minDelay

Minimum delay between sound triggers (seconds)

◆ maxDelay

float makVre::DtSoundscape::Periodic::maxDelay

Maximum delay between sound triggers (seconds)

◆ minPitch

float makVre::DtSoundscape::Periodic::minPitch

Minimum pitch for random pitch selection.

◆ maxPitch

float makVre::DtSoundscape::Periodic::maxPitch

Maximum pitch for random pitch selection.

◆ mySoundscape

DtSoundscape* makVre::DtSoundscape::Periodic::mySoundscape

Reference to the parent soundscape for gain access.

Referenced by Periodic().


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