/* // Created by bruno on 16.2.2025. */ #ifndef RISCB_AUDIO_H #define RISCB_AUDIO_H #include #include #include #include #define SAMPLE_RATE 44100 #define NUM_SYNTH_VOICES 3 typedef enum { WAVE_SINE, WAVE_SQUARE, WAVE_SAWTOOTH, WAVE_TRIANGLE, WAVE_NOISE } Waveform; typedef struct { uint8_t volume; uint16_t frequency; uint8_t phase; Waveform waveform; } SynthVoice; typedef struct { SynthVoice synthVoices[NUM_SYNTH_VOICES]; } AudioData; extern AudioData audioData; void audio_callback(void *userdata, Uint8 *stream, int len); #endif //RISCB_AUDIO_H