*        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 protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to