For my app, I need to record audio from MIC on an Android phone, and send it over TCP to the other android phone, where it needs to be played.
I am using AudioReco
Without knowing the specific exception you're getting, it's hard to know exactly what's wrong. It would also help to see the code you're using to create out1
(that is, your socket code).
Something you might want to pay attention to is the amount of data read from recordInstance.read()
; you might not get a whole bufferSize
-sized chunk of data out of it, so you need to take care only to write bytes 0
through bufferRead-1
to your output socket.