Reputation: 315
I'm making audio editing app, and I want trim my audio. For audio editing I use AudioKit framework. But I can't find in tutorials, and examples, how I can trim audio using this framework?
Upvotes: 2
Views: 2868
Reputation: 4573
Export asynchronously allows for setting the start and end samples:
/// 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()
Upvotes: 3