Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. AudioRecord audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC,
  2. 44100,
  3. AudioFormat.CHANNEL_IN_MONO,
  4. AudioFormat.ENCODING_PCM_16BIT,
  5. 2*44100);
  6. audioRecord.startRecording();
  7. audioRecord.read(new short[10000], 0, 10000); // have to include this to remove redundant values
  8. audioRecord.read(audio, 0, 500);
  9. audioRecord.stop();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement