|
Player12
An open source football management simulator
|
Classes | |
| class | AudioDevice |
| struct | BusLevels |
| class | CrowdBed |
| class | Darken |
| class | Drift |
| class | Mixer |
| class | Noise |
| class | OnePole |
| struct | SoundCommand |
| class | Svf |
| class | Voice |
Enumerations | |
| enum class | Sound : std::uint8_t { KICK , NET , WOODWORK , WHISTLE , CROWD_OOH , CROWD_CHEER , CROWD_GROAN , CROWD_BOO , CROWD_WHISTLES , CROWD_APPLAUSE , COUNT } |
| enum class | WhistlePattern : std::uint8_t { SHORT , KICK_OFF , HALF_TIME , FULL_TIME } |
Functions | |
| float | softLimit (float sample) |
| bool | isCrowdSound (Sound sound) |
Variables | |
| constexpr int | SAMPLE_RATE = 48000 |
| constexpr float | SAMPLE_RATE_F = 48000.0f |
| constexpr float | SAMPLE_PERIOD = 1.0f / SAMPLE_RATE_F |
| constexpr std::size_t | SOUND_COUNT |
Procedural sound synthesis for the match audio. Every sound is built from noise, oscillators and filters at run time: there are no sample files.
Nothing here allocates or locks, so it is safe on the audio thread. The noise generators are private xorshift states, independent of the game's seeded RNG, so audio can never influence a simulation.
|
strong |
|
strong |
Referee whistle patterns (Voice variant for Sound::WHISTLE).
| Enumerator | |
|---|---|
| SHORT | |
| KICK_OFF | |
| HALF_TIME | |
| FULL_TIME | |
| bool Audio::isCrowdSound | ( | Sound | sound | ) |
True for crowd sounds (crowd bus); the rest go to the effects bus.
| float Audio::softLimit | ( | float | sample | ) |
Soft limiter: linear below 0.8, then a smooth knee that never reaches 1.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |