In the following program can someone help me figure out why the close button [X] at the top right corner isn't working?

# imports
from Tkinter import *
from sound_panel import *
import pygame.mixer

# create gui
app = Tk()
app.title("Head First Mix")

# create mixder
mixer = pygame.mixer
mixer.init()

# call functions
create_gui(app, mixer, "50459_M_RED_Nephlimizer.wav")
create_gui(app, mixer, "49119_M_RED_HardBouncer.wav")

def shutdown():
        track.stop()
        app.destroy()
    
app.protocol("WM_DELETE_WINDOW", shutdown)
app.mainloop()

Looks like your problem is in module sound_panel and function call track.stop(). You have two tracks going, but only stop one.