AudioFlinger ne pouvait pas créer un enregistrement de la piste, statut: -1 , Besoin d'aide pour ifx

public class AudioRecorderActivity extends Activity {

  private static final int RECORDER_SAMPLERATE        = 8000;
  private static final int RECORDER_CHANNELS          = AudioFormat.CHANNEL_IN_MONO;
  private static final int RECORDER_AUDIO_ENCODING    = AudioFormat.ENCODING_PCM_16BIT;
  private AudioRecord recorder                        = null;
  private static final String TAG                     = "AudioRecorderActivity";
  short[][]   buffers                                 = new short[256][160];
  int         ix                                      = 0;
  private boolean     stopped                         = false;

  private void startRecording() {

    android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);
    try {
      int N = AudioRecord.getMinBufferSize (  
                          RECORDER_SAMPLERATE, 
                          RECORDER_CHANNELS, 
                          RECORDER_AUDIO_ENCODING) * 20;

      recorder = new  AudioRecord(AudioSource.MIC,
                    RECORDER_SAMPLERATE, 
                    RECORDER_CHANNELS,
                    RECORDER_AUDIO_ENCODING,N );        

      recorder.startRecording();

      while(!stopped) {
        short[] buffer = buffers[ix++ % buffers.length];      
        N = recorder.read(buffer,0,buffer.length);
      }

    } 
    catch(Throwable x) { 
      Log.v(TAG,"Error reading voice audio",x);
      x.printStackTrace();
    } 
    finally { 
      stopped = true;
      stopRecording();
    }    
  }  
}

Question : Si l'extrait de code est basé sur un exaple de StackOverflow, il n'est pas de travail
S'il vous plaît laissez-moi savoir ce que pourrait être l'erreur ?

Voici le Message d'Erreur

12-20 03:44:32.271: E/AudioRecord(224): AudioFlinger could not create record track, status: -1
12-20 03:44:32.271: E/AudioRecord-JNI(224): Error creating AudioRecord instance: initialization check failed.
12-20 03:44:32.271: E/AudioRecord-Java(224): [ android.media.AudioRecord ] Error code -20 when initializing native AudioRecord object.
Ce kit SDK d'Android ont été vous adressez-vous?

OriginalL'auteur user3120896 | 2013-12-19