withMusicSequence(_:)
Provides scoped access to the AVAudioEngine’s MusicSequence
Declaration
func withMusicSequence<R, E>(_ body: (borrowing MusicSequence?) throws(E) -> R) throws(E) -> R where E : ErrorParameters
- body:
A closure that receives a MusicSequence
Return Value
The value returned by the closure
Discussion
This method provides thread-safe, scoped access to the MusicSequence. The MusicSequence reference is only valid within the closure and must not be retained or accessed outside of it.