• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa and PortAudio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Cocoa and PortAudio
      • From: David Remahl <email@hidden>
References: 
 >Re: Cocoa and PortAudio (From: Jont Olof Lyttkens <email@hidden>)

  • Prev by Date: Re: Mouse Event Handling
  • Next by Date: Re: Cocoa and PortAudio
  • Previous by thread: Re: Cocoa and PortAudio
  • Next by thread: Re: Cocoa and PortAudio
  • Index(es):
    • Date
    • Thread