diff options
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 |