On Thu, 2024-09-26 at 09:37 -0600, Richard wrote:
I was going to steal -- with credit :) -- the sdl_snd.c file, because I noticed the 'biddle-dee-beep' complete noise on the SDL port when it finished the image. However, it looks like you didn't implement the orbit sound support completely? What were your ideas on that?
Feel free to use whatever you can. It isn't particularly elegant. After getting the basic beeps to work, I thought about implementing attack, sustain, decay, and release for multiple channels (voices) at the same time. SDL is set up for streaming audio, not what we have in mind. A big loop with a lot of if-then statements should work. I got burned out. You did get me looking at how sound was implemented in SDL3. It looks like this code will break. This is not unexpected. I had the same problem going from SDL1.2 to SDL 2. It should help that SDL3 has a nano-second delay function.
I've been hunting around for a library that is a software OPL3 implementation (i.e. soundblaster) but I haven't found a decent one yet. I think most people are writing their own software synth that produces samples in a buffer for playback.
Yeah, that has made sound implementation painful. Jonathan