I am using the apple example code SpleakHere. in this code there is a calss called AQRecorder, it is a C class. i want to send the sound bytes to an objective-c object i have. this object send the dat over udp. here is the function in which im trying to perform an objective-c function inside the c code.

although the NSData functions works fine, i am not able to ad my object (Udp) to the class and therefore cant call its functions. i tried declaring the Udp object everywhere (inside class,outside class,header .mm file ,as void*...) but nothing would compile...

though i wan't able to add an object in order to send the data... i used NSNptification instead in order to port the data from the c object to the objective-c object.

help please

though i wan't able to add an object in order to send the data... i used NSNotification instead in order to port the data from the c object to the objective-c object

2 Answers
2

If that works, then you have a dependency issue. If an Objective-C file includes a C++ file, then the extension of that Obj-C file should be .mm instead of .m. Moreover, if this Objective-C file now gets included in some other Objective-C file, then the extension of that file should be .mm as well.