You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
70
70
71
71
- New `SLTerrain` INI property `OrbitDirection`, which defines which direction is considered to be orbit, for the sake of brain-path-to-orbit, dropship spawn/return location, etc. Can be any of `Up`, `Down`, `Left` or `Right`. Defaults to `Up`.
72
72
73
+
- New FMOD and SoundContainer features:
74
+
The game is now divided into SFX, UI, and Music busses which all route into the Master bus.
75
+
The SFX bus has compression added for a better listening experience, and a safety volume limiter has been added to the Master bus.
76
+
Aside from volume being attenuated, sounds will now also be lowpass filtered as distance increases.
77
+
New `SoundContainer` INI and Lua (R/W) property `BusRouting`, which denotes which bus the SoundContainer routes to. Available busses: `SFX, UI, Music`. Defaults to `SFX`.
78
+
`Enum` binding for `SoundContainer.BusRouting`: `SFX = 0, UI = 1, MUSIC = 2`.
79
+
New `SoundContainer` INI and Lua (R/W) property `PanningStrengthMultiplier`, which will multiply the strength of 3D panning. This can be used to achieve for example a psuedo-Immobile effect where attenuation effects are still applied but the sound does not move from the center. Strongly recommended to keep between 0.0 and 1.0.
Copy file name to clipboardExpand all lines: Entities/SoundContainer.h
+44-5Lines changed: 44 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,15 @@ namespace RTE {
19
19
SerializableOverrideMethods;
20
20
ClassInfoGetters;
21
21
22
+
/// <summary>
23
+
/// The FMOD channelgroup/bus this sound routes through.
24
+
/// </summary>
25
+
enum BusRouting {
26
+
SFX = 0, // Default diegetic bus for general game SFX.
27
+
UI = 1, // Menu sounds and other things that shouldn't be affected by diegetic sound processing.
28
+
MUSIC = 2// Self-explanatory music bus.
29
+
};
30
+
22
31
/// <summary>
23
32
/// How the SoundContainer should behave when it tries to play again while already playing.
24
33
/// </summary>
@@ -48,13 +57,14 @@ namespace RTE {
48
57
intCreate(const SoundContainer &reference);
49
58
50
59
/// <summary>
51
-
/// Creates a SoundContainer and adds a sound, optionally setting whether it's immobile or affected by global pitch.
60
+
/// Creates a SoundContainer and adds a sound, optionally setting immobility, being affected by global pitch, and bus routing.
52
61
/// </summary>
53
62
/// <param name="soundFilePath">The path to a sound to add to the first SoundSet of this SoundContainer.</param>
54
63
/// <param name="immobile">Whether this SoundContainer's sounds will be treated as immobile, i.e. they won't be affected by 3D sound manipulation.</param>
55
64
/// <param name="affectedByGlobalPitch">Whether this SoundContainer's sounds' frequency will be affected by the global pitch.</param>
65
+
/// <param name="busRouting">Bus to route this sound to.</param>
56
66
/// <returns>An error return value signaling success or any particular failure. Anything below 0 is an error signal.</returns>
/// Gets the looping setting of this SoundContainer.
186
221
/// </summary>
@@ -349,14 +384,18 @@ namespace RTE {
349
384
350
385
static Entity::ClassInfo m_sClass; //!< ClassInfo for this class.
351
386
staticconst std::unordered_map<std::string, SoundOverlapMode> c_SoundOverlapModeMap; //!< A map of strings to SoundOverlapModes to support string parsing for the SoundOverlapMode enum. Populated in the implementing cpp file.
352
-
387
+
staticconst std::unordered_map<std::string, BusRouting> c_BusRoutingMap; //!< A map of strings to BusRoutings to support string parsing for the BusRouting enum. Populated in the implementing cpp file.
388
+
353
389
SoundSet m_TopLevelSoundSet; //The top level SoundSet that handles all SoundData and sub SoundSets in this SoundContainer.
354
390
355
391
std::unordered_set<int> m_PlayingChannels; //!< The channels this SoundContainer is currently using.
356
392
SoundOverlapMode m_SoundOverlapMode; //!< The SoundOverlapMode for this SoundContainer, used to determine how it should handle overlapping play calls.
357
-
358
-
bool m_Immobile; //!< Whether this SoundContainer's sounds should be treated as immobile, i.e. not affected by 3D sound effects. Mostly used for GUI sounds and the like.
393
+
394
+
BusRouting m_BusRouting; //!< What bus this sound routes to.
395
+
396
+
bool m_Immobile; //!< Whether this SoundContainer's sounds should be treated as immobile, i.e. not affected by 3D sound effects.
359
397
float m_AttenuationStartDistance; //!< The distance away from the AudioSystem listener to start attenuating this sound. Attenuation follows FMOD 3D Inverse roll-off model.
398
+
float m_PanningStrengthMultiplier; //!< Multiplier for panning strength, 0.0 to 1.0.
360
399
int m_Loops; //!< Number of loops (repeats) the SoundContainer's sounds should play when played. 0 means it plays once, -1 means it plays until stopped.
361
400
bool m_SoundPropertiesUpToDate = false; //!< Whether this SoundContainer's sounds' modes and properties are up to date. Used primarily to handle discrepancies that can occur when loading from ini if the line ordering isn't ideal.
0 commit comments