How to get constant / smooth update rate? OSX10.6.6 of62o

Problem: My (lightweight) program only updates at it’s desired frame rate when I stick the mouse in it’s window and wiggle it about! i.e. As long as it’s receiving lots of I/O events it’s all good!

So - how do I get it’s priority to stay up?

I’ve verified this (and kind of solved it, but in a gross way) by setting up doing a:

  
ofSoundStreamSetup(0,2,this, 44100, 256, 4);  

and then a

  
  
    if(!psnFlag){ // just do this once   
        GetFrontProcess(&psn);  
        psnFlag=1;  
    }  
    CGEventRef e = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)83, true);  
    CGEventPostToPSN (&psn,e);  
    CFRelease(e);  
  

to generate fake keyboard events directed at the process.

(edit: I both do a ofSetFrameRate(30); and DON’T set vsync sync. )

So, the above “works” but what’s the right way to do this??