Reputation: 1523
I need to get access to an object inside a C function similar to this few code
@interface MixerHostAudio () <UIApplicationDelegate>
@property (readwrite) int *alternativeOutput;
@end
@implementation MyCode
@synthesize alternative
void audioInputAvailable () {
alternative=1;
}
I get this error: " 'Use of undeclared identifier 'alternative' "
Any ideas about how can i solve it ?
Upvotes: 0
Views: 73
Reputation: 89509
You have to make your "MyCode
" object available somewhere for your C glue function to pick up. For example, if you have a pointer to your MyCode object...
void audioInputAvailable(MyCode *myCodeObject){
myCodeObject.alternative = 1;
}
Upvotes: 4