AudioUnitKernal constructor called twice...
AudioUnitKernal constructor called twice...
- Subject: AudioUnitKernal constructor called twice...
- From: "email@hidden" <email@hidden>
- Date: Mon, 08 Aug 2011 23:14:47 +0100
Hi
Apologies if the answer to my query is obvious and google-able. I need this clarifying...
I am making an audio unit called 'PlayerUnit'. I started with an audio unit template, followed the audio unit tutorial docs, and am adding code to the audio unit kernel constructor (in this case, PlayerUnit::PlayerUnitKernel::PlayerUnitKernel() ). When I run my project, xcode runs AU Lab, where PlayerUnit is instantiated as an effect on an 'AU Generator' channel. 'PlayerUnit' can then print values to the console so I can see what's going on.
After using 'printf()' a fair bit in the kernel constructor, it has become apparent that this constructor is being called twice. I did not expect this. I thought there would be one audio unit kernel which processes interleaved audio data. Why is the constructor being called twice? Is it something I have done wrong, or is it related to my testing procedure? I am allocating memory in this constructor, and I don't want to do this twice!
Thanks in advance.
Simon _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden