VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtWindSoundBehavior.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
16 
17 #include <atomic>
18 #include <map>
19 #include <memory>
20 #include <string>
21 #include <vector>
22 
23 namespace makVrv
24 {
25  class DtProceduralSound;
26  class DtDe;
27 
36  {
37  public:
40  explicit DtWindSoundBehavior(const DtWindSoundConfig& config);
41 
45  void setupSound(DtProceduralSound& sound, DtDe& de) override;
46 
49  void update(DtDe& de) override;
50 
54  bool isActive(const DtProceduralSoundBehaviorContext& ctx) const override;
55 
60  float currentVolumeDb(const DtProceduralSoundBehaviorContext& ctx,
61  float channelBaseVolumeDb) const override;
62 
66  void setLocalWindSpeedOverride(bool audible, float speedMs) override;
67 
69  void appendImGuiDebugInfo() const override;
70 
71  private:
73  std::atomic<float> myCurrentWindSpeed;
74  std::atomic<bool> myIsWindAudible;
75  std::atomic<bool> myHasLocalWindOverride;
78  std::atomic<bool> myLocalWindAudible;
80  std::atomic<float> myLocalWindSpeedMs;
82  std::vector<std::unique_ptr<DtTierSlotBehavior>> mySlots;
83  };
84 
88  {
89  public:
95  DtDe& de,
96  const std::map<std::string, std::string>& params) override;
97  };
98 
99 } // namespace makVrv
DtWindSoundConfig myConfig
Full tier configuration.
Definition: DtWindSoundBehavior.h:72
std::atomic< float > myCurrentWindSpeed
Wind speed in m/s; updated by update().
Definition: DtWindSoundBehavior.h:73
Read-only context passed to every DtProceduralSoundBehavior callback.
Definition: DtProceduralSoundBehaviorContext.h:20
Abstract factory interface for creating a named DtProceduralSoundBehavior.
Definition: DtProceduralSoundBehaviorCreator.h:92
std::vector< std::unique_ptr< DtTierSlotBehavior > > mySlots
Per-tier slot behaviors.
Definition: DtWindSoundBehavior.h:82
Composes multiple DtProceduralSoundLayer pools into one streaming ambient sound.
Definition: DtProceduralSound.h:61
DtProceduralSoundBehaviorCreator for the &quot;Wind&quot; behavior.
Definition: DtWindSoundBehavior.h:87
std::atomic< float > myLocalWindSpeedMs
Local weather area wind speed (m/s), written by setLocalWindSpeedOverride().
Definition: DtWindSoundBehavior.h:80
Contains makVrv::DtWindSoundTier and makVrv::DtWindSoundConfig.
DtProceduralSoundBehavior that adapts wind audio to the current wind speed.
Definition: DtWindSoundBehavior.h:35
Contains makVrv::DtProceduralSoundBehaviorCreator abstract base class.
std::atomic< bool > myIsWindAudible
True when speed &gt;= first tier onset.
Definition: DtWindSoundBehavior.h:74
std::atomic< bool > myLocalWindAudible
Local weather area audible flag, written by setLocalWindSpeedOverride().
Definition: DtWindSoundBehavior.h:78
Optional per-channel behavior hook for DtProceduralSoundPlayer.
Definition: DtProceduralSoundBehavior.h:40
#define DT_DLL_VRVAUDIO
Definition: vrvAudio.h:20
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
Contains makVrv::DtProceduralSoundBehavior base class.
Full configuration for DtWindSoundBehavior.
Definition: DtWindSoundConfig.h:40
Contains makVrv::DtTierGainCurve and makVrv::DtTierSlotBehavior.

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)