Re: Multi-bus rendering
Re: Multi-bus rendering
- Subject: Re: Multi-bus rendering
- From: William Stewart <email@hidden>
- Date: Wed, 10 Sep 2008 16:36:28 -0700
On Sep 10, 2008, at 9:35 AM, Assaf Dar wrote:
Hi!
Ive been trying to get multiple busses to work for me with no
success :( ive been digging and looking. and would be glad to get
any help on the matter :)
I am inheriting the AUMidiEffectBase and for the moment, just for
testing i am returning a BusWritable as false, and initialising
aubase with 2 input busses and 4 output busses - thus forcing auval
to check out my busses (?)
here is what i have been doing:
1) I tried implementing in Render()
AUInputElement *input = GetInput(i);
input->PullInput(ioActionFlags, inTimeStamp, i, nFrames);
AudioBufferList &inputBufferTemp = input->PrepareBuffer(nFrames);
Where i = buss count.
on the first bus i get the data and its all fine, on the second bus
i always get a pointer to 0.
so i gather that render() only gets one bus each time
you many not have anything connected to the second input. So, you
should check, using the HasInput(i) method first
2) I tried Overwriting RenderBus() and noticed it only renders bus 0
each time (!)
probably because you don't have anyone connected to anything but your
first output bus - so you are only getting asked to produce data on
output bus 0.
also what happens if i have a different bus count for the i/o?
(2busses in 8 or 16 out)?
doesn't matter - that is up to you to handle (and to communicate to
your user what that means)
is there a way to just receive pointers to all of the busses "at
once" (with a for loop)?
Have a look at the doco for the dynamic configuration - this
methodology would provide a limit of the number of channels you can
produce on output (say 16). You allocate internally, buffers to
produce 16 channels of output. When you are first called for a new
time stamp on ***ANY*** output bus, you go and do all of the
calculations for those 16 channels. Then when you are called for that
time stamp, but a different output bus, then you provide those (say 2)
channels.
In this way, you don't care what the output bus configuration is -
just that it is not more than your maximum tolerance (in this example
16 channels).
There's a document that describes this (I think its a tech note on
channel configurations) - have a look at http://developer.apple.com/audio
Bill
or does the host provide with pointers only when it initializes a
buss?
and in that case, i should probably make a dummy module that gives a
pointer to silence instead of those zero pointers?
Help! :>
Best Regards,
Assaf
_______________________________________________
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
_______________________________________________
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