Re: Cocoa and PortAudio
Re: Cocoa and PortAudio
- Subject: Re: Cocoa and PortAudio
- From: Cameron Hayne <email@hidden>
- Date: Thu, 17 Oct 2002 08:34:26 -0400
On 17/10/02 6:27 am, "Jont Olof Lyttkens" <email@hidden> wrote:
>
data -> right_phase += [pitchSlider floatValue] * 0.01f;
>
if ( data -> right_phase >= 1.0f )
>
{
>
data -> right_phase -= 2.0f;
>
}
>
}
>
return 0;
>
}
>
>
>
@implementation MyDocument { .. }
>
>
>
The error message I get is:
>
>
Compiling MyDocument.mm (1 error)
>
"pitchSlider" undeclared (first use this function) (Each undeclared
>
identifier is reported only once for each function is appears in.)
Ok - I see the problem. You have your callback function outside of the
'implementation' section of the .mm file. This means that your function does
not have access to the ivars of the Obj-C class. Hence the comnpiler does
not know what 'pitchSlider' is. (That is what the error message is saying -
it is not referring to 'pitchSlider' as a function. The "first use this
function" is just telling you that this unknown symbol first occurred in
this function.)
I think you want to put the callback function inside the 'implementation'
section.
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.