title: how to amplify the frequency of audio in android or reduce the background noise
body: <p>this is my code</p>
  
  <pre><code>Thread Rthread = null;
  AudioRecord record = null;
  int freq = 8000;
  AudioManager am;
  AudioTrack play;
  int minbuff=20000;
  AudioRecord m_record;
  AudioTrack m_track;
  byte[] buffer = new byte[freq];
  
  protected void Start() {
      Rthread = new Thread(new Runnable() {
          public void run() {
              loopback();
          }
      });
      Rthread.start();
  }
  
  protected void loopback() {
      android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);
      minbuff = AudioRecord.getMinBufferSize(freq,
      AudioFormat.CHANNEL_CONFIGURATION_MONO,
      AudioFormat.ENCODING_PCM_16BIT);
      if (minbuff &amp;lt;= freq) {
          minbuff = freq;
      }
      am.setParameters("noise_suppression=on");
      m_record = new AudioRecord(MediaRecorder.AudioSource.MIC, freq,
      AudioFormat.CHANNEL_CONFIGURATION_MONO,
      MediaRecorder.AudioEncoder.AMR_NB, minbuff);
      m_track = new AudioTrack(AudioManager.ROUTE_HEADSET, freq,
      AudioFormat.CHANNEL_CONFIGURATION_MONO,
      MediaRecorder.AudioEncoder.AMR_NB, minbuff,
      AudioTrack.MODE_STREAM);
      m_track.setPlaybackRate(freq);
      byte[] buffer = new byte[minbuff];
      m_record.startRecording();
      Log.i(LOG_TAG, "Audio Recording started");
      m_track.play();
      Log.i(LOG_TAG, "Audio Playing started");
      while (true) {
          try {
              m_record.read(buffer, 0, minbuff);
              for (int i = 1; i &amp;lt; buffer.length; i++) {
                  buffer[i] *=amp;
              }
              m_track.write(buffer, 0, buffer.length);
              } catch (Throwable t) {
              Log.e("Error", "Read write failed");
              t.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p>So please tell me how to reduce the background noise &amp; also amplify the frequency of recorded audio.</p>