开发者

Record audio in AMR format and send to LocalSocket in Android

开发者 https://www.devze.com 2023-02-19 01:23 出处:网络
I want to record the audio in AMR format and send the bytes to LocalSocket. If I do the recording with MediaRecorder then there is method which allows me to write to file but not to O开发者_运维问答ut

I want to record the audio in AMR format and send the bytes to LocalSocket. If I do the recording with MediaRecorder then there is method which allows me to write to file but not to O开发者_运维问答utputStream of LocalSocket.

Is there anyone who can help me out with this?


Are you sure ? There is a

public void setOutputFile (FileDescriptor fd)  

method on MediaRecorder. And you may get the FileDescriptor of your LocalSocket through the

public FileDescriptor getFileDescriptor() 

method of LocalSocket.


see spydroid code, that have exaclty what you need

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号