VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtAudioLevel.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 
12 #include <vrvAudio/vrvAudio.h>
13 
14 #include <makAudio/abstractAudio.h>
15 
16 #include <string>
17 
18 namespace makAudio
19 {
20  class DtSound;
21 }
22 
23 namespace makVrv
24 {
25 
55  {
56  public:
57 
61  static constexpr float kFullScaleDbfs = 0.0f;
62 
73  static constexpr float kVoiceBoostCeilingDbfs = +12.0f;
74 
76  static constexpr float kSilentDbfs = -96.0f;
77 
80  static constexpr float kFadeZoneDepthDbfs = -60.0f;
81 
83  static constexpr float kSoftStartFloorDbfs = -60.0f;
84 
90  static constexpr float kDbfsWidgetMin = -100.0f;
91 
96  static constexpr float kDbfsWidgetMax = kVoiceBoostCeilingDbfs;
97 
101  static constexpr float kDbfsWidgetDefault = -6.0f;
102 
107  static constexpr float kUseDefaultDistance = -1.0f;
108 
111  static constexpr float kDefaultSourceSplDb = 90.0f;
112 
121  static constexpr float kMaxDistanceGainTarget = 0.001f;
122 
131  static float linearGainFromDbfs(float dbfs);
132 
142  static float clampToVoiceCeiling(float dbfs);
143 
149  static float clampToDynamicRange(float dbfs);
150 
156  static bool isEffectivelySilent(float dbfs);
157 
164  static const char* displayedSuffix();
165 
169  static float displayedRangeMinDb();
170 
174  static float displayedRangeMaxDb();
175 
179  static float displayedDefaultDb();
180 
219  static void applyAttenuation(makAudio::DtSound& sound,
220  float minDistM,
221  float maxDistM);
222 
247  static float computeRolloffFactor(float referenceDistM,
248  float maxDistM);
249 
275  static float attenuationGainAtDistance(float minDistM,
276  float maxDistM,
277  float distM);
278 
288  static makAudio::DtAbstractAudio::Priority priorityFromString(
289  const std::string& priorityString);
290 
291  private:
292 
293  DtAudioLevel() = delete;
294  DtAudioLevel(const DtAudioLevel&) = delete;
295  DtAudioLevel(DtAudioLevel&&) = delete;
296  DtAudioLevel& operator=(const DtAudioLevel&) = delete;
297  DtAudioLevel& operator=(DtAudioLevel&&) = delete;
298  ~DtAudioLevel() = delete;
299  };
300 
301 }
Contains the DLL export macro for vrvAudio classes.
#define DT_DLL_VRVAUDIO
Definition: vrvAudio.h:20
Non-constructible collection of audio-level constants and helpers.
Definition: DtAudioLevel.h:54

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)