List of usage examples for android.media ToneGenerator release
public native void release();
From source file:com.bangz.shotrecorder.RecordActivity.java
private void doStartRecord() { doDelayStart();/*from w w w. ja v a 2 s. com*/ ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_MUSIC, 100); tg.startTone(ToneGenerator.TONE_CDMA_ABBR_ALERT, BEEP_DURATIONMS); SystemClock.sleep(BEEP_DURATIONMS - 20); tg.stopTone(); tg.release(); mState = STATE_RECORDING; Intent intent = new Intent(this, RecordService.class); intent.putExtra(RecordService.EXTRA_SAMPLERATE, mSampleRate); intent.putExtra(RecordService.EXTRA_CHANNLES, mChannels); intent.putExtra(RecordService.EXTRA_ENCODDING, mEncoding); intent.putExtra(RecordService.EXTRA_MODE, mMode.ordinal()); intent.putExtra(RecordService.EXTRA_MAXSHOT, this.mMaxShots); intent.putExtra(RecordService.EXTRA_MAXPARTIME, (int) (mMaxParTime * 1000)); intent.putExtra(RecordService.EXTRA_CAPTURESIZE, 128); intent.putExtra(RecordService.EXTRA_MAXRECORDTIME, 5 * 60); startService(intent); doBindService(); textTIME.setText(R.string.READY); }