While reviewing the Sphere 1.x docs I came across a bunch of sound-related functions with "SFXR" in their names. What are these functions for? Some sort of DSP filter system?
I thought SFXR was 1.6 - I have an api.txt with it in but it's not in the one that comes with 1.5 if you download it now.
It was an interface for generating sounds by fiddling with some parameters - I never used it and no longer have a working version of 1.6 so can't comment further.
Yeah, I knew it was 1.6, I was looking at the api.txt in the git repo. I just wondered what it was.
What Rhuan said - basically, a sound generator. I never use it myself because the sounds that come out of it tend to be very similar and overused in indie games.
I was looking at that as well. It would bw nice to see some of its required functions implemented in miniSphere.
I'm late to the party here, but yea SFXR is for audio generation. In the future I would certainly like to see more generalized audio generation functions akin to the Web Audio API, but no skin off our backs if Sphere doesn't officially implement it.
Sorry for the lateness:
I took the code (with the blessings of the author) from http://www.drpetter.se/project_sfxr.html
And wrote an API for it for Sphere 1.6.
It was working, stable and tested.
There was a demo games/sfxr.zip and some unittests for it games/auto_test/scripts/test_sfxr.js
Are those resources needed?
If so, where can I upload them?
I think at this point, now that we're using ChakraCore instead of Duktape, I would probably want to implement something like this in JavaScript, on top of SoundStream, rather than bloating the Core API with what is really high-level functionality. Then it would even work in Oozaru (which also implements SoundStream) without further code changes.
Wow, I have not looked into SoundStream, but that sounds rad!
whoa, a whole re-implementation like that! Lot's of code, man!
https://github.com/fatcerberus/sphere-mp3/blob/master/lib/mp3.js
I didn't write that mp3 decoder, that was from this project:
https://github.com/audiocogs/mp3.js
SoundStream itself is really simple to use, you just specify your sample rate and feed it raw PCM audio. Here's the API:
https://github.com/fatcerberus/minisphere/blob/master/docs/sphere2-core-api.txt#L2012-L2062