2012-05-22 55 views
1

我應該在通話過程中錄製語音,我使用GIO SUMSUNG手機錄製語音,但它同時記錄語音通話和麥克風語音,我的意思是我既錄製了語音,也錄製了另一方。在Android中錄製語音通話

而在我錄製的聲音中,麥克風的聲音比另一個聲音響亮。

我該怎麼辦?

我可以只錄制對方的聲音嗎?或者它變得更響亮的聲音。 我之前做過,但今天我真的堅持下去。

+0

只看到跟隨着鏈接 –

+0

http://stackoverflow.com/questions/4194342/how-can-i-record-voice-and-record-call-in-android –

+0

設置 http://stackoverflow.com/ questions/10330340/android-audiorecord-which-settings-to-record-call –

回答

0

試試這個:

private MediaRecorder myAudioRecorder; 

     private String outputFile = null; 
     public void record() 
     { 

       myAudioRecorder = new MediaRecorder(); 
       myAudioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); 
       myAudioRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); 
       myAudioRecorder.setAudioEncoder(MediaRecorder.OutputFormat.DEFAULT); 
       myAudioRecorder.setOutputFile(outputFile); 

       try { 
        myAudioRecorder.prepare(); 
        myAudioRecorder.start(); 

       } catch (IllegalStateException e) { 
        // TODO Auto-generated catch block 
        e.printStackTrace(); 
       } catch (IOException e) { 
        // TODO Auto-generated catch block 
        e.printStackTrace(); 
       } 

       Toast.makeText(getApplicationContext(), "start", Toast.LENGTH_SHORT).show(); 

     } 

     public void stop() 
     { myAudioRecorder.stop(); 
     myAudioRecorder.reset(); 
      myAudioRecorder.release(); 
      myAudioRecorder = null; 

      Toast.makeText(getApplicationContext(), "successfull", 
      Toast.LENGTH_LONG).show(); 
      }