Song: add EBU R 128 Integrated Loudness and Loudness Range fields, DB [de]serialization

Again, pretty boring boilerplate, rather identical to the handling of
other fields. We do need to be careful when [de]serializing it, though,
we don't want to accidentally loose the `NULL` (i.e. unknown) state!
This commit is contained in:
Roman Lebedev
2023-06-27 04:55:36 +03:00
committed by Jonas Kvinge
parent 73c56f038e
commit 459c4c5d86
2 changed files with 29 additions and 0 deletions

View File

@@ -24,6 +24,8 @@
#include "config.h"
#include <optional>
#include <QtGlobal>
#include <QSharedData>
#include <QSharedDataPointer>
@@ -211,6 +213,9 @@ class Song {
const QString &musicbrainz_release_group_id() const;
const QString &musicbrainz_work_id() const;
std::optional<double> ebur128_integrated_loudness_lufs() const;
std::optional<double> ebur128_loudness_range_lu() const;
bool init_from_file() const;
const QString &title_sortable() const;
@@ -296,6 +301,9 @@ class Song {
void set_musicbrainz_release_group_id(const QString &v);
void set_musicbrainz_work_id(const QString &v);
void set_ebur128_integrated_loudness_lufs(const std::optional<double> &v);
void set_ebur128_loudness_range_lu(const std::optional<double> &v);
void set_stream_url(const QUrl &v);
const QUrl &effective_stream_url() const;