Jump to content

Photo

How do I change volume step increment?

sound volume increment

  • Please log in to reply
6 replies to this topic

#1 robot774

robot774

    Member

  • Members
  • 26 posts
  • LocationOlso

Posted 11 December 2016 - 08:02 PM

Currently when I press the media keys on this PC the volume goes up or down in 10% increments. 

As these buttons on the PC have no tactile/haptic feedback, they are just little lights above the keyboard, and as they seem to be massively sensitive to touch, I am either racing to full volume in a fraction of a second or muting the audio.Headphones with this PC is therefore dangerous, as I risk deafening myself :/   

 

Is there a way to change the %age step increment to a lower value?

 

All the Ubuntu (Gnome) answers I get from a search say it is no longer possible but as ti now hardcoded value, although it used to be possible to change it in a conf file somewhere. Seems like it is controlled by the desktop manager/environment. Search results for Moksha/E17 seem to be non-existent, so it possible in Moksha to change this value?

 

 





A big thank you to everyone who contributes to Bodhi Linux


#2 The waiter

The waiter

    Module Master

  • Developer
  • 1657 posts
  • LocationBanska Bystrica, Slovakia

Posted 11 December 2016 - 09:21 PM

Yes, it is possible.

Try to add new bindings for your keyboard controls. Open Key bindings and associate your key with command under Launch section.

 

For volume increasing: amixer -D pulse sset Master 5%+ 

For volume decreasing: amixer -D pulse sset Master 5%-

 

e-584dc279d44497.47718674.jpg

 

Let me know if works correctly.

 

And enjoy if works :)



#3 Jeff

Jeff

    Lead Developer

  • Developer
  • 12522 posts
  • LocationBloomington, IL

Posted 11 December 2016 - 09:30 PM

It is also hard coded into Moksha's mixer. Might be worth adding a setting for - or at the very least changing it to a 5% step. I've been thinking 10% is a bit much for my own personal normal use as well.



#4 The waiter

The waiter

    Module Master

  • Developer
  • 1657 posts
  • LocationBanska Bystrica, Slovakia

Posted 11 December 2016 - 09:37 PM

Yes, it is not problem to do that in source.

 

https://github.com/t...le/e_mod_main.c

 

After some investigation I have found we need to replace this line:

#define VOLUME_STEP (PA_VOLUME_NORM / BASE_VOLUME_STEP)

to

#define VOLUME_STEP (PA_VOLUME_NORM / 100 * 5)

 

and we have +/- 5 % volume increase/decrease

 

As you wish

 

PS: I am also for setting possibility (maybe slider widget) for changing the percentage. Need to be aware of saving and loading that value. Little bit laborious but possible to do...



#5 robot774

robot774

    Member

  • Members
  • 26 posts
  • LocationOlso

Posted 12 December 2016 - 05:58 PM

I could live with this for a while if a fix was coming in an update, even in the next increment number of Bodhi. The audio appears to be working a lot better in 4.0 than it was in 3. I had problems before getting the sound to un-mute from the icon in the shelf. Works much better now.  

 

I'll give the Waiter's method a try when I get some time. 

 

Thanks for the answers :)



#6 The waiter

The waiter

    Module Master

  • Developer
  • 1657 posts
  • LocationBanska Bystrica, Slovakia

Posted 12 December 2016 - 06:13 PM

I have just commited that line to the source. Jeff is planning making a deb tomorow, so just upgrade your system and your dream will come true ;)

 

Stefan



#7 The waiter

The waiter

    Module Master

  • Developer
  • 1657 posts
  • LocationBanska Bystrica, Slovakia

Posted 19 December 2016 - 06:18 PM

I have noticed Jeff updated pulsemixer with my code change with step +/- 5% in testing repo. Switch for testing if you like. 







Also tagged with one or more of these keywords: sound, volume, increment

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users