summaryrefslogtreecommitdiff
path: root/vendor/codecs.h
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/codecs.h')
-rw-r--r--vendor/codecs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/codecs.h b/vendor/codecs.h
new file mode 100644
index 0000000..a4cb120
--- /dev/null
+++ b/vendor/codecs.h
@@ -0,0 +1,9 @@
+/* Sound decoding for the host, from single-file libraries: dr_wav, dr_flac
+ * and stb_vorbis, compiled in codecs.c. */
+#include <stddef.h>
+#include <stdint.h>
+
+/* WAV, FLAC or Ogg Vorbis bytes to interleaved f32, chosen by content. Null
+ * when they do not decode; otherwise release with sketchbook_free_audio. */
+float *sketchbook_decode_audio(const void *data, size_t size, uint32_t *channels, uint32_t *rate, uint64_t *frames);
+void sketchbook_free_audio(float *samples);