Actual scaled sample playback

Today I made a huge jump forward in that I set up a test project to play around with SDL's audio API and managed to get it to play a sample in floating point format with simple interpolation and at varying playback speeds. This is basically the first step towards a real tracker-ish proof of concept.

My main issue was that the audio converter built into SDL always emits a Vec<u8> regardless of the type you're converting to. It took me a good while and a plea for help on Mastodon (Thanks to @jer@hachyderm.io for quick help) to figure out how to do that in a somewhat safe way.

Now that I have that out of the way, next step will be a tiny single voice tracker (without any FX support) implementation with some hardcoded data. This will allow me to figure out the proper maths for playback speed. I looked up some formulas (especially helpful: This odd website and I guess the main question will be if it makes sense to store a lot of values as tables of if we can calculate the ratios on the fly.

Then, after that, I think I will try to work out how to properly encapsulate the tracker engine, both in terms of code organisation but also data structures.

In the mean time I'll continue to learn more about rust. Specifically, I think, multithreading and how to move data between threads will become quite important quickly.

In parallel, I'll continue to play around with SDL graphics to figure out how to best build the UI in a way so that it scales to different screen sizes and also different aspect ratios. I will try to not spend too much time on this and rather constrain myself to something that will work on most screens, but it would be really nice, for example, if we could use extra space on super wide displays (such as the Retroid devices).

One thing I also want to solve relatively quickly is figuring out if I can compile the current test projects to Android, given the proliferation of Android based Retro handhelds, this seems like a sensible Idea.

Oh and lastly, I need to verify that the controller mappings on my target devices somewhat make sense.

I am currently making good progress, as I have a little bit more time right now for my own projects which is great. I hope to get most of the big boulders out of the way before the end of the summer when things will pick up on other projects again.