diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2013-05-28 00:08:14 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2013-05-28 00:11:27 +0200 |
commit | 1feb244dce282abfa7838ec7a7d7acb977487338 (patch) | |
tree | d97406f83d7e7a9bd7cd08eb212cb7e2dd334043 /src/tags.h | |
parent | 4db97e55025e3eb33746aa9afdf2f2f4da132f9b (diff) |
song info: show replay gain info if available (flac/ogg only)
Diffstat (limited to 'src/tags.h')
-rw-r--r-- | src/tags.h | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -30,6 +30,40 @@ namespace Tags {// +struct ReplayGainInfo +{ + ReplayGainInfo() { } + ReplayGainInfo(std::string reference_loudness, std::string track_gain, + std::string track_peak, std::string album_gain, + std::string album_peak) + : m_reference_loudness(reference_loudness), m_track_gain(track_gain) + , m_track_peak(track_peak), m_album_gain(album_gain), m_album_peak(album_peak) { } + + bool empty() const + { + return m_reference_loudness.empty() + && m_track_gain.empty() + && m_track_peak.empty() + && m_album_gain.empty() + && m_album_peak.empty(); + } + + const std::string &referenceLoudness() const { return m_reference_loudness; } + const std::string &trackGain() const { return m_track_gain; } + const std::string &trackPeak() const { return m_track_peak; } + const std::string &albumGain() const { return m_album_gain; } + const std::string &albumPeak() const { return m_album_peak; } + +private: + std::string m_reference_loudness; + std::string m_track_gain; + std::string m_track_peak; + std::string m_album_gain; + std::string m_album_peak; +}; + +ReplayGainInfo readReplayGain(TagLib::File *f); + bool extendedSetSupported(const TagLib::File *f); void read(MPD::MutableSong &); |