title: How do I stop the background music in the arcade library?
body: <p>I need the music to play until the game is over, at which point I'd like it to stop, but nothing I try seems to work.
  Below is the shortened version of the code I'm working with. If anything, the sound should stop playing immediately because <code>self.game</code> is set to False in the update right away, but no matter what I try the music keeps playing.</p>
  <pre><code>import arcade
  
  
  SCREEN_WIDTH = 800
  SCREEN_HEIGHT = 600
  SCREEN_TITLE = &quot;Game&quot;
  
  
  class MyGame(arcade.Window):
      def __init__(self, width, height, title):
          super().__init__(width, height, title)
          self.game = True
          self.music = arcade.load_sound(&quot;soundtrack.wav&quot;)
  
      def setup(self):
          self.music.play()
  
      def on_draw(self):
          arcade.start_render()
          arcade.set_background_color(arcade.color.WHITE)
  
      def update(self, delta_time):
          self.game = False
          if not self.game:
              # stop the music
              ???
  
  
  window = MyGame(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
  window.setup()
  arcade.run()```
  </code></pre>