title: How to fix sound?
body: <p>I have been stuck on this for way too long now. In my main menu screen, I have a mute button. I want it to call a method in my background service, which mutes all of the MediaPlayer audio that would be played in the background of my game.</p>
  
  <p>Here I am calling mute from my Main_Menu (x starts as 0):</p>
  
  <pre><code>   if ((x%2) == 0) { //If it's even
              TwentySeconds.unMute();
              Toast.makeText(Main_Menu.this, "UNMUTED", Toast.LENGTH_SHORT).show();
          x++;
      } else { //If its odd
          TwentySeconds.myMute();
          Toast.makeText(Main_Menu.this, "MUTED", Toast.LENGTH_SHORT).show();
          x++;
      }
  </code></pre>
  
  <p>Here are the methods in the service which actually do the muting:</p>
  
  <pre><code>       public static void myMute() {
          ten.setVolume(0, 0);
          three.setVolume(0, 0);
  }
  public static void unMute() {
          ten.setVolume(1, 1);
          three.setVolume(1, 1);
  }
  </code></pre>
  
  <p>Here are the actual media players, which play at intervals:</p>
  
  <pre><code>static MediaPlayer ten;
  static MediaPlayer three;
  </code></pre>
  
  <p>The problem is, I am getting a null pointer exception here:</p>
  
  <pre><code>TwentySeconds.myMute();
  </code></pre>
  
  <p><strong>and</strong>
      ten.setVolume(0, 0);</p>
  
  <p>By the way, manager is instantiated like so:</p>
  
  <pre><code>AudioManager manager;
  </code></pre>
  
  <p>and later on:</p>
  
  <pre><code>manager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
  </code></pre>
  
  <p><strong>Here is something that might be causing the issue:</strong></p>
  
  <p>I am getting the error whenever the audio plays (which plays fine):</p>
  
  <pre><code>QCMediaPlayer mediaplayer NOT present
  E/MediaPlayer﹕ Should have subtitle controller already set
  </code></pre>
  
  <p>I would really appreciate any feedback (positive or negative)!
  Let me know if you need any more code.</p>