Intresting ideas! Thanks, but unfortunately no success with both, I tried to add callback to interface and also tried with removed cdecl (though cdecl is the standard for objective C afaik). I'm still pretty sure that its a callback definition issue as it only crashes when activating the audio engine and when executed the installTapOnBus_bufferSize_format_block before.
You might be onto something here, because the standard calling convention in FPC is "Register", not cdecl.
I'd really research this.
Interesting that the block definition contains a ^ operator ... how to translate that?
typedef void (^AVAudioNodeTapBlock)(AVAudioPCMBuffer *buffer, AVAudioTime *when);
Usually this indicates a Function-Pointer, and you provide (correctly!) the "@"-Symbol in your call to it, but you're in mode Delphi!
IIRC, in mode delphi you shouldn't provide/need the "@"-Symbol, but i'm not sure about it, since i've never used mode delphi
try
unitReverb.installTapOnBus_bufferSize_format_block(0,1024,inputFormat,tapBlock); //No @-Symbol!
EDIT: Maybe a BINGO?
https://www.freepascal.org/docs-html/prog/progse74.htmlD.3 Delphi mode
This mode is selected by the $MODE DELPHI switch. It tries to emulate, as closely as possible, the behavior of Delphi 4 till recent versions of Delphi . On the command line, this mode is selected by the -Mdelphi switch.
1. You cannot use the address operator to assign procedural variables.
"@"-Symbol is the Address-Operator