A week of planning, research and reordering
My first week of summercoding was full of work and accomplishing - this week was the opposite. I started out by merging changes from Ardour's 3.0-branch to my branch and taking a look at what has been done there.
Next it was time to do some planning. Ardour's export code was not very modular, and I noticed I'll have to brake it down in any case. So, I decided to take a look at multimedia frameworks like gstreamer to use in renewing the export process. Unfortunately I didn't find anything that satisfied me.
Basically I had three requirements: quality, reliability and the possibility to export Wavpack encoded files with floating point samples. The last requirement might sound a bit strange, but Wavpack is actually the only free and open way to encode floating point audio losslessly. The other two very important formats: FLAC and ogg vorbis, are already implemented in a prerelease of libsndfile, the soundfile i/o library used by Ardour.
Since I didn't choose to use any new tools, I decided to start reordering the existing code. Ardour is distributed with its own patched version of libsndfile, since it needs some functionality that libsndfile doesn't have. I started by updating Ardour's version of libsndfile, which was not a very successful process. Libsndfile uses autotools and Ardour uses scons, so I tried to build it with scons. After many hours of fighting with it, I decided to just do an ugly hack, calling './configure' and 'make' from a python script executed by scons. In the end this was not a bad choice, since once the new version of libsndfile is released we will not need to distribute our own version of libsndfile anymore, and the hack can be dropped...
Next, it was time to do some actual reordering. Because exporting includes steps where the amount and format of data changes (SRC and format conversions) I decided to use a graph model, where I pipe the different processing modules, and feed the data into the first module. I made a simple C++ template based graph model (less then 100 lines of code), and moved the existing code into modules implementing the graph model so that It will be easier to add new functionality.
I haven't yet done any testing on the modules, so I think I'll start doing that right about now...
Comments
Post new comment