gen2brain / malgo

Mini audio library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API/release status?

dertseha opened this issue · comments

Hello there and thank you for this wrapper!
I want to know how stable the API is and whether you are planning to do any versioned releases?

I intend to use the audio library and would like to extend it to support multiple operations in parallel; Right now for instance there's only one callback possible at a time. Changing this would require API-breaking changes.
Hence my question whether you are planning to do a v1 release after such a contribution, or a v1 release now, followed by a v2 release.

Hello,

I don't think there are many users of this lib who will complain, so that change is really welcomed.

What I wanted to do is to make this current package a sub package named mini_al, and then mal package on root to be a higher level interface to that package, simple to use and with only io.Reader and io.Writer like in this package https://github.com/hajimehoshi/oto .

I can add tags every time mini_al.h is updated, but there is no need for v1, v2 etc.

Hm, interesting - I didn't know about oto so much so far.
The approach with their Writer interface is interesting, though the crucial benefit (and difference) for malgo that I see is the event-driven nature. So, instead of packing the (malgo) player behind a Writer interface, I now had the idea to pass that high-level API you proposed a Reader interface for playback, and a Writer interface for capturing. The respective callbacks would use these interfaces in a blocking manner.

Should the user still want to have a Writer interface for playback (or a Reader for capturing), then there's io.Pipe() which can be used to reverse the nature.

I'll have a go at this.

OK, I tried some stuff, did some refactoring with a promising API - and ended up in various access violations, scribbling around in random memory. And now, thanks to a mishap, I've just lost a few files. (PSA: git stash does not store untracked files...)

This is going to take a little longer :)

API looks much better now, thanks! I will close this issue, if you have more ideas or suggestions they are welcomed.