Reworked processing thread in WinMMAudioStream:
- extracted current playing position getter to be used for MIDI event timestamping further
- close() waits for processing thread seemingly better
- WinMMAudioStream can now estimate proper MIDI event timestamp
- OK, what I thought a Qt bug appears a problem with underlying system; debugging code removed
- Trying to use synth's internal MIDI queue with WinMMAudioStream
- Fixed NULL pointer access when playing a MIDI event on closed SynthRoute
- Fixed timing problems after closing / reopening SynthRoute
- Partial count now has sane value when the synth is not opened
- SynthStateMonitor now caches the synth's partial count
- Swapped fields in debug MIDI event output for convenience
- PortAudio is now able to timestamp MIDI events perfectly using ClockSync synchroniser
- Implemented MIDI timestamp calculation for PortAudio in advanced timing mode
ClockSync improvement:
- eliminated "latency resync" stuff
- inverted master and external in offsets and drift -> less confusion
- drift calculation now relies on average clock offset to avoid sporadic jitter and make sample rate more stable
- renamed reset method to emphasise its actual function
- when desynchronisation encountered, reset is scheduled on the next sync which is assumed to provide more accurate data
- PortAudio and QtAudio drivers adopted
- Hmm, this is really amazing
- PortAudio now supports default refNanos in estimateMIDITimestamp()
- MIDI timestamp is now computed with proper sample rate estimation when a late event comes after the time info gets updated
- MinGW compatible WinMMAudioDriver
Audio drivers rework:
- nuked QMidiEventQueue, incoming events are now supposed to be timestamped on the fly and added to the internal synth's queue
- common timing-related methods and fields moved to abstract AudioStream class
- audio drivers adopted to the new design
- removed from WinMM driver those paranoid x-run checks (moreover, incorrect for Vista+)
- more code cleanup
QtAudioDriver improvement:
- rendering is performed in a dedicated thread instead of the main thread to improve audio smoothness
- fixed timing problem with clocksync at startup
- Added timeout when closing WinMMAudioDriver driver
- Fixed a merge issue
- Fix for ProtAudio latency calculation
- Fixed NULL pointer access which happened on audio driver failure
- Fixed incorrect chunk sizes in ALSA audio driver if the audio latency is limited by the ALSA PCM subsystem