code: def play(self, sound):
          
          self.is_done.clear()  # hold is_done until the sound is played
          if self.sr != sound.sr:
              raise ValueError('You can only play sound with a samplerate of {} (here {}). Use the Sound.resample method for instance.', self.sr, sound.sr)
  
          if sound in self.sounds:
              self.remove(sound)
  
          with self.chunk_available:
              self.sounds.append(sound)
              sound.playing = True
  
              self.chunk_available.notify()
          self.is_done.wait()
docs: Adds and plays a new Sound to the Sampler.
  
              :param sound: sound to play
  
              .. note:: If the sound is already playing, it will restart from the beginning.