Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2012-12-04 16:53:25 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-12-04 16:53:25 (GMT)
commitd36a2809a6574d62ef4f52e860754e139f3c1c02 (patch)
tree20ac0c58e9f0d2853a50e5c45e63b6a2ed5e3057
parent2cb9bfd6b5fff0da48647b13d5ff4f72bea1136c (diff)
fix to #4288: properly set mic boost level on Xo 1.75HEADv44master
-rw-r--r--audiograb.py32
1 files changed, 17 insertions, 15 deletions
diff --git a/audiograb.py b/audiograb.py
index da945d0..da79f8b 100644
--- a/audiograb.py
+++ b/audiograb.py
@@ -725,33 +725,35 @@ class AudioGrab():
def set_mic_boost(self, mic_boost=False):
'''Set Mic Boost.
- True = +20dB, False = 0dB'''
+ for analog mic boost: True = +20dB, False = 0dB
+ for mic1 boost: True = 8, False = 0'''
if self._labels_available:
if self._mic_boost_control is None:
log.warning('set_mic_boost: no boost control in mixer')
return
- # If there is a flag property, use set_mute
- if self._mic_boost_control not in self._mixer.list_tracks() or \
+ # If there is a volume, use set volume
+ if hasattr(self._mic_boost_control, 'min_volume'):
+ if mic_boost:
+ log.debug('setting boost to %s' % (
+ str(self._mic_boost_control.max_volume)))
+ self._set_volume(self._mic_boost_control, 'boost', 100)
+ else:
+ log.debug('setting boost to %s' % (
+ str(self._mic_boost_control.min_volume)))
+ self._set_volume(self._mic_boost_control, 'boost', 0)
+ # Else if there is a flag property, use set_mute
+ elif self._mic_boost_control not in self._mixer.list_tracks() or \
hasattr(self._mic_boost_control.props, 'flags'):
+ log.debug('setting boost to %s' % (str(not mic_boost)))
self._set_mute(
self._mic_boost_control, 'Mic Boost', not mic_boost)
- # Otherwise, set volume to max or min value
- elif mic_boost:
- log.debug('setting boost to %s' % (
- str(self._mic_boost_control.max_volume)))
- self._mixer.set_volume(self._mic_boost_control,
- self._mic_boost_control.max_volume)
- else:
- log.debug('setting boost to %s' % (
- str(self._mic_boost_control.min_volume)))
- self._mixer.set_volume(self._mic_boost_control,
- self._mic_boost_control.min_volume)
else:
self.amixer_set('Mic Boost (+20dB)', mic_boost)
def get_mic_boost(self):
'''Return Mic Boost setting.
- True = +20dB, False = 0dB'''
+ for analog mic boost: True = +20dB, False = 0dB
+ for mic1 boost: True = 8, False = 0'''
if self._labels_available:
if self._mic_boost_control is None:
log.warning('get_mic_boost: no boost control in mixer')