From c527acfc79f3bda8cfe13a7b51b0b16a32683960 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 29 Jun 2026 09:41:42 +0900 Subject: First partial working attempt at sound. Producing output, but very distorted --- src/audio.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/audio.h') diff --git a/src/audio.h b/src/audio.h index 83980e4..b799abd 100644 --- a/src/audio.h +++ b/src/audio.h @@ -28,6 +28,11 @@ #define ESPEC_AUDIO_H #include +#include + +/* The sample rate +*/ +#define SAMPLE_RATE 48000 /* ---------------------------------------- INTERFACES */ @@ -39,10 +44,11 @@ int AUDIOInit(void); -/* Add the passed buffer to the sound queue. It is a signed 8-bit mono +/* Add the passed buffer to the sound queue. It is an unsigned 8-bit mono sample which will be converted as appropriate by the audio interface. + Well turns out SDL does that for you. */ -void AUDIOQueue(char *buffer, size_t len); +void AUDIOQueue(Uint8 *buffer, size_t len); #endif -- cgit v1.3