From a77b34a4ebdc994cce7a3d1f00121f421ca31b53 Mon Sep 17 00:00:00 2001 From: sanine Date: Wed, 7 Sep 2022 11:23:34 -0500 Subject: update README and fix memory leaks --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 070ddb4..8c61336 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,24 @@ Callbacks will not be triggered on their own! You must periodically call Check all channels for playback-finished callbacks and run them if necessary. +### `struct mossrose_sound_t * load_mp3(const char *filename)` ### + +Load an MP3 file. + + * `filename` - the name of the file to load. + +Returns a pointer to a `mossrose_sound_t` struct containing the audio data, or NULL on an error. You must free the sound yourself using `mossrose_free_sound`. + + +### `void mossrose_free_sound(struct mossrose_sound_t *sound)` ### + +Free a mossrose-allocated sound struct. + + * `sound` - a pointer to a sound struct. + +Using this function with user-allocated sounds may or may not work correctly -- be sure you know what you're doing! + + todo ---- -- cgit v1.2.1