angros47 wrote:Ok, after a long time, I finally managed to have a prototype of what I had in mind:
https://sourceforge.net/projects/freeba ... ary/files/.
Looks like a good start. Do you have specific name/email that we can use to attach to a commit?
I like the simple interface, and the design choices to limit the feature set. That's the approach I would take also; get the essentials working well. Besides, for an advanced sound library, there is already Joshy's fbsound library. Nice that it is written in fairly plain fb, but using some of the relatively newer features like extending objects. I am very interested to see the long term results of adding a new functionality to fb this way.
Perhaps, there should there be a multi-threaded version too? Where locks are held whenever accessing any shared / global resources.
Next step would be to compose the initial commit to fbc/master, putting the source files in expected locations:
./src/sfx/*.bi (the libraries private includes)
./src/sfx/<target> (target specific sources)
./inc/fbsfx.bi (the public library interface for the user)
And then updating ./makefile to build the library automatically, or at least provide a recipe for it.
Sometime later, for QB compatibility would be nice to see a SOUND freq, duration overload, possibly even having some help from the compiler to automatically initialize the sound library if program is compiled in #lang "qb". But, for the fb dialect, requiring the #include is a good choice in my opinion.