Beispiel #1
0
 def set_relative_aed(self, aed, speaker_angles):
     """
     @param aed: azimuth, elevation, distance
     @param speaker_angles: list of aed for each speaker
     @type aed: list
     @type speaker_angles: list
     """
     # TODO: set_xyz should call this
     index = 0
     for angle in speaker_angles:
         factor = maths.angles_to_attenuation(aed, angle, self._spread)
         self._mixer.setAmp(0, index, factor)
         log.debug("factor[%d]: %f" % (index, factor))
         index += 1
     self._previous_aed = aed
     self._previous_speakers_angles = speaker_angles
Beispiel #2
0
 def _test(speaker_aed, source_aed, expected_volume, exponent=2.0):
     self.failUnlessEqual(maths.angles_to_attenuation(speaker_aed, source_aed, exponent), expected_volume)