Open Gaket opened 8 years ago
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?
@Gaket have you resolved the issue yet? I ran into the same issue.
@liuzhen2008, unfortunately, not. Now I am using just static image. Tell me please if you solve the problem.
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:
What do I do wrong?