diff --git a/__init__.py b/__init__.py index 10407df..39c987e 100644 --- a/__init__.py +++ b/__init__.py @@ -72,7 +72,14 @@ def _get_mixer(self): try: # If there are only 1 mixer use that one mixers = alsa_mixers() - if len(mixers) == 1: + custom_settings = self.settings.get('use_custom_audio_settings', False) + if custom_settings: + # In case of custom settings use those + card_index = self.settings.get('card_index', -1) + control_name = self.settings.get('control_name', 'Master') + mixer = Mixer(control=control_name, cardindex=card_index) + elif len(mixers) == 1: + # If there are only 1 mixer use that one mixer = Mixer(mixers[0]) elif 'Master' in mixers: # Try using the default mixer (Master) diff --git a/settingsmeta.yaml b/settingsmeta.yaml index 3a1f33c..b036f20 100644 --- a/settingsmeta.yaml +++ b/settingsmeta.yaml @@ -6,3 +6,17 @@ skillMetadata: type: checkbox label: Duck while listening value: "true" + - name: Custom audio settings + fields: + - name: use_custom_audio_settings + type: checkbox + label: Use custom audio settings + value: "false" + - name: card_index + type: number + label: Sound card index + value: -1 + - name: control_name + type: text + label: Control name + value: "Master" \ No newline at end of file