diff options
| author | fschildt <florian.schildt@protonmail.com> | 2025-08-22 15:23:11 +0200 | 
|---|---|---|
| committer | fschildt <florian.schildt@protonmail.com> | 2025-10-15 11:33:23 +0200 | 
| commit | 04e4627e6c11254ee6f49edf5feb1b8d711da41a (patch) | |
| tree | e28f2e62d3e1b83f9686cdeb102e3f47379e6793 /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  | 
