Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/plugins/audio_sensors/audio_sensors.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-11-08 16:25:45 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-11-08 16:25:45 (GMT)
commita8949e1824eea7b05c21f409f33a9eb9d639a6c2 (patch)
tree96e16dbd865b7bc3fe16e001c902a542dc8db440 /plugins/audio_sensors/audio_sensors.py
parent7e06d7ced8b95f8b58492a945b30da38c797a596 (diff)
fix logic in mono/stereo sampling
Diffstat (limited to 'plugins/audio_sensors/audio_sensors.py')
-rw-r--r--plugins/audio_sensors/audio_sensors.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/audio_sensors/audio_sensors.py b/plugins/audio_sensors/audio_sensors.py
index f520330..eec73bb 100644
--- a/plugins/audio_sensors/audio_sensors.py
+++ b/plugins/audio_sensors/audio_sensors.py
@@ -331,9 +331,9 @@ class Audio_sensors(Plugin):
def prim_sound(self, channel=0):
if not self._status:
return 0
+ self._prim_sound(0)
# Return average of both channels if sampling in stereo
if self._channels == 2:
- self._prim_sound(0)
self._prim_sound(1)
return (self._sound[0] + self._sound[1]) / 2.0
else:
@@ -354,9 +354,9 @@ class Audio_sensors(Plugin):
def prim_volume(self, channel=0):
if not self._status:
return 0
+ self._prim_volume(0)
# Return average of both channels if sampling in stereo
if self._channels == 2:
- self._prim_volume(0)
self._prim_volume(1)
return (self._volume[0] + self._volume[1]) / 2.0
else:
@@ -377,9 +377,9 @@ class Audio_sensors(Plugin):
def prim_pitch(self, channel=0):
if not self._status:
return 0
+ self._prim_pitch(0)
# Return average of both channels if sampling in stereo
if self._channels == 2:
- self._prim_pitch(0)
self._prim_pitch(1)
return (self._pitch[0] + self._pitch[1]) / 2.0
else: