summaryrefslogtreecommitdiff
path: root/src/filter
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-11-24 17:21:23 +0100
committerMax Kellermann <max@musicpd.org>2016-11-24 17:34:57 +0100
commit5f396e824fd25b9d27b0866070d5c9addcbc3a07 (patch)
tree6abf00ca1ad9f0f0f2ca63a840572f723b68e42c /src/filter
parent4f229c254c5a99a95e080ec3e3c429990f29a41d (diff)
ReplayGainMode: convert to strictly-typed enum
Diffstat (limited to 'src/filter')
-rw-r--r--src/filter/plugins/ReplayGainFilterPlugin.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/filter/plugins/ReplayGainFilterPlugin.cxx b/src/filter/plugins/ReplayGainFilterPlugin.cxx
index da4a3bca2..3c8ce751d 100644
--- a/src/filter/plugins/ReplayGainFilterPlugin.cxx
+++ b/src/filter/plugins/ReplayGainFilterPlugin.cxx
@@ -50,7 +50,7 @@ class ReplayGainFilter final : public Filter {
*/
const unsigned base;
- ReplayGainMode mode = REPLAY_GAIN_OFF;
+ ReplayGainMode mode = ReplayGainMode::OFF;
ReplayGainInfo info;
@@ -72,7 +72,7 @@ public:
ReplayGainFilter(const AudioFormat &audio_format,
Mixer *_mixer, unsigned _base)
:Filter(audio_format),
- mixer(_mixer), base(_base), mode(REPLAY_GAIN_OFF) {
+ mixer(_mixer), base(_base) {
info.Clear();
pv.Open(out_audio_format.format);
@@ -94,7 +94,7 @@ public:
FormatDebug(replay_gain_domain,
"replay gain mode has changed %d->%d\n",
- mode, _mode);
+ (int)mode, (int)_mode);
mode = _mode;
Update();
@@ -138,7 +138,7 @@ void
ReplayGainFilter::Update()
{
unsigned volume = PCM_VOLUME_1;
- if (mode != REPLAY_GAIN_OFF) {
+ if (mode != ReplayGainMode::OFF) {
const auto &tuple = info.Get(mode);
float scale = tuple.CalculateScale(replay_gain_preamp,
replay_gain_missing_preamp,