1#ifndef NANOMMO_CLIENT_AMBIENCE_H_
2#define NANOMMO_CLIENT_AMBIENCE_H_
11#include "protocol/nanommo.pb.h"
65 void Fill(std::span<float> left, std::span<float> right,
71 void Thunder(
float metres,
float pan);
74 enum Bed { kRain, kDownpour, kWater, kWind, kFire, kLava, kCrickets, kBeds };
93 void Call(
const Samples& samples,
float gain,
float pan,
float wait = 0.0f);
101 std::array<Loop, kBeds> beds_;
102 std::size_t played_ = 0;
103 std::vector<Voice> voices_;
104 float next_bird_ = 2.0f;
105 float next_owl_ = 8.0f;
106 float next_drip_ = 1.0f;
107 float next_gust_ = 4.0f;
void UseGust(const Samples &left, const Samples &right)
void Fill(std::span< float > left, std::span< float > right, const Hearing &hearing)
void UseRain(Samples left, Samples right)
void Thunder(float metres, float pan)
void UseFire(Samples left, Samples right)
Samples ThunderSound(float metres, uint32_t seed)
A bolt's thunder: a crack when it's near, then a long low roll.
std::vector< float > Samples
One channel of sound, at kRate.
Hearing HearingOf(int land, const protocol::Sky &sky, bool by_water, bool weather)
float water
Drops on the sea, when we're by it.
float lava
The lava, bubbling.
float fire
Fire falling: crackling, and hissing where it lands.
float drips
Water dripping in the Crypt, off the stone.