jsp
jsp

Reputation: 2636

MediaRecorder saving data to buffer(setOutputFile)

During recording audio using mediarecorder a output file has to be specified where the recorded data is stored. I would rather want to save the data to buffer and then create the file once the user saves the data. So If i have something like this

 Recorder = new MediaRecorder();
 Recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
 Recorder.setOutputFormat(outputfileformat);
 Recorder.setOutputFile(filePath);

Instead of using filePath Can i directly save it to buffer??

Thanks

Upvotes: 0

Views: 3534

Answers (2)

Summit
Summit

Reputation: 1243

FYI, AudioRecord only supports 8bit or 16bit wav and Android doesn't provide any codec libraries.

Upvotes: 1

darma
darma

Reputation: 4747

Seems like you have to go through the AudioRecord class for that.

Upvotes: 1

Related Questions