开发者

Problem of converting caf files using libsnd

开发者 https://www.devze.com 2022-12-21 06:00 出处:网络
I m building a voice recording application in iPhone. The recorded file is transfer to linux server and it need to b开发者_运维百科e converted to wav file.

I m building a voice recording application in iPhone. The recorded file is transfer to linux server and it need to b开发者_运维百科e converted to wav file. However, when I try to convert caf file using libsnd, it gives an error.

Error : Not able to open input file testfile.caf

For testing I converted some wave file to caf using libsnd and vice versa. So I think that there is a problem of my recorded file in iphone. Anyone has got such an experience ? I hope can someone help me.

Thanks.


If you use AVAudioRecorder, AudioFile, or any of the other Core Audio APIs, you should be able to record directly to a WAV file, and skip the entire conversion process altogether.

But if you need to convert audio files, first check if the CAF file is a valid file. Does it play? Is the header correct? What is the data format? Is it compressed? Does libsnd support the data format?

(The data format is separate from the file format, which is just a container for various bits of data as well as the sample data. The data format could be PCM, or it could be compressed in any format such as MP3, AAC, uLaw, etc.)

0

精彩评论

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

关注公众号