Cantabile Development Blog

Follow the development of music software Cantabile

Articles | Full Index | RSS Feed


Menus and Sample Conversion Routines

Today I implemented the rendering of Cantabile's new menus. Still need to implement the ability for menus to "popup" + checked and disabled menu items.

images/Menu.png

Also, I've started work on the audio engine, re-implementing most of Cantabile's sample conversion and mixing routines. Because I'm planning to do a 64-bit version of Cantabile and the Microsoft x64 compiler doesn't support inline assembler, I need to re-write any existing assembler routines in C++.

I've been very impressed by the optimizing C++ compiler in Microsoft Visual Studio 2005. Compared to Visual Studio 6 (used to build Cantabile 1.2) it seems to always generate significantly faster code, and for the sample conversion routines I've found it usually matches and occasionally outperforms some my hand crafted assembler routines. Investigating the generated code reveals it often does loop unrolling for tight loops. This, combined with its new profile guided optimization features (which I haven't tried yet), I'm hoping for quite a boost to the audio engine.

Next in this area is to write a comprehensive set of unit and performance tests for this critically important part of the audio engine.

Posted on April 12, 2007

Share This

Posted on April 13, 2007

Adam Zey says:

Any plans for supporting larger buffers (multi-second buffers) for situations where latency doesn't matter, but CPU usage might be nearly pegged with spikes that can empty the buffer?

The plan for stage 2 of offline rendering partially reduces the need for this, because if you want something done at high quality you can just render it offline and play it back, but something like a two or five second buffer would make it possible to play back a track in "real time" that has a few difficult spots but is otherwise playable on the fly.

Leave A Comment

All comments will be reviewed for spam before being displayed.