title: Resampling a sound sample, what filter do I use?
body: <p>I am trying to resample a signal (sound sample) from one sampling rate, to a higher sampling rate.
  Unfortunately it needs some kind of filter, as some 'aliasing' appears to occur, and I'm not familiar with filters. Here is what I came up with:</p>
  
  <pre><code>int i, j, a, b, z;
  
  a = 44100;
  b = 8363;
  
  // upsample by a
  for(i = z = 0; i &lt; samplen; i++)
      for(j = 0; j &lt; a; j++)
          cbuf[z++] = sampdata[i];
  
  // some filter goes here???
  
  // downsample by b
  for(j = i = 0; i &lt; z; i += b)
      buf[j++] = cbuf[i];
  </code></pre>
  
  <p>The new sample is very similar to the original, but it has some kind of noise.
  Can you please tell me what filter I need to add, and preferably some code related to that filter?</p>
  
  <p>Original sound: <a href="http://www.mediafire.com/?9gnga1in52d6t4x" rel="nofollow">http://www.mediafire.com/?9gnga1in52d6t4x</a>
  Resampled sound: <a href="http://www.mediafire.com/?x34h7ggk8n9k8z1" rel="nofollow">http://www.mediafire.com/?x34h7ggk8n9k8z1</a></p>