crash when volume more than 100%

Hi
i'm using Ubuntu 17.04
and MOC 2.6-alpha3
When i "allow louder than 100%" in sound settings and set volume more than 100%
my moc crash with follow message

Running the server...
Trying JACK...
Trying ALSA...
mocp: alsa.c:319: alsa_read_mixer_raw: Assertion `RANGE(0, vol, 100)' failed.

FATAL_ERROR: Server exited!

sometimes i realy need volume more than 100%
so please fix it or make variable in config enable or disable it

thanks

Forums:

Hi open64,
Did you compile MOC from sources?

Similar issue fixed previously: 565
Reported to mocmaint.
Thanks

No
i'd install form apt-get
So I'll try compile from source

MOC assumes that ALSA behaves reasonably. Apparently with Pulseaudio it is not always the case. Probably MOC should call snd_mixer_selem_get_playback_volume_range() and see what's really maximum limit of volume.

As a temporary measure you may compile MOC with debug disabled, that would disable all assert checks. However MOC may misbehave as it is designed for volumes in the range 0-100.

Ok
i'll try to compile from source without debug

As is often the case, there are several facets to this issue, none of which at this stage seem constitute a bug. A 100% volume should represent the maximum value of which the system's configuration is capable.

I can come up with three possible explanations for why you would want to do this, but simply allowing the volume to exceed the maximum available value is not the solution to any of them. Could you explain the reason behind your requirement?

Additional notes:

  • Thank you for reporting your distro and MOC release.
  • Where are you finding this "allow louder than 100%" setting?
  • The queries and sentiments in the thread referred to by "kmws" echo my thoughts on this issue.

I don't believe it is really the point. What matters for MOC is that ALSA can disregard "snd_mixer_selem_set_playback_volume_range" call and return values outside of this range. I don't know if it is a "feature" or a "bug" in ALSA, but (as we discussed before) MOC should be prepared to handle that.

I believe this behavior was introduced by Lennart at some point.

100% is 0dB in terms of PulseAudio, it simply means that no amplification is applied to the output. The maximum is 11dB (153%). That's how PA backend for ALSA works, and I think it's a mess.