|
nanoMMO 0.97.8
Building an MMO: The Engineering Series
|
#include <ambience.h>
Public Member Functions | |
| Ambience (uint32_t seed) | |
| void | UseRain (Samples left, Samples right) |
| void | UseFire (Samples left, Samples right) |
| void | UseGust (const Samples &left, const Samples &right) |
| void | Fill (std::span< float > left, std::span< float > right, const Hearing &hearing) |
| void | Thunder (float metres, float pan) |
The weather and the time of day, as sound: a few loops made as the game starts, that play all the time, each as loud as it should be now, and birds, owls, drips and thunder now and then, made as they come.
Definition at line 46 of file ambience.h.
|
explicit |
Definition at line 376 of file ambience.cc.
| void nanommo::Ambience::Fill | ( | std::span< float > | left, |
| std::span< float > | right, | ||
| const Hearing & | hearing ) |
Adds the next of the sound into the two channels, as many samples as they have, while each loop glides to how loud the hearing says.
Definition at line 456 of file ambience.cc.
| void nanommo::Ambience::Thunder | ( | float | metres, |
| float | pan ) |
The thunder of a bolt this many metres away, from that side, from -1 for the left to 1 for the right. It comes as long after the flash as sound takes to come that far.
Definition at line 450 of file ambience.cc.
Fire recorded crackling, in place of the fire made from numbers, the same way.
Definition at line 412 of file ambience.cc.
A gust of wind recorded, which blows now and then over the wind made from numbers, more often the windier it is.
Definition at line 418 of file ambience.cc.
Rain recorded from the real thing, in place of the rain made from numbers, its two channels as long as each other. It loops, its end fading into its start, and plays as loud as the one it replaces.
Definition at line 430 of file ambience.cc.