我正在制作音频编辑应用程序,我想修剪我的音频。对于音频编辑,我使用audiokit框架。但是我在教程和示例中找不到如何使用这个框架来剪裁音频?
最佳答案
异步导出允许设置开始和结束示例:
https://github.com/AudioKit/AudioKit/blob/master/AudioKit/Common/Internals/Audio%20File/AKAudioFile%2BProcessingAsynchronously.swift#L267
/// Exports Asynchronously to a new AKAudiofile with trimming options.
///
...
/// - fromSample: start range in samples
/// - toSample: end range time in samples
...
public func exportAsynchronously(name: String,
baseDir: BaseDirectory,
exportFormat: ExportFormat,
fromSample: Int64 = 0,
toSample: Int64 = 0,
callback: @escaping AsyncProcessCallback) {
let fromFileExt = fileExt.lowercased()
关于swift - Audiokit装饰音响,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/52060593/