[yoshimi-user] Some Code Improvements on Special Offer...

  • From: "Stephen G. Parry" <sgparry@xxxxxxxxxxxxxx>
  • To: yoshimi-user@xxxxxxxxxxxxxxxxxxxxx
  • Date: Sun, 14 Feb 2010 00:11:57 +0000

Hi Cal,
As you know I have been working towards DSSI support in Yoshimi and I
have the following code changes to offer. I am having real trouble
hitting the moving target that is Yoshimi though. Stop doing so much
good work dammit!

These are the improvements

1. Rewrite of the DAZ FTZ setting code.
I had to rewrite the code for five reasons:
Firstly the original code does not compile under -fPIC which is required
for shared object (.so) files.
Secondly the current code checks the CPU capabilities and sets the flags
at the same time. In a plugin, this is not good as you will need to the
set the flags every time you enter the main processing loop (see later)
not just in main, but the caps only need checking at startup.
Thirdly, the code did not correctly handle those early P4 / Xeon
processors that are SSE2, but don't have DAZ: yeuch!.
Fourthly, the code needs to be able to meticulously set and reset the
flags at the start and end of each audio processing callback from the
host. This is because in a plug-in you are working in-process; the FTZ /
DAZ and Rounding flags are shared with countless other components like
other plug-ins and the host itself. Your choice of flags may seriously
upset them.
Fifthly, the code was not 64 bit friendly.

So I reviewed the Ardour code and looked at a lot of Intel documentation
(aaargh) and developed a pair of classes, one to handle getting the caps
at startup, and another to cleanly save, set and restore the flags.

2. Enhancements to the CMAKE scripts. This is to compile the plug-in as
an SO with no GUI classes.

3. Minor tweak to #ifdef out a block of gui dependent code in class
Master class.

I am still a few weeks off having DSSI working yet, but I would like to
get what I've done into the build. Question is: How? I was developing
against 0.053.3 and already I am way out!

I've attached what I've done so far. Most is heavily commented.

regards
Stephen Parry

Attachment: updated.tar.gz
Description: GNU Zip compressed data

Other related posts: