The full exception messages: 04-01 14:16:06.288: ERROR/AudioHardwareMot(1056): AudioMgr Error:AudioStreamInMot::read: codec device busy
04-01 14:16:06.288: ERROR/AudioFlinger(1056): Error reading audio input 04-01 14:16:06.351: WARN/AudioRecord(4010): obtainBuffer timed out (is the CPU pegged?) user=00000640, server=00000640 04-01 14:16:07.291: WARN/AudioRecord(4010): obtainBuffer timed out (is the CPU pegged?) user=00000640, server=00000640 04-01 14:16:07.296: ERROR/AudioHardwareMot(1056): AudioMgr Error:AudioStreamInMot::read: codec device busy On Apr 2, 10:33 am, Jammy <[email protected]> wrote: > fix some typo. I am testing on MOTO milestone (not milestime) > > On Apr 2, 10:31 am, Jammy <[email protected]> wrote: > > > > > I am writing a VOIP phone application and testing it on MOTO > > milestime. Sometime I meet a "obtainBuffer timed out" exception when i > > am calling AudioRecord.read , it don't return me any result but just > > block the thread. Runing on emulator with 1.5 OS won't get this > > exception. My codes: > > > AudioRecord record = new AudioRecord( > > MediaRecorder.AudioSource.MIC, 8000, > > AudioFormat.CHANNEL_CONFIGURATION_MONO, > > AudioFormat.ENCODING_PCM_16BIT, > > // 100000 > > AudioRecord.getMinBufferSize(8000, > > > > AudioFormat.CHANNEL_CONFIGURATION_MONO, > > > > AudioFormat.ENCODING_PCM_16BIT) > > ); > > record.startRecording(); > > int num = record.read(lin,offsetInShorts ,sizeInShorts); > > ....... > > ...... > > when it is blocked , run these code can solve the problem. > > AudioManager am = (AudioManager) > > Receiver.mContext.getSystemService(Context.AUDIO_SERVICE); > > am.setMode(mode); > > am.setMode(AudioManager.MODE_NORMAL); > > .............. > > am.setMode(AudioManager.MODE_INCALL); > > > Anybody have any idea on this ? -- 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 To unsubscribe, reply using "remove me" as the subject.

