Commit e8f328d8 authored by Max Kellermann's avatar Max Kellermann

mixer/alsa: move code to GetPercentVolume()

parent 5f5b5f63
......@@ -107,6 +107,11 @@ private:
return get_normalized_playback_volume(elem,
SND_MIXER_SCHN_FRONT_LEFT);
}
[[gnu::pure]]
unsigned GetPercentVolume() const noexcept {
return NormalizedToPercent(GetNormalizedVolume());
}
};
static constexpr Domain alsa_mixer_domain("alsa_mixer");
......@@ -285,7 +290,7 @@ AlsaMixer::GetVolume()
throw FormatRuntimeError("snd_mixer_handle_events() failed: %s",
snd_strerror(err));
return NormalizedToPercent(GetNormalizedVolume());
return GetPercentVolume();
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment