Skip to content

Instantly share code, notes, and snippets.

@farmaker47
Created December 8, 2020 04:30
Show Gist options
  • Save farmaker47/d1a1830228ccee410ef483659e10b20b to your computer and use it in GitHub Desktop.
Save farmaker47/d1a1830228ccee410ef483659e10b20b to your computer and use it in GitHub Desktop.
fun startRecording() {
mRecorder = AudioRecord.Builder().setAudioSource(AUDIO_SOURCE)
.setAudioFormat(AUDIO_FORMAT)
.setBufferSizeInBytes(BUFFER_SIZE)
.build()
done = false
mRecording = true
mRecorder?.startRecording()
mThread = Thread(readAudio)
mThread!!.start()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment