7771139cdf
* The first problem was the O(n^2) complexity of the algorithm, it's now linear and try to act in a circular way by dispatching events and reading the port in a balanced way. This exclude a certain degree of possible deadlocks. * Add detection and escape when the system try to kill the thread. This solve some blocking issues on exit et similia that i had with libjackcompat. * The algorithm choose soon which event to focus on. * Lateness is calculated just before the event is dispatched as it is the more appropriate place, otherwise we would be calculating something imprecise/guessed. * Remove timed_event_queue::queued_time. It's more precise to just use the RealTime() before to Dispatch the event. * It should solve the BSoundPlayer lateness problems. * With those improvements the media_kit is not going to lock completely under stress conditions, instead it try to work in a best effort shape. * There's still room for improvements, for example i'm considering some strategies in lateness situations such as update scheduling latency, try to decrease waiting time and detect when we are too early on the other hand to recover when the load go down. * Thanks to Julian Harnath for sharing his WIP patch which helped with some controls such as avoiding negative lateness. * Comments are welcome! |
||
---|---|---|
.. | ||
Buffer.h | ||
BufferConsumer.h | ||
BufferGroup.h | ||
BufferProducer.h | ||
Controllable.h | ||
FileInterface.h | ||
MediaAddOn.h | ||
MediaDecoder.h | ||
MediaDefs.h | ||
MediaEncoder.h | ||
MediaEventLooper.h | ||
MediaFile.h | ||
MediaFiles.h | ||
MediaFormats.h | ||
MediaNode.h | ||
MediaRoster.h | ||
MediaTheme.h | ||
MediaTrack.h | ||
ParameterWeb.h | ||
PlaySound.h | ||
RealtimeAlloc.h | ||
Sound.h | ||
SoundFile.h | ||
SoundPlayer.h | ||
TimeCode.h | ||
TimedEventQueue.h | ||
TimeSource.h |