title: Android, How to initialize Audio Recorder?
body: <p>I have created AudioMeter class and I have written following codes in its contractor:</p>
  
  <pre><code>public AudioMeter(){
          channel_config = AudioFormat.CHANNEL_CONFIGURATION_STEREO;//And also Mono
          format = AudioFormat.ENCODING_PCM_16BIT;
          sampleRate = AudioTrack.getNativeOutputSampleRate(AudioManager.STREAM_SYSTEM); //8000
          bufferSize = AudioRecord.getMinBufferSize(sampleRate, channel_config, format);
  
          recorder = new AudioRecord(MediaRecorder.AudioSource.MIC, sampleRate, channel_config, format, bufferSize);
  
          audioBuffer = new short[bufferSize];
  
          Log.i("AudioMeter", "Created successfully.");
      } 
  </code></pre>
  
  <p>But when I run the emulator it says 
  <code>01-29 03:47:07.418: E/AudioRecord(432): Unsupported configuration: sampleRate 44100, format 1, channelCount 2"</code>
  I have added "<code>Audio Recording Support</code>" and "<code>Audio Playback Support</code>" into emulator.</p>
  
  <p>Any help would be greatly appreciated as I have been looking over this code for a while now!</p>