title: Pause, unpause music in PyGame on KEYDOWN
body: <p>I've created a game loop that pauses if the spacebar is pressed.
  The loop is pausing and unpausing as expected but the music playing in the background does not restart when clicking spacebar, only the game itself.</p>
  <p>My code looks like this:</p>
  <pre><code>paused = False
  
  while loop:
  
          if event.type == pygame.KEYDOWN:
              if event.key == pygame.K_SPACE:
                  mixer.music.pause()
                  paused = not paused
  if paused == True:
      continue
  </code></pre>
  <p>The game itself pauses and unpauses as expected when pressing spacebar.</p>
  <p>How do I also catch the <code>mixer.music.unpause()</code>?</p>
  <p>Have tried adding this before the <code>continue</code> but it does not work:</p>
  <pre><code>if mixer.music.pause() == True:
      mixer.music.unpause()
      continue
  </code></pre>
  <p>Also tried creating and calling a function that checks if <code>mixer.music.pause()</code> is <code>True</code>, but am unable to get it to work. Can someone please point me in the right direction?</p>