I am developing an audio application that allows you to record micro to mp3 file. Then it allows you to play the audio file. On Android, I use this code:
mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); mRecorder.setOutputFile("path/audio.mp3"); try { mRecorder.prepare(); mRecorder.start(); } catch (Exception e) { LogUtil.e("startRecording", e.getMessage()); }
I can play recorded sound on iOS if my application runs on a Nexus 5 device, but I cannot if I worked on Samsung S3 / S5.
Sorry for my poor English, if you cannot understand the description well, please check the following amount:
- Audio recorded above with Nexus 5 => code can play on iOS
- Audio recorded above with Samsung S3 / S5 => cannot play on iOS
How to play sound recorded by Samsung devices on iOS? Please help me.
source share