summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-08-25 12:47:35 -0500
committersanine <sanine.not@pm.me>2022-08-25 12:47:35 -0500
commit5634c7b04da619669f2f29f6798c03982be05180 (patch)
treed6dafd721f6e228c9115797fd42af46faf8b57e1 /README.md
add README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..38207f1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,26 @@
+mossrose
+========
+
+> *Portulaca grandiflora*
+
+A minimal-dependency PortAudio-based audio mixer library. It doesn't *load* audio; you'll need to do that yourself.
+
+
+api
+---
+
+### `int mr_init(double sample_rate, int n_channels)` ###
+
+Initialize mossrose with `n_channels` worth of audio, at `sample_rate` Hz. Returns 0 on success and 1 otherwise.
+
+
+### `int mr_terminate()` ###
+
+Terminate mossrose.
+
+
+### `int mr_play(float *left, float *right, size_t n_samples, int channel)` ###
+
+Play a sound. Either `left` or `right` may be NULL, but not both. If `channel` is non-negative,
+it will use that channel; otherwise, it will use the first available free channel. Returns the
+channel used on success, or -1 on failure.