Audio format for iOS and Android

前端 未结 7 1482
故里飘歌
故里飘歌 2020-11-30 21:45

Sorry if I am asking too generic question.

We are in the process of developing an application which records and plays audio on mobile devices. This application is be

7条回答
  •  情书的邮戳
    2020-11-30 22:08

    Programatically this will help you and the file extension may mp3/mp4 for audio; both will support on media players. Android snippet:

    myRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
    myRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
    myRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
    

    iOS snippet

    AVFormatIDKey: @(kAudioFormatMPEG4AAC)
    

提交回复
热议问题