|
10 | 10 |
|
11 | 11 | CINNAMON_SOUNDS = "org.cinnamon.sounds" |
12 | 12 | CINNAMON_DESKTOP_SOUNDS = "org.cinnamon.desktop.sound" |
13 | | -OVERAMPLIFICATION_KEY = "allow-amplified-volume" |
| 13 | +OVERAMPLIFICATION_OUT_KEY = "allow-amplified-out-volume" |
| 14 | +OVERAMPLIFICATION_IN_KEY = "allow-amplified-in-volume" |
14 | 15 |
|
15 | 16 | DECAY_STEP = .15 |
16 | 17 |
|
@@ -552,8 +553,8 @@ def buildLayout(self): |
552 | 553 | devSettings.add_row(self.woofer) |
553 | 554 |
|
554 | 555 | # overamplification |
555 | | - switch = GSettingsSwitch(_("Overamplification"), CINNAMON_DESKTOP_SOUNDS, OVERAMPLIFICATION_KEY) |
556 | | - switch.set_tooltip_text(_("Allow the volume to exceed 100%, with reduced sound quality.")) |
| 556 | + switch = GSettingsSwitch(_("Overamplification"), CINNAMON_DESKTOP_SOUNDS, OVERAMPLIFICATION_OUT_KEY) |
| 557 | + switch.set_tooltip_text(_("Allow the output volume to exceed 100%, with reduced sound quality.")) |
557 | 558 | devSettings.add_row(switch) |
558 | 559 |
|
559 | 560 | ## Input page |
@@ -583,6 +584,11 @@ def buildLayout(self): |
583 | 584 | devSettings.add_row(self.inLevel) |
584 | 585 | self.inputStack.add_named(inputBox, "inputBox") |
585 | 586 |
|
| 587 | + # overamplification |
| 588 | + switch = GSettingsSwitch(_("Overamplification"), CINNAMON_DESKTOP_SOUNDS, OVERAMPLIFICATION_IN_KEY) |
| 589 | + switch.set_tooltip_text(_("Allow the input volume to exceed 100%, with reduced sound quality.")) |
| 590 | + devSettings.add_row(switch) |
| 591 | + |
586 | 592 | noInputsMessage = Gtk.Box() |
587 | 593 | box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12) |
588 | 594 | image = Gtk.Image.new_from_icon_name("xsi-sign-forbidden-symbolic", Gtk.IconSize.DIALOG) |
@@ -632,20 +638,27 @@ def buildLayout(self): |
632 | 638 | noAppsMessage.pack_start(box, True, True, 0) |
633 | 639 | self.appStack.add_named(noAppsMessage, "noAppsMessage") |
634 | 640 |
|
635 | | - self.sound_settings.connect(f"changed::{OVERAMPLIFICATION_KEY}", self.onOverAmplificationChanged) |
636 | | - self.onOverAmplificationChanged() |
| 641 | + self.sound_settings.connect(f"changed::{OVERAMPLIFICATION_OUT_KEY}", self.onOverAmplificationOutChanged) |
| 642 | + self.onOverAmplificationOutChanged() |
| 643 | + self.sound_settings.connect(f"changed::{OVERAMPLIFICATION_IN_KEY}", self.onOverAmplificationInChanged) |
| 644 | + self.onOverAmplificationInChanged() |
637 | 645 |
|
638 | | - def onOverAmplificationChanged(self, settings=None, key=None): |
639 | | - overamplification = self.sound_settings.get_boolean(OVERAMPLIFICATION_KEY) |
| 646 | + def onOverAmplificationOutChanged(self, settings=None, key=None): |
| 647 | + overamplificationout = self.sound_settings.get_boolean(OVERAMPLIFICATION_OUT_KEY) |
640 | 648 | self.outVolume.slider.clear_marks() |
641 | | - self.inVolume.slider.clear_marks() |
642 | | - if overamplification: |
| 649 | + if overamplificationout: |
643 | 650 | self.outVolume.adjustment.set_upper(150) |
644 | | - self.inVolume.adjustment.set_upper(150) |
645 | 651 | self.outVolume.setMark(100) |
646 | | - self.inVolume.setMark(100) |
647 | 652 | else: |
648 | 653 | self.outVolume.adjustment.set_upper(100) |
| 654 | + |
| 655 | + def onOverAmplificationInChanged(self, settings=None, key=None): |
| 656 | + overamplificationin = self.sound_settings.get_boolean(OVERAMPLIFICATION_IN_KEY) |
| 657 | + self.inVolume.slider.clear_marks() |
| 658 | + if overamplificationin: |
| 659 | + self.inVolume.adjustment.set_upper(150) |
| 660 | + self.inVolume.setMark(100) |
| 661 | + else: |
649 | 662 | self.inVolume.adjustment.set_upper(100) |
650 | 663 |
|
651 | 664 | def inializeController(self): |
|
0 commit comments