¡@

Home 

2014/10/16 ¤W¤È 08:22:17

android Programming Glossary: recordingthread

how to convert or record .wav file in 16khz 16bit mono little-endian?

http://stackoverflow.com/questions/12260476/how-to-convert-or-record-wav-file-in-16khz-16bit-mono-little-endian

AudioFormat.ENCODING_PCM_16BIT private AudioRecord recorder null private int bufferSize 0 private Thread recordingThread null private boolean isRecording false @SuppressLint NewApi @Override public void onCreate Bundle savedInstanceState super.onCreate.. RECORDER_SAMPLERATE RECORDER_CHANNELS RECORDER_AUDIO_ENCODING bufferSize recorder.startRecording isRecording true recordingThread new Thread new Runnable @Override public void run writeAudioDataToFile AudioRecorder Thread recordingThread.start @SuppressLint.. true recordingThread new Thread new Runnable @Override public void run writeAudioDataToFile AudioRecorder Thread recordingThread.start @SuppressLint NewApi NewApi NewApi private void writeAudioDataToFile byte data new byte bufferSize String filename..

Android AudioRecord example

http://stackoverflow.com/questions/8499042/android-audiorecord-example

final int RECORDER_AUDIO_ENCODING AudioFormat.ENCODING_PCM_16BIT private AudioRecord recorder null private Thread recordingThread null private boolean isRecording false @Override public void onCreate Bundle savedInstanceState super.onCreate savedInstanceState.. RECORDER_CHANNELS RECORDER_AUDIO_ENCODING BufferElements2Rec BytesPerElement recorder.startRecording isRecording true recordingThread new Thread new Runnable public void run writeAudioDataToFile AudioRecorder Thread recordingThread.start convert short.. isRecording true recordingThread new Thread new Runnable public void run writeAudioDataToFile AudioRecorder Thread recordingThread.start convert short to byte private byte short2byte short sData int shortArrsize sData.length byte bytes new byte shortArrsize..