From a8949e1824eea7b05c21f409f33a9eb9d639a6c2 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Fri, 08 Nov 2013 16:25:45 +0000 Subject: fix logic in mono/stereo sampling --- (limited to 'plugins/audio_sensors') 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: -- cgit v0.9.1