fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[fluid-dev] libsndfile support for file rendering


From: josh
Subject: [fluid-dev] libsndfile support for file rendering
Date: Wed, 30 Sep 2009 23:01:57 -0700
User-agent: Internet Messaging Program (IMP) H3 (4.1.6)

I'm starting on the task of adding choice of file formats for -F
fast file rendering output.  I've decided on using libsndfile over
libaudiofile, since it seems to be the most active as far as
development.  This would be an optional dependency.  Not having
support compiled in would mean raw output would be used, as it is currently.

Here are my thoughts of how this will work:

- Add a command line switch (-t perhaps) which takes a string which consists of a file type field, audio format and endian field, separated by colons. The order wouldn't matter and all fields are optional. Some examples: "wav:float", "wav:s16", "flac:s24", "aiff:s16:be", "raw:s16:le".

- The special format type "auto", the default, would try and determine
the format by extracting the extension of the file name and falling
back to .wav if it can't be determined.

For now it will be limited to stereo output, but we could add support in the future for more than 2 channel audio (for rendering individual MIDI channels to different audio channels for example).

So I'm proposing adding a format parameter (the ':' separated string described above) to new_fluid_file_renderer() like this:

fluid_file_renderer_t *
new_fluid_file_renderer(fluid_synth_t* synth, char* filename, char* format,
                        int period_size);

I'm also considering removing the use of audio.file.name, since it isn't used directly by the filerenderer, so this association isn't useful outside of the fluidsynth executable. The synth.sample-rate setting would be used though.

What do you think?

Josh





reply via email to

[Prev in Thread] Current Thread [Next in Thread]