(self)
Emit a sound.
Emit a sound.
Emit a sound .
def emit(self):
        """Emit a sound."""
        if not self._proc or (self.loop and not self._proc.is_alive()):
            self._proc = threading.Thread(
                target=self._beep, args=(self._frequency, self._duration, self.loop))
            self._proc.start()
        # return self if still busy, None otherwise
        if self._proc and self._proc.is_alive():
            return self
        else:
            return None
def emit ( self ) : if not self . _proc or ( self . loop and not self . _proc . is_alive ( ) ) : self . _proc = threading . Thread ( target = self . _beep , args = ( self . _frequency , self . _duration , self . loop ) ) self . _proc . start ( ) # return self if still busy, None otherwise if self . _proc and self . _proc . is_alive ( ) : return self else : return None