`GstEngine::Load()`: different loudness-normalizing gain means new pipeline

This is a bit of a gotcha, there should be a point (where we seek?)
where we'd be able to change said gain, but for now this is a simple[r]
stop-gap fix.
This commit is contained in:
Roman Lebedev 2023-06-27 05:05:27 +03:00 committed by Jonas Kvinge
parent 13d6cf201f
commit e3a333564a
1 changed files with 2 additions and 1 deletions

View File

@ -190,8 +190,9 @@ bool GstEngine::Load(const QUrl &media_url, const QUrl &stream_url, const Engine
crossfade = false;
}
if (!crossfade && current_pipeline_ && current_pipeline_->stream_url() == stream_url && change & EngineBase::TrackChangeType::Auto) {
if (!crossfade && current_pipeline_ && current_pipeline_->stream_url() == stream_url && current_pipeline_->ebur128_loudness_normalizing_gain_db() == ebur128_loudness_normalizing_gain_db_ && change & EngineBase::TrackChangeType::Auto) {
// We're not crossfading, and the pipeline is already playing the URI we want, so just do nothing.
// FIXME: can we handle changing of loudness-normalizing gain here?
return true;
}