How to return value in void * C pointer ?


(Alex) #1

Hello,
Using the Apple core audio I come to this problem: I have to implement a callback method that is called by the API. As a variable I get a class with void * member. I have to allocate some object in memory and assign this void* member to point to it.How can I do this in SWIFT?

Regards,Alex


(Quinn “The Eskimo!”) #2

I don’t really understand this question, alas. Can you perhaps post some snippets of code that show the specific problem you’re trying to solve?

Share and Enjoy

···

On 16 Feb 2017, at 15:59, Biala via swift-users <swift-users@swift.org> wrote:

I have to implement a callback method that is called by the API. As a variable I get a class with void * member. I have to allocate some object in memory and assign this void* member to point to it.

--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware