portions of an AVAudioPCMBuffer
portions of an AVAudioPCMBuffer
- Subject: portions of an AVAudioPCMBuffer
- From: Waverly Edwards <email@hidden>
- Date: Fri, 12 Oct 2018 17:47:35 +0000
- Thread-topic: portions of an AVAudioPCMBuffer
* Is there a built-in way to write a copy or utilize a portion of an
AVAudioPCMBuffer?
//I'm not sure this will work and if so, it does not seem like a good idea
src.withUnsafeBufferPointer {(result) in
memmove(&dest[0], result.baseAddress, length)
}
The goal would be to write sections of the buffer to another AVAudioPCMBuffer,
avoiding using memmove, vDSP or looping through the original buffer
Additionally, writing portions of a buffer to disk would be another option
Examples
outBuffer = AVAudioPCMBuffer(... large buffer)
* bufferSection = outBuffer[startFrame..endFrame] // example 1, copy to
another buffer
* try! outFile.write(from: outBuffer[startFrame.. endFrame]) // example
2, copy sections of a buffer or trim a buffer
Thank you,
W.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden