android Programming Glossary: startrecthread
Live Audio Recording and Playing in Android and Thread & callback handling http://stackoverflow.com/questions/9413998/live-audio-recording-and-playing-in-android-and-thread-callback-handling private int trackBufSize private short audioData private boolean isRecording false isPlaying false private Thread startRecThread private AudioRecord.OnRecordPositionUpdateListener posUpdateListener constructor method for initializing the variables.. stop Playing private void startRecording LOG_TAG startRecording start a separate recording thread from here . . . startRecThread new Thread @Override public void run TODO Auto generated method stub android.os.Process .setThreadPriority android.os.Process.THREAD_PRIORITY_URGENT_AUDIO.. setVolumeControlStream AudioManager.STREAM_MUSIC audioManager.setSpeakerphoneOn false player.flush player.play startRecThread.start Log.e LOG_TAG start Recording private void stopRecording LOG_TAG stopRecording recorder.stop if startRecThread null..
|