2024-10-22 00:52:51 +00:00
|
|
|
#ifndef SHROOMS_VB_NATIVE_AUDIO_
|
|
|
|
#define SHROOMS_VB_NATIVE_AUDIO_
|
|
|
|
|
2024-10-23 23:01:54 +00:00
|
|
|
#include <SDL2/SDL.h>
|
2024-10-22 00:52:51 +00:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
typedef struct {
|
2024-10-23 23:01:54 +00:00
|
|
|
SDL_AudioDeviceID id;
|
2024-10-22 00:52:51 +00:00
|
|
|
bool paused;
|
2024-10-24 02:50:44 +00:00
|
|
|
uint32_t buffers[2][834];
|
|
|
|
int current;
|
|
|
|
int filled;
|
2024-10-22 00:52:51 +00:00
|
|
|
} AudioContext;
|
|
|
|
|
|
|
|
int audioInit(AudioContext *aud);
|
|
|
|
int audioUpdate(AudioContext *aud, void *data, uint32_t bytes);
|
|
|
|
|
|
|
|
#endif
|