• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re : Real-time buffer playback in Swift?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re : Real-time buffer playback in Swift?


  • Subject: Re : Real-time buffer playback in Swift?
  • From: robert.bielik <email@hidden>
  • Date: Tue, 16 Sep 2014 19:52:57 +0000 (GMT)
  • Importance: Normal

+1... Really, that anyone would ever consider anything BUT C/C++ in realtime code is beyond me. There is no other way to be in complete control. And you NEED to be in complete control in realtime code.

 

/R

------ Ursprungligt meddelande------

Från: Paul Davis

Datum: tis, 16 sep 2014 21:45

Till: Charles Constant;

Kopia: CoreAudio API;

Ämne:Re: Real-time buffer playback in Swift?

 



On Tue, Sep 16, 2014 at 3:41 PM, Charles Constant <email@hidden> wrote:
> the fact that you can't use a swift function for the render callback given the API design 
> does seem indicative of the sort of message apple may want to send here ....

Swift may well be inherently inappropriate for render callbacks, but I imagine Swift's inability to create a CFunctionPointers has far-enough reaching effects that some of them wouldn't involve performance.

> I'm puzzled why you think this is possible. Last time I read about 
> this, Apple's position was that realtime (i.e. low latency) audio 
> still required C/C++.

Well, evidently it's because *I* hadn't read that : ) If that's their position, I'm glad I stopped trying. I'm quite sure queuing up scheduled segments, and handling menial tasks in the completion callbacks, should be okay in the *new* API though, since the WWDC examples were all Obj-C and presumably Swift performance should wind up comparable to Obj-C.

You have examples of render callbacks implemented in Objective C?

People misunderstand the issue of language choice. It isn't about the *amount* of work that needs doing. It is about invisible, unpredictable overhead that the language runtime library may incur outside your control.

This is why objective C has never been acceptable for render callbacks, and why any language that attempts to remove the "pain" of C or C++ is also likely not acceptable (though there could be an exception at some point).
 
 _______________________________________________
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

  • Follow-Ups:
    • Re: Re : Real-time buffer playback in Swift?
      • From: Rob Nikander <email@hidden>
    • Re: Re : Real-time buffer playback in Swift?
      • From: Paul Davis <email@hidden>
  • Prev by Date: Re: Real-time buffer playback in Swift?
  • Next by Date: Re: Re : Real-time buffer playback in Swift?
  • Previous by thread: Re: Real-time buffer playback in Swift?
  • Next by thread: Re: Re : Real-time buffer playback in Swift?
  • Index(es):
    • Date
    • Thread