[Project tape] Funnily enough my .wav generator written at 2am doesn’t work 🤷♂️
There are a few extra hurdles in #WebDev to record lossless audio, basically you can’t use the nice MediaRecorder API. You need to create a Worklet that runs in another thread to process the raw float32 audio as it comes in. I made one of those that chunks up the audio and posts it back to the main thread.
Then there is another bit that takes those chunks and writes them into IndexedDB (overdubbing existing recordings) in 1 second samples. This is all stereo too!
So you could record a bit, rewind then record over the first recording to create layering, maybe a bit silly but I’m all for the fun angle.
Once I get the .wav part working I can test that the raw data being recorded is actually what I think it is. Then there will be lots of fiddling to find nice chunk sizes that don’t slow down or freeze the app too much.