开发者

How to convert a wav or caf audio file on iPhone

开发者 https://www.devze.com 2023-04-13 03:12 出处:网络
I am working on a iPhone IM app, which support audio message. I\'ve tried caf and wav format follow \"Speak Here\", but the files are too large to be send through the开发者_JS百科 internet. So I\'m wo

I am working on a iPhone IM app, which support audio message. I've tried caf and wav format follow "Speak Here", but the files are too large to be send through the开发者_JS百科 internet. So I'm wondering if I can convert any of them to some small format, like mp3 or amr.

Thank you for you help in advance.


CoreAudio has som great built-in datatypes for just this Core Audio Data Types

Use iLBC, short for Internet Low Bitrate Codec, to record your audio. Limit your sample rate to 8kHz.

If you insist on mp3, use LAME - the open source MP3 encoder library to convert your audio.


After you've recorded the audio file, the iOS AVFoundation AVAsset Reader/Writer APIs can be used to convert the file by, say, reading a .wav and writing AAC or other compressed file type.

0

精彩评论

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