On Feb 17, 2007, at 8:58 AM, Luis Cordova wrote:

great. I changed the blockmovedata to memmove and set CoreServices
to point to C:\WINDOWS\system32\crtdll.dll which is the dll that holds
the memmove function and it works now; I just tried a wav file and it
looks like it flickers a lot but at least I see the canvas, the wave
is also being erased as it advances and again lots of flickering, I
bet this is not the case in a Mac so I would probably have to adjust
some more parameters. Has anyone seen the same flickering?

Yes, what everyone else has said… double buffering. Basically you draw everything to a Picture first and then at the last second you draw that picture to the canvas. This will stop flicker compared to drawing each individual thing to the canvas itself. Mac OS X doesn't have to worry about this because the OS itself has double-buffering built-in. Mac OS 9, Win32, and Linux(?) require this for no flicker drawing. Joe Strout once explained this on the list years ago and I made a flicker free class from his post that I've used ever since. You can download a copy here.

http://sonicamigos.com/etejkowski/code/flickerFreeCanvas.zip

I believe that I started the waveform canvas off with the intention of it being double buffered for other operating systems, because all of the elements of the above canvas are included in the waveform code. Somewhere along the way I must have stopped paying attention to it, since I was programming on OS X. The problem appears to be in the Draw function. All of the g.SomeFunction calls are probably what's causing the problem. They need to be drawing to an "offscreen" picture object, not to g. Then, you draw that offscreen picture object to g. If I had a Windows machine handy, I'd help. But I don't, so it's tough for me to debug. I'm confident it could be fixed with about 2 minutes of work. Maybe you could post your semi-working example and some Win32 folks on the list who understand double- buffering can help tweak it. Sorry that I can't help more. If you get this fixed, let me know and I'll include the changes in my download for other's benefit.

Erick_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to