summaryrefslogtreecommitdiff
path: root/vendor/codecs.h
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-28 21:07:13 -0300
committerGabriel Schneider <[email protected]>2026-11-12 13:22:02 -0300
commit590ba7b9b579b97e34b51ab7e3460ebc85713343 (patch)
tree6a73a7570ff4f79f41deff078455877b9bc6571b /vendor/codecs.h
parentbc8e6eb1bfef0c5e9b3c40fc1e4fd5a1659e2b03 (diff)
downloadsketchbook-590ba7b9b579b97e34b51ab7e3460ebc85713343.tar.gz
sketchbook-590ba7b9b579b97e34b51ab7e3460ebc85713343.zip
sketchbook: Zig 0.17, a Store on disk, requests, a scope (waveform, spectrum, spectrogram), audio codecs and fonts, web host
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);