Hi All,
        I am writing an application to record the call. I have created
an Activity for UI and a Service to start and stop record.

In Service to start record, the code is
////////////////////////
                MediaRecorder recorder=new MediaRecorder();
                File  root=Environment.getExternalStorageDirectory();
                File recordfile=new File(root,"call_file.3gp");

                Log.d(TAG,"FilePath::"+recordfile.getAbsolutePath().toString());
                recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
                recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
                recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
                //recorder.setOutputFile("/data/data/com.example.CallRecorder/
call_file");
                //this.getFilesDir();
                Log.d(TAG,"set path to sdcard........");
                recorder.setOutputFile("/sdcard/call_file.3gp");
                try {
                        recorder.prepare();
                } catch (IllegalStateException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
               recorder.start();
///////////////////////////

After executing a call and starting record, my app is hang and then
ANR alert is coming to close it.
Even i am destroying record service and release recorder , the app is
still hang. It seems that my app loose the control.

The logs coming in loop are:

01-12 11:21:13.159: WARN/AudioRecord(1955): obtainBuffer timed out (is
the CPU pegged?) user=00000000, server=00000000
01-12 11:21:14.164: WARN/AudioRecord(1955): obtainBuffer timed out (is
the CPU pegged?) user=00000000, server=00000000
01-12 11:21:15.169: WARN/AudioRecord(1955): obtainBuffer timed out (is
the CPU pegged?) user=00000000, server=00000000
01-12 11:21:16.173: WARN/AudioRecord(1955): obtainBuffer timed out (is
the CPU pegged?) user=00000000, server=00000000
01-12 11:21:17.173: WARN/AudioRecord(1955): obtainBuffer timed out (is
the CPU pegged?) user=00000000, server=00000000
01-12 11:21:18.180: WARN/AudioRecord(1955): obtainBuffer timed out (is
the CPU pegged?) user=00000000, server=0000000


Please help me to resolve the same.

Thank
Chetan Chauhna

-- 
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