Exemplo n.º 1
0
  private void startRecording() {
    setRecordingFile();

    mExtAudioRecorder = ExtAudioRecorder.getInstanse(false);
    mExtAudioRecorder.setOutputFile(mFilePath);
    mExtAudioRecorder.prepare();
    mExtAudioRecorder.start();
  }
Exemplo n.º 2
0
 // stop recodrding for extaudio class
 private void stopRecording() {
   mExtAudioRecorder.stop();
   mExtAudioRecorder.release();
   mRecordTime.stop();
   //        mRecordTime.setVisibility(View.INVISIBLE);
   showSoundController();
   mIsRecording = false;
   mRecordingTimer.cancel();
 }
Exemplo n.º 3
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();
  }
Exemplo n.º 4
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);
   }
 }