COn Friday, 7 November 2014 at 02:58:15 UTC, Daren Scot Wilson wrote:
What's the current recommended way to read and write audio files?

I don't need to play it on the speakers or deal with anything real time - just read a file's data into an array, fiddle with it, and write it out to a file.

I found some other threads about audio files, but none recent, mentioning SDL and OpenAL. Are these still the way to go? I'm thinking I should avoid SDL since it does far more than audio, none of which I care about. OpenAL also does way more than I care about, but at least is just audio.

SDL vanilla and OpenAL won't help with reading and writing audio files.


For my application, I need to read a few of the common formats, such as .wav, .au, .mp3, .ogg and whatever else is popular. I only need to write .wav but other audio tinkerers may want to write other formats.

wave-d: read/write .WAV file, all at once
https://github.com/d-gamedev-team/wave-d

Pretty sure libsndfile can read .wav, .au, .ogg but not mp3
No commercial usage unless you pay a licence.
https://github.com/p0nce/DerelictSndFile.git

BASS can do it all:
No commercial usage unless you pay a licence.
https://github.com/p0nce/DerelictBASS

SDL_mixer can read .wav .au .ogg and .mp3
https://github.com/DerelictOrg/DerelictSDL2

Reply via email to