Anyone Have MediaRecorder Working with ParcelFileDescriptor and createPipe()?

后端 未结 1 1958
不知归路
不知归路 2020-12-03 13:50

I am trying to work out an example of recording audio, with the data storage being handled by the app, not MediaRecorder. Use cases include storing the recordin

1条回答
  •  春和景丽
    2020-12-03 14:10

    I would guess this is related to my answer to your other question. Anyone Have MediaPlayer Working with ParcelFileDescriptor and createPipe()?

    Probably when the MediaRecorder will seek to write the Header information, the pipe is closed.

    If you use:

    recorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR);
    recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
    

    The record works fine, because it will not have a header information, only raw audio.

    0 讨论(0)
提交回复
热议问题