コード例 #1
0
 public void stop() {
   if (mPlayer == null) return; // nothing to stop
   mRunning = false;
   try {
     if (mPlayer.getState() == Player.STARTED) {
       mPlayer.stop();
     }
     if (mPlayer.getState() != Player.CLOSED) {
       mPlayer.close();
     }
   } catch (MediaException e) {
     sLogger.error("Error stopping reveive stream", e);
   }
 }
コード例 #2
0
  public void checkValid() {
    super.checkValid();

    if (iPlayer.getState() == Player.CLOSED) {
      throw new IllegalStateException("Player is closed.");
    }
  }
コード例 #3
0
 public static final void Tiger_Sound_Final() {
   // #if (TIGER=="TRUE")
   if (SoundPlayer != null) {
     if (SoundPlayer.getState() == Player.STARTED) {
       try {
         SoundPlayer.stop();
       } catch (Exception e) {
       }
     }
     SoundPlayer.deallocate();
     SoundPlayer.close();
     SoundPlayer = null;
   }
   ;
   // #endif
 }