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); } }
public void checkValid() { super.checkValid(); if (iPlayer.getState() == Player.CLOSED) { throw new IllegalStateException("Player is closed."); } }
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 }