diff options
| author | Andre Weissflog <floooh@gmail.com> | 2019-10-30 12:08:49 +0100 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2019-10-30 12:08:49 +0100 |
| commit | cf5e88a67209e9af6018470d2ca730d5b6c92eab (patch) | |
| tree | dd539e628e6688098b74b174a382ddf809062d48 | |
| parent | ce0b8cb24f11d82a9a2110267c8e953cc4adeac1 (diff) | |
sokol_audio.h: fix #228 (function declaration mismatch)
| -rw-r--r-- | sokol_audio.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sokol_audio.h b/sokol_audio.h index e467960d..3c21e7c7 100644 --- a/sokol_audio.h +++ b/sokol_audio.h @@ -406,8 +406,8 @@ SOKOL_API_DECL void* saudio_userdata(void); SOKOL_API_DECL saudio_desc saudio_query_desc(void); /* actual sample rate */ SOKOL_API_DECL int saudio_sample_rate(void); -/* actual backend buffer size */ -SOKOL_API_DECL int saudio_buffer_size(void); +/* return actual backend buffer size in number of frames */ +SOKOL_API_DECL int saudio_buffer_frames(void); /* actual number of channels */ SOKOL_API_DECL int saudio_channels(void); /* get current number of frames to fill packet queue */ @@ -903,7 +903,10 @@ _SOKOL_PRIVATE int _saudio_fifo_read(_saudio_fifo_t* fifo, uint8_t* ptr, int num /*=== DUMMY BACKEND IMPLEMENTATION ===========================================*/ #if defined(SOKOL_DUMMY_BACKEND) -_SOKOL_PRIVATE bool _saudio_backend_init(void) { return false; }; +_SOKOL_PRIVATE bool _saudio_backend_init(void) { + _saudio.bytes_per_frame = _saudio.num_channels * sizeof(float); + return true; +}; _SOKOL_PRIVATE void _saudio_backend_shutdown(void) { }; /*=== COREAUDIO BACKEND IMPLEMENTATION =======================================*/ |