title: Why alaw generates noise and ulaw does not
body: <p>I use socket to send some voice data to another PC and I encoded my data before sending it using ALAW with this "setup": </p>
  
  <pre><code>AudioFormat.Encoding.ALAW, 
  8000.0f        // sampleRate
  8,             // sampleSizeInBits
  1,             // channels
  1,             // frameSize
  8000.0f,       // frameRate
  false);        // bigEndian
  </code></pre>
  
  <p>The problem is, it generates a small (but quite annoying) noise at receiver side when I don't speak anything at the microphone. When I speak, the noise is almost gone but not entirely.</p>
  
  <p>When I change to ULAW (exactly same "setup") the noise doesn't exist at all, the sound is very clear. </p>
  
  <p>Is there anything I can do about that? Is there any recommended setup to use along with ALAW? I really need to stick to ALAW because ULAW causes me some mess in the code (and too much modifications would be necessary).</p>
  
  <p>Side note: I printed the buffer and without speaking to microphone it has lots of 8,-1,8,-1,8,0,8,0 type of pattern. I tried to force all 8 to become 0 but still not big difference. I tried that because with ULAW there are many 0's when I don't speak instead of 8's as for ALAW. This pattern that I'm talking about is from the (convert ALAW to PCM) PCM before being sent for playing by sound card.
  I took conversion algorithm from here if it is important: <a href="https://svn.typo3.org/TYPO3v4/Extensions/jclic_ef/JClic_ef/src/org/tritonus/share/sampled/TConversionTool.java" rel="nofollow">ALAW PCM  Conversions</a></p>