![]() |
VR-Forces Developer's Guide
|
Owns a single one-layer procedural-sound audition on behalf of DtProceduralSoundsSettingsWidget.
Builds a DtProceduralSound wrapping just the selected layer, ticks it at ~30 Hz via a QTimer, and forwards live gain/pitch/scheduling changes into the running stream so the user hears property edits immediately.
Emits signal_playbackStateChanged() when the play/stop state flips so the settings widget can update its Play/Stop button text.

Signals | |
| void | signal_playbackStateChanged (bool playing) |
Public Member Functions | |
| DtProceduralSoundLayerPlayer (DtDe &de, QObject *parent=nullptr) | |
| virtual | ~DtProceduralSoundLayerPlayer () |
| void | startPreview (const DtProceduralLayerConfig &layer) |
| void | stopPreview () |
| void | refreshLiveParameters (const DtProceduralLayerConfig &layer) |
| bool | isPlaying () const |
Private Slots | |
| void | slot_onTick () |
Private Attributes | |
| DtDe & | myDe |
| DtProceduralLayerConfig | myCurrentLayer |
| DtProceduralSound * | myPreviewSound |
| QTimer * | myTickTimer |
|
explicit |
CTOR.
| de | Display engine used to reach DtAudioManager. |
| parent | Optional QObject parent (typically the settings widget). |
|
virtual |
DTOR. Stops any active preview before destruction.
| void makVrv::DtProceduralSoundLayerPlayer::startPreview | ( | const DtProceduralLayerConfig & | layer | ) |
Start a preview of layer. Stops any prior preview first.
No-op if the layer has zero clips or if the audio playback device fails to initialize.
| layer | Layer configuration to audition. |
| void makVrv::DtProceduralSoundLayerPlayer::stopPreview | ( | ) |
Stop any active preview and release the underlying stream.
| void makVrv::DtProceduralSoundLayerPlayer::refreshLiveParameters | ( | const DtProceduralLayerConfig & | layer | ) |
Push a live property update to a running preview. Does nothing when no preview is active.
| layer | Latest layer configuration; only gain/pitch/rate fields are applied to the live stream. |
| bool makVrv::DtProceduralSoundLayerPlayer::isPlaying | ( | ) | const |
Return true when a preview is currently playing.
|
signal |
Emitted when the play/stop state flips.
| playing | true when a preview just started, false when stopped. |
|
privateslot |
Periodic tick slot (QTimer, ~30 Hz) driving DtProceduralSound::tick().
|
private |
Display engine reference (borrowed).
|
private |
Copy of the currently-playing layer configuration.
|
private |
nullptr when not playing.
|
private |
Drives slot_onTick() at ~30 Hz.