fs2port/port/include/audio.h
2026-05-13 21:32:05 -05:00

24 lines
660 B
C

// SDL audio: engine drone whose pitch tracks throttle/speed, stall-
// warning horn during stall, plus three one-shot triggers for WW1 Ace
// gun fire, bomb release, and crash impact.
#ifndef AUDIO_H
#define AUDIO_H
#include <stdbool.h>
#include "aircraft.h"
bool audioInit(void);
void audioShutdown(void);
// Update the playback parameters for the next audio buffers. Call
// once per frame after `aircraftStep`.
void audioUpdate(const AircraftT *ac);
// One-shot triggers. Each kicks off a short envelope mixed into the
// engine drone for the next ~0.2 s.
void audioTriggerGun(void);
void audioTriggerBomb(void);
void audioTriggerCrash(void);
#endif