Hi folks,
I was wondering if anyone knows how to stop a sound file once it has begun to play?
I have the following function:
def play_sound_stimulus(self, soundfile, vol):
play_audio1 = sound.Sound(value = soundfile)
play_audio1.setVolume(vol)
play_audio1.play()
And I execute it as follows:
self.play_sound_stimulus('StereoWN.wav', .05)
I was wondering how I can go about simply stopping the file (once a specific if condition I have written is met)?
I can’t see anything pertaining to sound files (I understand there is a stop/duration option for generated sound).
Thanks for your time.