FWeatherRainAudio
The rain bed of the Weather actor: a looping 2D sound whose level follows the rain intensity (smoothed, so a sudden downpour fades in) and which ducks and loses its highs when the listener stands under cover. One per Scene, updated from the game tick; owns its AudioSource and releases it once the rain has faded out.
- Module
- Game
- Header
#include "Game/WeatherRainAudio.h"- Namespace
Mowo
Without an authored clip the bed is synthesized: filtered noise plus sparse droplet ticks pushed into a PCM stream, so the engine ships no rain asset and the bed never audibly repeats.
Constructors
| Signature | Name | Description |
|---|---|---|
FWeatherRainAudio() | FWeatherRainAudio | |
~FWeatherRainAudio() | ~FWeatherRainAudio | |
FWeatherRainAudio(const FWeatherRainAudio&) = delete | FWeatherRainAudio |
Public functions
| Returns | Name | Description |
|---|---|---|
FWeatherRainAudio& | operator= | |
void | Update | rainIntensity 0..1, volume 0..1 (the actor's rainAudioVolume), clipPath empty for the synthesized bed, sheltered true when something solid is overhead the listener. |
void | Stop | |
float | GetLevel | The smoothed gain the source is set to, 0..1 before the actor volume; for tests and diagnostics. |
float | GetShelter |
Function details
FWeatherRainAudio
FWeatherRainAudio()~FWeatherRainAudio
~FWeatherRainAudio()FWeatherRainAudio
FWeatherRainAudio(const FWeatherRainAudio&) = deleteoperator=
FWeatherRainAudio& operator=(const FWeatherRainAudio&) = deleteUpdate
void Update(float rainIntensity, float volume, const std::string& clipPath, bool sheltered, float dt)rainIntensity 0..1, volume 0..1 (the actor's rainAudioVolume), clipPath empty for the synthesized bed, sheltered true when something solid is overhead the listener.
Stop
void Stop()GetLevel
float GetLevel() constThe smoothed gain the source is set to, 0..1 before the actor volume; for tests and diagnostics.
GetShelter
float GetShelter() const