digitalmars.D.learn - Audio file read/write?
- Daren Scot Wilson (13/13) Nov 06 2014 What's the current recommended way to read and write audio files?
- ponce (14/28) Nov 07 2014 SDL vanilla and OpenAL won't help with reading and writing audio
- Jeremy DeHaan (5/8) Nov 08 2014 Not sure about the others, but you can use sndfile in a
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. 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.
Nov 06 2014
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
Nov 07 2014
On Friday, 7 November 2014 at 11:55:16 UTC, ponce wrote:Pretty sure libsndfile can read .wav, .au, .ogg but not mp3 No commercial usage unless you pay a licence. https://github.com/p0nce/DerelictSndFile.gitNot sure about the others, but you can use sndfile in a commercial project for free as long as you follow the correct steps for linking/including the licenses. http://www.mega-nerd.com/libsndfile/FAQ.html#Q021
Nov 08 2014