summaryrefslogtreecommitdiff
path: root/src/audio.h
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2026-06-29 09:41:42 +0900
committerIan C <ianc@noddybox.co.uk>2026-06-29 09:41:42 +0900
commitc527acfc79f3bda8cfe13a7b51b0b16a32683960 (patch)
treee5bbd119a070848301a03b52f1232a797b35c119 /src/audio.h
parentc31b779c20638ce25f11489c445a53798a663b13 (diff)
First partial working attempt at sound. Producing output, but very distorted
Diffstat (limited to 'src/audio.h')
-rw-r--r--src/audio.h10
1 files changed, 8 insertions, 2 deletions
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 <stdlib.h>
+#include <SDL.h>
+
+/* 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