diff --git a/src/mixer/plugins/AlsaMixerPlugin.cxx b/src/mixer/plugins/AlsaMixerPlugin.cxx index 0016a4598..cce432492 100644 --- a/src/mixer/plugins/AlsaMixerPlugin.cxx +++ b/src/mixer/plugins/AlsaMixerPlugin.cxx @@ -273,7 +273,7 @@ AlsaMixer::GetVolume() throw FormatRuntimeError("snd_mixer_handle_events() failed: %s", snd_strerror(err)); - return lrint(100 * get_normalized_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT)); + return lround(100 * get_normalized_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT)); } void @@ -282,7 +282,7 @@ AlsaMixer::SetVolume(unsigned volume) assert(handle != nullptr); double cur = get_normalized_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT); - int delta = volume - lrint(100.*cur); + int delta = volume - lround(100.*cur); int err = set_normalized_playback_volume(elem, cur + 0.01*delta, delta); if (err < 0) throw FormatRuntimeError("failed to set ALSA volume: %s", diff --git a/src/util/Math.hxx b/src/util/Math.hxx index e590f85c8..bd856f5a9 100644 --- a/src/util/Math.hxx +++ b/src/util/Math.hxx @@ -32,12 +32,9 @@ #ifdef __UCLIBC__ #include -using boost::math::iround; using boost::math::lround; -#define lrint iround #else #include -using std::lrint; using std::lround; #endif