Re: [genuine] Re: reading Midi from AU
Re: [genuine] Re: reading Midi from AU
- Subject: Re: [genuine] Re: reading Midi from AU
- From: Philippe Wicker <email@hidden>
- Date: Mon, 12 Jan 2004 20:00:41 +0100
On Monday, January 12, 2004, at 04:51 PM, jacques couzteau wrote:
Hello Jacques,
Just move the static initialization code **after** the class
definition, the compiler needs to know type and scope of your variables
before it can allocate and initialize them. Another remark, class
declaration blocks must be ended with a ';' after '}'. They are missing
in the code you reproduce in the original mail.
Cheers.
>
As you say i should be able to define those as static members of class
>
SampleEffectUnit or SampleEffectKernel. I don't doubt that at all,
>
but i have a problem compiling it. I get a syntax error (syntax error
>
before `::' token) where i allocate and initialize my static vars:
>
>
Here is my Code:
>
>
// Allocation and initialisation of the static data members
>
MIDIPortRef SampleEffectUnit::SampleEffectKernel::gOutPort = NULL;
>
//syntax error before `::' token
>
MIDIEndpointRef SampleEffectUnit::SampleEffectKernel::gDest = NULL;
>
//syntax error before `::' token
>
int SampleEffectUnit::SampleEffectKernel::gChannel = 0; // syntax
>
error before `::' token
>
>
class SampleEffectUnit : public AUEffectBase
>
{
>
...
>
class SampleEffectKernel : public AUKernelBase // most real work
>
happens here
>
{
>
static MIDIPortRef gOutPort;
>
...
>
}
Missing ';' here
>
}
and here.
Philippe Wicker
email@hidden
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.