Hello, I have written a libsndfile (http://www.mega-nerd.com/libsndfile/) file output plugin for libao. For the moment I haven't done any changes to the core of libao. However some changes could make this more useful. Before I embark on anything like this I'd like to have your opinion on a few things. --- First, what do you prefer ? 1a. Keeping the AU/WAV/RAW plugins and adding libsndfile output as a new possibility, along potential other library-based output plugins (the current state of things). 1b. Getting rid of the (partial) AU/WAV/RAW implementations and using a good audio file I/O library. In that case, should the library be mandatory or should file output be optional ? 1c. Making it a compile time choice. By default, use the library if available, the built-in plugins otherwise. 1d. In cases (1b) and (1c) opting for a specific library (libsndfile is a very good choice for many reasons), instead of leaving the possibility to choose among several ones (which means more work) ? I don't like (1a) myself. For an explanation, see http://www.catb.org/jargon/html/R/reinvent-the-wheel.html. Just kidding... --- In any of these cases some changes could be useful, like 2a. (In case 1a) Passing the filename to the file output plugin so that it can guess the format by looking at the extension. Having to type "ogg123 -d sndfile -f x.wav -o format:wav" is ridiculous. 2b. Have a new "file" device that accepts an optional format option (or uses the file extension) and then dispatch to the right plugin. This is great because you could just type "ogg123 -d file x.wav x.ogg" and not have to worry about the choice of plugin for each format, which is now a compilation or configuration issue. I like this. Waiting for your comments. Best regards, Antoine Mathys
On Sun, Apr 23, 2006 at 12:23:18AM +0200, Antoine Mathys wrote:> I have written a libsndfile (http://www.mega-nerd.com/libsndfile/) file > output plugin for libao.Cool! Does this give us AIFF support too?> 1a. Keeping the AU/WAV/RAW plugins and adding libsndfile output as a new > possibility, along potential other library-based output plugins (the > current state of things).I prefer this.> 1c. Making it a compile time choice. By default, use the library if > available, the built-in plugins otherwise.Followed by this. libao should still work without dependencies, but optionally replacing the implementation of the file output devices with calls to libsndfile would be ok. (are there actual problems with the current file device implementations?)> In any of these cases some changes could be useful, like > 2a. (In case 1a) Passing the filename to the file output plugin so that > it can guess the format by looking at the extension. Having to type > "ogg123 -d sndfile -f x.wav -o format:wav" is ridiculous.I think it makes more sense to do this in ogg123 than in libao. That is, just patch it to automagically set the format option from the extension if (a) the libsndfile device is being used and (b) the user hasn't set it explicitly. IMO, -r
>> I have written a libsndfile (http://www.mega-nerd.com/libsndfile/) file >> output plugin for libao. >> > > Cool! Does this give us AIFF support too? >Yes, with some others like PAF, VOC, SVX or SF.> (are there actual problems with the > current file device implementations?) >Problems I do not know, but missing features yes. libsndfile supports PCM (U8, S8, S16, S24, S32, float 32, float 64), A-Law, U-Law, ADPCM (G721, IMA, Microsoft), DWVW (12, 16, 24) and DPCM (8, 16) in all the formats that allow it. It supports meta-data and is of course better tested, and requires no maintenance.