parameters: (self)
docstring: Stops any ongoing playback
docstring_summary: Stops any ongoing playback
docstring_tokens: Stops any ongoing playback
function: def stop(self):
          """Stops any ongoing playback"""
          lock = self.lock
          playdata = self.playdata
          if playdata['thread'] is not None: 
              #playing
              lock.acquire()
              playdata['stop'] = 1
              lock.release()
              playdata['thread'].join()
              playdata['thread'] = None
              playdata['stop'] = 0
              self.pausebutton.disabled = True
              self.playbutton.disabled = False
function_tokens: def stop ( self ) : lock = self . lock playdata = self . playdata if playdata [ 'thread' ] is not None : #playing lock . acquire ( ) playdata [ 'stop' ] = 1 lock . release ( ) playdata [ 'thread' ] . join ( ) playdata [ 'thread' ] = None playdata [ 'stop' ] = 0 self . pausebutton . disabled = True self . playbutton . disabled = False