mixxxdj/mixxx — pull request #96 by daschuer (2013-11-14 21:56:08+00:00)
Title: Waveform dejerk: visualPlayPos + SyncThread + waveform refactoring

This branch contains the first transition of waveform dejerking.
It introduces a timestamped visual play position, a vsync thread for precise timing and the infrastructure to allow advanced vsync strategies.
In this merge, is only the simple pure timer sync strategy included for not making this merge too big.
The improvement is notable but the waveforms are still jerking.
A vsync test waveform type is included an is available by starting Mixxx with --developer.

--

The Implementation tries to display the right waveform picture in the right moment.
This is archived by the VisualPlayPosition Class. It is something like a time stamped Control object, using he new atomic ControlObjectBase for bypassing the delays from the Qt Mesasage Queue and the Sync Thread from the current Control Object implementation.

This way we get rid of unpredictable delays and mixed up message order during heavy load.

The time stamp ov the Visual Play position is generated by the Portaudio timeInfo VisualPlayPosition::setTimeInfo(timeInfo);
The Play position for the waveform is adjusted for the actual display time in
VisualPlayPosition::getAt

The display frame timing is done by a separate Thread. This is required because the Qt Timer event is not super precise. This thread controls the rendering process by using sleep() and semaphores.

Currently it is not using Time stamp information from the driver. I have relay good results with specific set-ups, but it is also suffering from driver quality in other set-ups. So I have removed this from the current merge request but I am planning to add additional advanced dejerking strategies using openGL from daschuers_trunk later.