I took the liberty of massaging your code a little bit, now it compiles and runs
thanks but I have already modified it by returning the pointer in the correct way. I'm trying to translate:
https://github.com/mackron/dr_libs/blob/master/dr_flac.h Unfortunately it's not easy because the code is complicated to understand so straying too far from the implementation can lead to more problems. So I try to keep the use of pointers as much as possible.
Basically, you shouldn't just *stuff* C-code into 'Object Pascal', they're 2 very different beasts
+1
My, my, my, he should be lucky the two of you took the trouble to debug it. And explain it..
In fact, a trivial mistake, but sometimes, however obvious, they go unnoticed. Unfortunately I was only looking at the value of the pointer..
Maybe tiredness or too much C is bad for my health