开发者

cut audio file with iPhone SDK

Is it possible to cut audio file with iPhone SDK? (file has .caf extension) I just need to cut off the silence at the beginning.

(Also, maybe it's possible to write new file from the existing one with specified start and end time.)

开发者_Go百科

Thanks in advance!


Its not hard, its just fiddly, you can use Extended Audio File Services. have a look at the reference for ExtAudioFileRead & ExtAudioFileWrite (they have sample code) then you can open one audio file read it, trim it and then write the new one.


There is no trim function. You have to write some code that opens a file for reading and creates and opens another file for writing. Then write a loop that reads the audio sample or packet data, discards the silence at the beginning, and writes the audio data to the output file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜