I have a C function(a callback function in Audio Queue Services) and I want to send message to self. How to do that?
If I type in [self message], there is an error:
Use of undeclared identifier 'self'
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t perform objc messages in realtime callbacks, such as audio. The reason for this is that objc messaging is not constant time, and may lock, resulting in missed deadlines, resulting in audio dropouts. Static or dynamic (
virtual) C++ calls and C function calls are of course constant time, and suitable for realtime contexts.If it were not an realtime/audio callback, then one option would be to pass
selfas the user info or context parameter: