audio: master-clock playback timing, output clock compensation, buffer config, interpolated speed
- playback timer uses the audio output device as its master clock: the PortAudio callback counts consumed frames (including underrun zero-fill) so video cannot drift away from what is heard; wall clock remains as fallback when no clocked output is running - output clock compensates for device output latency; new Preferences > Audio buffer size setting (0 = auto) - SampleBuffer::speed() now uses linear interpolation instead of nearest-neighbor sampling - regression tests: audio-clock driven timer (fwd/rev/speed), wall clock fallback, interpolation correctness
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <QScreen>
|
||||
#include <QTextEdit>
|
||||
|
||||
#include "audio/audiomanager.h"
|
||||
#include "common/define.h"
|
||||
#include "common/html.h"
|
||||
#include "common/qtutils.h"
|
||||
@@ -1632,7 +1633,8 @@ void ViewerDisplayWidget::play(const int64_t &start_timestamp,
|
||||
playback_timebase_ = timebase;
|
||||
playback_speed_ = playback_speed;
|
||||
|
||||
timer_.start(start_timestamp, playback_speed, timebase.to_double());
|
||||
timer_.start(start_timestamp, playback_speed, timebase.to_double(),
|
||||
AudioManager::instance());
|
||||
|
||||
if (start_updating) {
|
||||
connect(this, &ViewerDisplayWidget::frame_swapped, this,
|
||||
|
||||
Reference in New Issue
Block a user