开发者

How to output my recorded audio file in my laptop?

开发者 https://www.devze.com 2023-04-01 02:35 出处:网络
mFilename = Environment.getExternalStorageDirectory().getAbsolutePath(); mFilename += \"/audiorecorder.3gp\";

mFilename = Environment.getExternalStorageDirectory().getAbsolutePath(); mFilename += "/audiorecorder.3gp"; mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); mRecorder.setOutputFile(mFilename); mRecorder.setOnErrorListener(errorListenerForRecorder);

Above is my settings for MediaRecord. I can record sound from microphone into .3pg audio file perfectly. I simulated it on Android AVD and I can only find the output file in SD card. But I hope I can also output my audio file on my computer. It is also strange that I can not find the output file in my computer when I was running AVD. So where the audio file is stored when I was running AVD? Could anyone tell me ho开发者_Python百科w to set the output path? THX!


Well here is your solution. You can't refer to any drive location of your harddisk to android. Android will consider only the path associated to either external memory or internal phone memory.

And as for your question where the output will be stored when you use an AVD is also simple. You can view the SD card details in File Explorer. To get the file explorer in eclipse window->Show view->File Explorer

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号