ha! I didnt see the second response until I'd posted mine...
RECORD_AUDIO permission solved it!!! Thanks!

On Jun 3, 10:53 pm, Hiro <[email protected]> wrote:
> I seem to be having the same issue.... I've been playing with
> different buffer sizes, but this is where I'm at....
>
>                  recorder = new AudioRecord
> (MediaRecorder.AudioSource.MIC,
>                                  AUDIO_SAMPLE_FREQ,
>
> AudioFormat.CHANNEL_CONFIGURATION_MONO,
>                                  AudioFormat.ENCODING_PCM_16BIT,
>                                  (AUDIO_SAMPLE_FREQ));
> it doesnt throw illegalargument, but recorder.getState() returns
> UNINITIALIZED. If I start recording, I get the same result as you.
>
> On May 28, 6:45 pm, intbt <[email protected]> wrote:
>
> > With version 1.5, I keep getting this error
>
> > 05-29 01:36:39.440: ERROR/AudioRecord-JNI(1280): Error creating
> > AudioRecord instance: initialization check failed.
>
> > 05-29 01:36:39.450: ERROR/AudioRecord-Java(1280):
> > [ android.media.AudioRecord ] Error code -20 when initializing native
> > AudioRecord object.
>
> >  and then:
>
> > 05-29 01:36:39.630: ERROR/AndroidRuntime(1280):
> > java.lang.IllegalStateException: startRecording() called on an
> > uninitialized AudioRecord.
>
> > My code:
>
> >                                 ar_test = new 
> > AudioRecord(MediaRecorder.AudioSource.MIC,
> > 11025, AudioFormat.CHANNEL_CONFIGURATION_MONO,
> > AudioFormat.ENCODING_PCM_8BIT, 200000);
>
> >                                         ar_test.read(ar_buffer, 0, 150000);
> >                                         ar_test.startRecording();
>
> >                                         toneTimer.setTimer(10000);
> >                                         toneTimer.countdownTimer();
>
> >                                         ar_test.stop();
>
> > Can some one explain what I am missing?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to