01-09-2023, 06:19 PM
(01-09-2023, 05:37 PM)mnrvovrfc Wrote: That example makes things more clear that the string buffer has to be treated like an actual sound file that is loaded. Eg. a raw wave file buffer could be created rather easily, but make sure to make room at the front for the wave file header, and to create the header correctly. This is actually pretty cool to be able to handle a wide variety of sound file formats.
However, that example looks a bit complicated, uses _INFLATE$ but isn't the content of an MP3 file already compressed?
Yes. It is a bit complicated. But it's just a test I put together. The reason that has _INFLATE$ is because I used a hacked routine from MakeDATA by @RhoSigma. That _INFLATE$ could come in handy if we used a format like MOD/S3M/XM/IT etc. that do not support compression though.
See.
QB64-Museum/MakeDATA.bas at main · a740g/QB64-Museum (github.com)