crash when volume more than 100%

Forums:

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

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.

My knowledge is still limited, but i hope to help people that just like me
have no or little understanding and for whom all the techno talk occurring in GNU/Linux forums creates more confusion then solution.

Here is my take on the situation :

MOC have restrictions on the playing level and will crash if the level exceed 100% unless you can compile and install it with with a no debug flag, in witch case the end behavior cannot be predicted. this is why it will crash in debug mode.

I didn't understand why it wouldn't launch, and had to resolve myself to use another software.

What i didn't realize, since i didn't understand the problem fully, and what i didn't see explained anywhere (reason why i am writing this comment), is that is it possible to just lower the volume with alsamixer and MOC will launch properly.

This might sound has an obvious solution to most savvy english speaking MOC users but this comment is aimed at the new users, so that they may not give up on MOC to soon.

If you really need to use MOC out of normal range, then this comment is not for you and you probably know what you are doing better then me.

In the dark even the simplest solutions can elude someone.

I hope i was help full to someone.

Keep using MOC it is a great software and deserve more attention !

This is a repeat on a comment placed in the node below,
It should have been in here, ohh well, my bad
I am not to familiar with forum posting
https://moc.daper.net/comment/6318#comment-6318

type alsamixer in terminal,lower the volume at 70 ,again type in terminal mocp /working again