我是一个Android程序员。我想录制音乐声音或将音乐放在MediaRecorder类的setAudioSource()方法中。但我不能这样做。你能救我吗?
private void startRecord() throws IllegalStateException, IOException { //
recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
//ok so I say audio source is the microphone
//is it windows/linux microphone on the emulator?
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile("/sdcard/Music/"+System.currentTimeMillis()+".amr");
recorder.prepare();
recorder.start(); }