[英]cut audio file with iPhone SDK
Is it possible to cut audio file with iPhone SDK? 使用iPhone SDK可以剪切音频文件吗? (file has .caf extension) I just need to cut off the silence at the beginning.
(文件扩展名为.caf)我只需要在开始时消除静默。
(Also, maybe it's possible to write new file from the existing one with specified start and end time.) (另外,也许可以从现有的文件中以指定的开始和结束时间写入新文件。)
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.
看看ExtAudioFileRead和ExtAudioFileWrite的参考(它们都有示例代码),然后您可以打开一个音频文件,对其进行读取,修剪并编写新的音频文件。
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.
然后编写一个循环,以读取音频样本或数据包数据,在开始时放弃静音,然后将音频数据写入输出文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.