init(copying:)
Creates a read-only buffer by copying audio data from an existing PCM buffer.
Declaration
init(copying buffer: AVAudioPCMBuffer)Parameters
- buffer:
The source PCM buffer to copy from.
Discussion
This initializer creates a new AVAudioPCMBuffer and copies all audio data, ensuring the original buffer can continue to be used safely.