Has anyone been using ObjCBlocks that take multiple arguments in any APIs? I stumbled across what might be a pythonista bug, but it could easily just as well be my own stupidity.
I have started tackling AudioUnits to experiment with real time audio processing. To that end, I am using
AVAudioEngine
and installing a data tap, which takes a Block of this form
https://developer.apple.com/reference/avfoundation/avaudionodetapblock?language=objc
typedef void (^AVAudioNodeTapBlock)(
AVAudioPCMBuffer *buffer, AVAudioTime *when);
The Python function I tried to use was
def tap(_self, _sel, buffer, when)
however, the proper method seemed to be
def tap(_self, when, buffer, _sel)
In other words, the argument order was backwards, except for the block itself. does the runtime swap arguments on us? Or is pythonista objc_utils doing something funny?