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.
精彩评论