Feature Request #359
Audio File Support
| Status: | Closed | Start date: | 2009-11-16 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | Spent time: | - | |
| Target version: | - | |||
| Branch: |
Description
This is a not fun task. Here are some options:
- As a base option, we can use libsndfile from http://www.mega-nerd.com/libsndfile/
- More complicated, but we could use LAME (which uses:), or directly use http://www.mpg123.de/ -- there are a host of complications though. Conflicting versions, dependencies, licensing, etc. And to supporting anything with MP3 we have to be scared about patents and lawyers.
- FFmpeg is another option. It is supposed to be a new and improved libsndfile, supporting various media formats. However, check this out: https://roundup.ffmpeg.org/roundup/ffmpeg/issue732 -- I don't think I want to get into this. If we did, examples can be found @ http://www.inb.uni-luebeck.de/~boehme/using_libavcodec.html,
- gmerlin stuff is GPL, so it's not an option
- maybe there is something to research in libSox? http://sox.cvs.sourceforge.net/viewvc/sox/sox/
- wrapping Apple's AudioQueue API would be an easy and full-featured on solution on the Mac, but of course is not available on other platforms.
One proposal is to wrap Apple's stuff on the Mac and libsndfile on other platforms. libsndfile supports CAF format, so that could be our 'native' format on both platforms if we wish. Then "only" MP3, AAC, etc. become problems on Windows (but they would be problematic due to licensing anyway).
History
Updated by Nils Peters about 2 years ago
I am mostly interested in aac and mp3 for two channel audio files and in FLAC and Wavpack for multichannel audio files.
Updated by Tim Place about 2 years ago
libsndfile supports FLAC. I had never heard of Wavpack before. It looks interesting, though I don't want to overstate my interest in supporting it...
We also should be thinking in terms both of:
- importing (e.g. TTBuffer, which already exists, needs to import and export files)
- streaming (for which we don't currently have a class)
Updated by Tim Place almost 2 years ago
I've done some more work and research into this. The Apple solution ultimately boils down to loading and using the AUAudioFilePlayer AudioUnit plug-in. So for MP3/AAC support (on the Mac) I think I should just finish the AU support and then we can play files that way. Maybe?
Maybe it would be difficult to automate the loading of files though? I'm not how that all works...
Then we could use libsndfile for the basic file playback mechanism. That would be cross-platform.
What does Pd do for soundfile playback?
Updated by Nils Peters almost 2 years ago
just stumbled over this:
http://www.un4seen.com/bass.html
it's a cross-platform lib for providing audio file support.
Updated by Tim Place about 1 year ago
- Status changed from New to Closed
There are still some remaining logistics to deal with, but this lib has been implemented for a while now...