title: Android: Implementing a VoIP program
body: <p>I have some design questions that I want to discuss with people interested in helping me. I am planning to develop a simple VoIP program that allows two Android phones in the same network to use VoIP. My goal is simply to capture sound, send the data with UDP, receive UDP data and play sound.</p>
  
  <p>My current design is to have 2 threads: one captures the microphone and sends the data; the other one receives bytes and plays them.</p>
  
  <p>I was starting to implement that using MediaPlayer and MediaRecorder. The issue that came up is how do I record and play sound? By that, I would like to know if I need to use a file, although that seems slow, or if there is anyway to have the recording automatically sent to my UDP socket please?</p>
  
  <p>Basically, I wonder if I have to record to a file, then to be able to play it, or if I could just pass a socket (for recording and playing).</p>
  
  <p>Does anyone has any suggestion please?</p>
  
  <p>Thank you very much</p>