Unable to set renderer callback
Unable to set renderer callback
- Subject: Unable to set renderer callback
- From: Todd Blanchard <email@hidden>
- Date: Tue, 4 Sep 2007 10:07:29 -0700
This is driving me nuts and has been for about 3 weeks now.
The underlying problem: Calling MusicDeviceMIDIEvent from the midi
receive thread drops events - I end up with stuck notes. I have
carefully logged the events I'm getting and I am absolutely convinced
there is no problem receiving the events. It is in the sending of them.
My app does some note filtering and transposition of events so I have
to intercept, fiddle, and then send them on. I have logged what I
send. There is no problem there.
I read an earlier thread in the archives that implied that sending
calling MusicDeviceMIDIEvent from the receive thread might be a
problem and suggested queueing the events and sending them on in the
pre-render callback. So I'm trying to do that.
This device behaves properly from digital performer and various other
containers. So I assume the problem is mine.
However - all efforts to set the rendercallback using
AudioUnitSetProperty(au, kAudioUnitProperty_SetRenderCallback, scope,
0, &cbstruct,sizeof(cbstruct))
where scope is input, output or global (how exactly is one supposed
to know - it is a soft synth - all the examples show it on the input
side of DefaultOutput?) fail with -10877 - no such element.
I've tried element 1 as well - just for grins.
I've tried delaying installation of the callback until after I call
graph update.
Is the callback supported universally or at the pleasure of the
component implementor?
Suggestions for either
1) improving the reliability of sending midi events or
2) getting the callback installed so I can try sending them on the
pre-render callback
would be gratefully received.
Todd Blanchard
_______________________________________________
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