Support pulsesink audio drift correction
Summary
The current implementation of pulsesink does not track clock drift of the audio shmdata and the pulse device. This results in more or less dropouts when a shmdata is read by the pulsesink, if this shmdata is not clocked from the pulsesink selected device.
In addition, jack is using a custom and naive resampling algorithm, the resampling could use the optimised libsamplerate library (BSD licence), already used in the resample quiddity.
Accordingly, the request here is to implement drift measurement and audio resample in order to avoid these dropouts, as it is already done with the shmdata-to-jack quiddity.
How would you like the feature to work ?
I would like the feature to work as it is working now for the shmdata-to-jack quiddity.
The implementation could be done as follows:
- move several classes from the jack quiddity (drift observer, audio ring buffer and resampler)
- replace custom resampling algorithm in resampler class with the use of libsamplerate
- implement the use of these classes into pulsesink
Why is this feature important to you ?
It is important in order to make Switcher fully enabled with audio over pulse, and more particularly with HDMI capture audio streams.
Impact of non completion
Pulsesink will remain almost useless for live audio display. Then any live capture audio stream must be played through the jack audio server.