This commit is contained in:
2026-04-10 08:32:06 +02:00
parent 09955bebdc
commit be4f0ff9dd
4 changed files with 155 additions and 5 deletions

View File

@@ -11,9 +11,27 @@
#define AOPLAYASYNC_EXPORT extern
#endif
#define VERSION 1
typedef enum {
ao = 1,
flac = 2,
mpg123 = 3,
ao_ogg = 4
} BufferType_t;
typedef struct {
BufferType_t type;
int sample_bits;
int sample_rate;
int channels;
int endiannes;
} BufferInfo_t;
AOPLAYASYNC_EXPORT int ao_async_version(void);
AOPLAYASYNC_EXPORT void *ao_create_async(void *ao_handle, void *ao_play_f);
AOPLAYASYNC_EXPORT void ao_stop_async(void *handle);
AOPLAYASYNC_EXPORT void ao_play_async(void *handle, double at_second, double music_duration, int buf_size, void *mem);
AOPLAYASYNC_EXPORT void ao_play_async(void *handle, double at_second, double music_duration, int buf_size, void *mem, BufferInfo_t info);
AOPLAYASYNC_EXPORT void ao_clear_async(void *handle);
AOPLAYASYNC_EXPORT double ao_is_at_second_async(void *handle);