GstEnginePipeline: Fix fader fudge timer naming
This commit is contained in:
parent
b659b27f95
commit
d68bede374
|
@ -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<int>(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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -329,7 +329,7 @@ class GstEnginePipeline : public QObject {
|
|||
mutex_protected<bool> fader_active_;
|
||||
mutex_protected<bool> fader_running_;
|
||||
SharedPtr<QTimeLine> fader_;
|
||||
QTimer *timer_fader_fudge;
|
||||
QTimer *timer_fader_fudge_;
|
||||
bool use_fudge_timer_;
|
||||
|
||||
GstElement *pipeline_;
|
||||
|
|
Loading…
Reference in New Issue