GstEngine/GstEnginePipeline: support gap-less playback w/ loudness-normalizing gain

Ok, it does appear that it is that simple.

In principle this (even the non-update case) results in volume jumps,
so maybe we'll want gradual gain change...

Notably, i thought we'd always seek if the pipeline
was already operating on the same URL as the new one,
but apparently only for adjacent songs?
This commit is contained in:
Roman Lebedev
2023-07-09 22:29:08 +03:00
committed by Jonas Kvinge
parent f81816b0cd
commit 4bd993b1e3
3 changed files with 22 additions and 5 deletions

View File

@@ -87,6 +87,7 @@ class GstEnginePipeline : public QObject {
// Control the music playback
QFuture<GstStateChangeReturn> SetState(const GstState state);
Q_INVOKABLE bool Seek(const qint64 nanosec);
void SetEBUR128LoudnessNormalizingGain_dB(const double ebur128_loudness_normalizing_gain_db);
void SetVolume(const uint volume_percent);
void SetStereoBalance(const float value);
void SetEqualizerParams(const int preamp, const QList<int> &band_gains);
@@ -175,6 +176,7 @@ class GstEnginePipeline : public QObject {
static QString ParseStrTag(GstTagList *list, const char *tag);
static guint ParseUIntTag(GstTagList *list, const char *tag);
void UpdateEBUR128LoudnessNormalizingGaindB();
void UpdateStereoBalance();
void UpdateEqualizer();