Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
1. Removed Lang import 2. pactl is required to boost volume above 150% (now mentioned in description)
As I said in version 1 review (#5), use `mixercontrol` instead of spawn command. We are against spawn command when it can be done in gjs: https://gjs.guide/extensions/review-guidelines/review-guidelines.html#scripts-and-binaries I wrote this example for you that can change the output volume to the amplified max: ```js const Volume = imports.ui.status.volume; let control = Volume.getMixerControl(); let output = control.get_default_sink(); output.volume = control.get_vol_max_amplified(); output.change_is_muted(false); output.push_volume(); ``` and if you want to push it to normal max: ```js output.volume = control.get_vol_max_norm(); output.change_is_muted(false); output.push_volume(); ``` btw, if you only want to allow the output to go to the amplified max use gsettings id (`org.gnome.desktop.sound.allow-volume-above-100-percent`). Please join us on GNOME Matrix channel, we have a very friendly group there and you can ask us any questions related to extensions: - [GNOME Matrix Channel](https://matrix.to/#/#extensions:gnome.org) - IRC Bridge: irc://irc.gimpnet.org/shell-extensions
I understand the point here but I think gjs way/mixercontrol is of no use here because the objective of this extension is to get volume higher than max allowed volume and even after enabling the over amplification setting the limit is still 150% so I think it is absolutely necessary to use spawn and execute the pactl command in order to achieve more than 150% of amplification.
You can change the `vol_max_amplified`. To set it to 200%: ```js control.vol_max_amplified = control.get_vol_max_norm() * 2; ``` Now if any code use `control.get_vol_max_amplified()` it will return 200% of the normal max. But hold `control.vol_max_amplified` default value because you should revert it on disable. Just a question out curiosity, isn't 200% making a very high distortion? I've tested 200% on my setup (WooAudio WA7 -> Sennheiser HD 800) and the distortion is very high :p