diff options
| author | Andre Weissflog <floooh@gmail.com> | 2018-10-08 14:00:46 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2018-10-08 14:00:46 +0200 |
| commit | 2b871190b82e75786140e73cd04fb0027870c7e0 (patch) | |
| tree | 084408a607d8534baf929be38d73415c13eb4fc3 /sokol_audio.h | |
| parent | 7413fe5c30becccb7ab21f850d36c4f1f4c94247 (diff) | |
sokol_audio.h: enable a dummy backend with SOKOL_AUDIO_NO_BACKEND
Diffstat (limited to 'sokol_audio.h')
| -rw-r--r-- | sokol_audio.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sokol_audio.h b/sokol_audio.h index 1c63d891..81de0937 100644 --- a/sokol_audio.h +++ b/sokol_audio.h @@ -9,6 +9,7 @@ Optionally provide the following defines with your own implementations: + SOKOL_AUDIO_NO_BACKEND - use a dummy backend SOKOL_ASSERT(c) - your own assert macro (default: assert(c)) SOKOL_LOG(msg) - your own logging function (default: puts(msg)) SOKOL_MALLOC(s) - your own malloc() implementation (default: malloc(s)) @@ -672,8 +673,13 @@ typedef struct { } _saudio_state; static _saudio_state _saudio; +/*=== DUMMY BACKEND ==========================================================*/ +#if defined(SOKOL_AUDIO_NO_BACKEND) +_SOKOL_PRIVATE bool _saudio_backend_init(void) { return false; }; +_SOKOL_PRIVATE void _saudio_backend_shutdown(void) { }; + /*=== COREAUDIO BACKEND ======================================================*/ -#if defined(__APPLE__) +#elif defined(__APPLE__) #include <AudioToolbox/AudioToolbox.h> static AudioQueueRef _saudio_ca_audio_queue; |