Ejemplo n.º 1
0
 // stop recodrding for extaudio class
 private void stopRecording() {
   mExtAudioRecorder.stop();
   mExtAudioRecorder.release();
   mRecordTime.stop();
   //        mRecordTime.setVisibility(View.INVISIBLE);
   showSoundController();
   mIsRecording = false;
   mRecordingTimer.cancel();
 }
Ejemplo n.º 2
0
  public void onFinish() {
    if (mExtAudioRecorder != null) {
      mExtAudioRecorder.release();
      mExtAudioRecorder.stop();
      mExtAudioRecorder = null;
    }
    if (mPlayer != null) {
      mPlayer.release();
      mPlayer = null;
      mIsPlaying = STOP;
      mPlayPause.setImageResource(R.drawable.ic_play);
    }

    super.onDestroy();
  }
Ejemplo n.º 3
0
 public void onPause() {
   super.onPause();
   if (mExtAudioRecorder != null) {
     stopRecording();
     mExtAudioRecorder.release();
     mExtAudioRecorder.stop();
     mExtAudioRecorder = null;
   }
   if (mPlayer != null) {
     mPlayer.release();
     mPlayer = null;
     mIsPlaying = STOP;
     mPlayPause.setImageResource(R.drawable.ic_play);
   }
 }