I would be curious to hear Apple’s audio team thoughts on this topic. From what I've seen audio is one of the main motivations behind the ownership model. This quote is from the very first Swift 4 plans email (stage 1 goals):
"Memory ownership model: Adding an (opt-in) Cyclone/Rust inspired memory ownership model to Swift is highly desired by systems programmers and folks who want predictable and deterministic performance (for example, in real time audio processing code)." I don’t think you need ABI stabilisation for AUv3 on iOS. Is there a recording of your talk? I’d be curious to watch it. It’s also worth mentioning that in Session 507 of WWDC 2016 Doug Wyatt implemented AUv3 synthesiser using Swift only using UnsafeMutablePointes. Unfortunately, the code is not available online. I’m not sure how well that approach would scale for more complex AUs though. > On 15 Mar 2017, at 11:07 pm, Chris Adamson <[email protected]> wrote: > > On Mar 15, 2017, at 7:21 AM, Nikolozi Meladze <[email protected] > <mailto:[email protected]>> wrote: >> >> Looks like we just need to wait for the Ownership model to be implemented in >> Swift: https://github.com/apple/swift/blob/master/docs/OwnershipManifesto.md >> <https://github.com/apple/swift/blob/master/docs/OwnershipManifesto.md> > Necessary, but I don’t believe it’s sufficient. By analogy, you could write > Objective-C code without ARC, hold a pointer to an Objective-C object, call > its objc_msg_send() directly, and you’d still be outside the render-thread > rules (because the Objective-C runtime itself is unsafe to use in an RT > context… see WWDC 2015 session 508). > > FWIW, a thought experiment about when you’ll be able to write v3 Audio Units > in Swift was part of a talk I did at Forward Swift a few weeks back. It seems > like both ABI stabilization and the ownership model are required, and even > then it’s not clear that they’re sufficient. However, audio rendering is the > specific case that the ownership manifesto calls out in its preamble, so > it’ll provide an interesting test of how many years it’ll be (if ever) before > you can do these kinds of things in Swift. > > —Chris > > _______________________________________________ > 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/apps%40nikolozi.com > > This email sent to [email protected]
_______________________________________________ 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]
