Re: problem w/ Matrix Mixer
Re: problem w/ Matrix Mixer
- Subject: Re: problem w/ Matrix Mixer
- From: Robert Grant <email@hidden>
- Date: Tue, 16 Dec 2003 09:33:30 -0500
Well to follow up on my earlier note....
I wrote a few days back about how to switch off a SetRenderCallback
because I was having trouble doing it and keeping the MatrixMixer going
(similar - if not identical - to James's issue I think). Well I never
tracked it down and so I was leaving things connected - and was thus
able to happily connected and "disconnect" (i.e. leave it connected but
just turn off the MatrixMixer input) things. This worked well until my
live audio input feature. This one I actually want to disconnect
because there's a delay before disabling a MatrixMixer input takes
effect and even though I was switching off the audio input - render
requests were still coming and eventually (OK, quickly) the AudioDevice
would blow up.
So I went back to figuring out how to disconnect the SetRenderCallback
- sleuthing through AUBase and AUInputElement (which I should have done
in the first place) showed that passing in an AURenderCallbackStruct
with inputProc set to null should do the trick. And it does - except
that I now get "NoConnection" errors up the wazoo and the MatrixMixer
(to bring it back to your issue James) produces no output. And to make
it weirder this connection was made at the bottom end of a subgraph.
So how does one disconnect without ending up with a NoConnection error
and an unhappy MatrixMixer?
Thanks,
Robert.
On Dec 16, 2003, at 6:52 AM, Robert Grant wrote:
Hi James,
The only other time I got nothing coming out of the mixer was when I
had a broken connection. Are you checking the LastRender error status?
Here's a suitable callback in case you're not:
void MyAudioUnitPropertyListenerProc(void *inRefCon, AudioUnit ci,
AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement
inElement)
{
OSStatus status;
static OSStatus lasterror = noErr;
UInt32 size = sizeof(lasterror);
OSStatus result = ::AudioUnitGetProperty(ci, inID, inScope,
inElement, &lasterror, &size);
if ((status == noErr) && (lasterror != noErr)) {
fprintf(stderr, "unit %p reported error %ld\n", ci, lasterror);
}
}
// Add the following to your graph construction code:
AudioUnitAddPropertyListener(outputUnit,
kAudioUnitProperty_LastRenderError, &MyAudioUnitPropertyListenerProc,
NULL);
Hope that helps,
Robert,
On Dec 16, 2003, at 12:53 AM, James Coker wrote:
I have a simple AU graph that looks like this:
A Matrix mixer w/ 64 stereo input busses, all disabled
but the first two. There is one stereo output buss, connected
to the default output AU.
A stereo synth is connected to the first matrix bus input.
A second stereo synth is connected to the second.
So there are 4 connections in the graph, and everything
sounds fine -- I can hear output from both synths.
if I disable the 2nd MatrixMixer input bus, then disconnect
the 2nd stereo synth, all output stops. Reconnecting and
enabling the 2nd synth restores audio output from both
synths.
I know there is an issue w/ the enable flag on MatrixMixer
inputs, but is there some other trick regarding connections
that I missed?
Thanks,
Jim
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.