title: Can't read from AudioRecord when encoding is PCM-Float
body: <p>No matter what I do, I can't get the Android AudioRecord class to work with Pcm-Float.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public AndroidAudioDriver(Sensor sensor, int desiredSampleRate)
  {
      _sensor = sensor;
  
      if (!InitialiseSampleRate(desiredSampleRate))
      {
          throw new NotSupportedException("No supported audio sample rates found");
      }
      recorder = new AudioRecord(AudioSource.Mic, SampleRate, ChannelIn.Mono, Encoding.PcmFloat, _bufferSize);
      _recorder.StartRecording();
      var res = _recorder.Read(_audioData, 0, (int)(SampleRate * _readPortion));
  }
  
  private bool InitialiseSampleRate(int rate)
  {
      for (int i = rate; i &lt; 48000; i += 100)
      {  // add the rates you wish to check against
          _bufferSize = AudioRecord.GetMinBufferSize(i, ChannelIn.Mono, Encoding.Pcm16bit) * 10;
          if (_bufferSize &gt; 0)
          {
              _audioData = new byte[_bufferSize];
              SampleRate = i;
              return true;
          }
      }
      return false;
  }
  </code></pre>
  
  <p><code>_recorder.read</code> always returns -3, which according to the <a href="https://developer.android.com/reference/android/media/AudioRecord.html" rel="nofollow noreferrer">documentation</a> is "ERROR_INVALID_OPERATION". The same code works just fine with Pcm-16bit. I don't know what the invalid operation is, and there aren't any errors in logcat that I can see.</p>
  
  <p>Thanks.</p>