Has anyone ever tried to tame mixxx's engine?
its a different beast altogether ;)

There is a design based drawback of my last approach, let me explain by
starting from what I was trying to do.
Its simple, I set the distance traveled by mouse as rate using scratch2 CO
but before I do this I check if engine has yet synced
(ControlObject::sync()) last value I have set. This check calls for 3 cases:
1. Engine has synced exactly once -> great, this is what I want.
2. Engine has not synced yet -> add the last value of distance  to current
value then set
3. Engine has synced more than once -> last set value has been used more
than once, so subtract the product of last value and one less than number of
times engine has synced from the present value and set this new resultant
value.

The design problem is in case 3.
Just imagine  what will happen to sound output. Engine has first played the
audio few seconds more than needed and then I try to bring waveform one on
one with mouse  by playing those extra few seconds in reverse. Crap!

So here is a *new* approach:
Set the new rate only after engine has synced last value.
To do this, I have started a thread which checks if engine has yet synced.
If yes, shoot a signal that will tell a slot in WGLWaveformViewer to
calculate new distance and set it.
Cool, at first sight it looks as of this is should work. :-)

I have already implemented this approach, This approach has a design flaw
again - sometimes engine is so fast that before the slot in
WGLWaveformViewer sets a new value, engine has already synced again. That
means my last set value has been used more than once!

Now I need some help.
In a nutshell this is what is to be done
"Set the new rate only after engine has synced last value."

Any idea guys? Any random idea how this can be done. Random ideas might help
me to make up something that may work.
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to