diff options
author | sanine <sanine.not@pm.me> | 2022-09-07 11:23:34 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-09-07 11:23:34 -0500 |
commit | a77b34a4ebdc994cce7a3d1f00121f421ca31b53 (patch) | |
tree | 19901965a6e2d0e0afe5f441306acb15cd38af95 /README.md | |
parent | 500dd00fb11efdd19aef924b0d8ff0b370c28d33 (diff) |
update README and fix memory leaks
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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 ---- |