From 2050c0e0576f05156f192aa4caf48834d2f28b14 Mon Sep 17 00:00:00 2001 From: fschildt Date: Fri, 22 Aug 2025 15:23:11 +0200 Subject: first commit --- src/client/sound.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/client/sound.h (limited to 'src/client/sound.h') diff --git a/src/client/sound.h b/src/client/sound.h new file mode 100644 index 0000000..e1b456a --- /dev/null +++ b/src/client/sound.h @@ -0,0 +1,30 @@ +#ifndef SOUND_H +#define SOUND_H + + +#include +#include +#include + +typedef enum { + SOUND_USER_CONNECTED, + SOUND_USER_DISCONNECTED +} SoundId; + +typedef struct { + i32 samples_per_second; + i32 sample_count; + i16 *samples; +} Sound; + +typedef struct { + i32 play_cursor; + Sound *sound; +} PlaySound; + +void play_sound_init(PlaySound *ps, Sound *sound); +void play_sound_update(PlaySound *ps, OSSoundBuffer *dest); +Sound *sound_load(SoundId id); + + +#endif // SOUND_H -- cgit v1.2.3