-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Description
Hello!
Thank you for sharing your work!
I am struggling to make it work in parallel with audio recording. I get MediaRecorder IllegalState exception again and again.
I am using your visualiser this way:
private void startRecording() {
mRecorder = new MediaRecorder();
mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mRecorder.setOutputFile(mFileName);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_WB);
try {
mRecorder.prepare();
} catch (IOException e) {
Timber.e("prepare() failed");
}
mRecorder.start();
mVisualizer.startListening();
}
private void stopRecording() {
mVisualizer.stopListening();
mRecorder.stop();
mRecorder.release();
mRecorder = null;
}
What do I do wrong?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels