From d68bede3741c568edb4e711f38ade5ac371476dc Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 10 Nov 2024 01:53:38 +0100 Subject: [PATCH] GstEnginePipeline: Fix fader fudge timer naming --- src/engine/gstenginepipeline.cpp | 18 +++++++++--------- src/engine/gstenginepipeline.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/engine/gstenginepipeline.cpp b/src/engine/gstenginepipeline.cpp index df99cf57c..cf7752036 100644 --- a/src/engine/gstenginepipeline.cpp +++ b/src/engine/gstenginepipeline.cpp @@ -142,7 +142,7 @@ GstEnginePipeline::GstEnginePipeline(QObject *parent) volume_percent_(100), fader_active_(false), fader_running_(false), - timer_fader_fudge(new QTimer(this)), + timer_fader_fudge_(new QTimer(this)), use_fudge_timer_(false), pipeline_(nullptr), audiobin_(nullptr), @@ -174,9 +174,9 @@ GstEnginePipeline::GstEnginePipeline(QObject *parent) eq_band_gains_.reserve(kEqBandCount); for (int i = 0; i < kEqBandCount; ++i) eq_band_gains_ << 0; - timer_fader_fudge->setSingleShot(true); - timer_fader_fudge->setInterval(kFaderFudgeMsec); - QObject::connect(timer_fader_fudge, &QTimer::timeout, this, &GstEnginePipeline::FaderTimelineFudgeFinished); + timer_fader_fudge_->setSingleShot(true); + timer_fader_fudge_->setInterval(kFaderFudgeMsec); + QObject::connect(timer_fader_fudge_, &QTimer::timeout, this, &GstEnginePipeline::FaderTimelineFudgeFinished); } @@ -2026,7 +2026,7 @@ void GstEnginePipeline::StartFader(const qint64 duration_nanosec, const QTimeLin fader_->setEasingCurve(shape); fader_->setCurrentTime(static_cast(start_time)); - timer_fader_fudge->stop(); + timer_fader_fudge_->stop(); use_fudge_timer_ = use_fudge_timer; SetFaderVolume(fader_->currentValue()); @@ -2072,15 +2072,15 @@ void GstEnginePipeline::FaderTimelineFinished() { // Wait a little while longer before emitting the finished signal (and probably destroying the pipeline) to account for delays in the audio server/driver. if (use_fudge_timer_) { - timer_fader_fudge->setInterval(kFaderFudgeMsec); - timer_fader_fudge->start(); + timer_fader_fudge_->setInterval(kFaderFudgeMsec); + timer_fader_fudge_->start(); } else { // Even here we cannot emit the signal directly, as it result in a stutter when resuming playback. // So use a quest small time, so you won't notice the difference when resuming playback // (You get here when the pause fading is active) - timer_fader_fudge->setInterval(250ms); - timer_fader_fudge->start(); + timer_fader_fudge_->setInterval(250ms); + timer_fader_fudge_->start(); } } diff --git a/src/engine/gstenginepipeline.h b/src/engine/gstenginepipeline.h index 6d5960203..0723757d8 100644 --- a/src/engine/gstenginepipeline.h +++ b/src/engine/gstenginepipeline.h @@ -329,7 +329,7 @@ class GstEnginePipeline : public QObject { mutex_protected fader_active_; mutex_protected fader_running_; SharedPtr fader_; - QTimer *timer_fader_fudge; + QTimer *timer_fader_fudge_; bool use_fudge_timer_; GstElement *pipeline_;