i have a tkinter button setup for my program. it plays a sound file. however, if i press the button while the audio is playing, the sound file will be queued and play again once its over. i want the button to be unresponsive (so it doesnt queue the audio) while its playing. this is my code:
soundInstructions = 0
def setSoundInstructions(filename):
global soundInstructions
soundInstructions = os.path.join(filename)
def playInstructions():
playsound(soundInstructions)
soundButton = tkinter.Button(frame, image = soundImage, command = lambda: playInstructions(), borderwidth = 0, height= 25, width = 25)
soundButton.pack(side = TOP)