(self, source, volume, duration, loop)
Generate a noise.
Generate a noise.
Generate a noise .
def emit_noise(self, source, volume, duration, loop):
        """Generate a noise."""
        frequency = self._noise_freq[source]
        # no sound if switched off
        if not (self._beep_on or self._sound_on):
            volume = 0
        noise = signals.Event(signals.AUDIO_NOISE, (source > 3, frequency, duration, loop, volume))
        self._queues.audio.put(noise)
        self._voice_queue[3].put(noise, None if loop else duration, True)
def emit_noise ( self , source , volume , duration , loop ) : frequency = self . _noise_freq [ source ] # no sound if switched off if not ( self . _beep_on or self . _sound_on ) : volume = 0 noise = signals . Event ( signals . AUDIO_NOISE , ( source > 3 , frequency , duration , loop , volume ) ) self . _queues . audio . put ( noise ) self . _voice_queue [ 3 ] . put ( noise , None if loop else duration , True )