I usually don't need access to anything besides basic audio functions (play, stop, volume, etc), but I recently thought of a game concept that would work best if I could synchronize it to the music being played. The only things that I could think of that could accomplish this, would be to access some sort of buffer before it plays, or be able to get the current position of the song and read data from the file itself.
It looks like JavaScript has something called Web Audio, which might be what I'm looking for (but also way more complicated than Sup.Audio). Is there some way to access this API since Typescript is a superset of JavaScript? Or is there some other API that would work better? (I peeked at the source code for Sup.Audio.SoundPlayer, and it looks like this might be what it runs off of)
So basically, I'd like to know...
- If there's a way to access the audio buffer.
If the file data from audio assets can be accessed with code.- If the song position can be retrieved.
- If sound files can be loaded from URLs.
- If something like Web Audio (JavaScript) can be used in TypeScript.