diff options
author | fschildt <florian.schildt@protonmail.com> | 2025-08-22 15:23:11 +0200 |
---|---|---|
committer | fschildt <florian.schildt@protonmail.com> | 2025-08-22 15:23:11 +0200 |
commit | 2050c0e0576f05156f192aa4caf48834d2f28b14 (patch) | |
tree | ee58bd35b0df0a1bacfbc9700ed99ce80c99294e /src/client/sound.h |
Diffstat (limited to 'src/client/sound.h')
-rw-r--r-- | src/client/sound.h | 30 |
1 files changed, 30 insertions, 0 deletions
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 <basic/arena.h> +#include <os/os.h> +#include <basic/basic.h> + +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 |