From a 2013 thread on this list:

> I believe that is correct.  To get access to the handlers for the 
> AUMIDIEffectBase
> methods, you need to use the specialized factory to construct the object.
> 
> -DS
> 
> On Oct 20, 2013, at 6:51 PM, Edward Agabeg <e...@apple.com 
> <mailto:e...@apple.com>> wrote:
> 
>> On 10/19/13 9:20 PM, "Markus Fritze" <mfri...@apple.com 
>> <mailto:mfri...@apple.com>> wrote:
>> 
>>> On Oct 19, 2013, at 16:24, Edward Agabeg <e...@apple.com 
>>> <mailto:e...@apple.com>> wrote:
>>> 
>>> I would like to get more information about what methods are tested in auval
>>> tool producing the ERROR: -4 IN CALL MusicDeviceSendMIDI
>>> 
>>> I think your MIDIEvent function returns that error code. Set a breakpoint on
>>> it, auval tries to send (0x90, 60, 127) to your AU.
>>> 
>>> 
>>> Markus
>> 
>> I think I figured out what was going on.
>> 
>> In our specific sample FilterDemo which was originally just an effect and
>> the developer simply modified in a very basic way, the factory method was
>> defined like this:
>> 
>> AUDIOCOMPONENT_ENTRY( AUBaseFactory, Filter)
>> 
>> Reading that google thread with the talk of dispatching it occurred to me
>> that while I haven't studied the the AUPublic Plugin Dispatcher or class
>> hierarchies enough to have realized this immediately, it made sense from my
>> previous experience with QT components that this could simply be a
>> dispatching issue. Sure enough MIDIEvent was never getting called for me
>> when I modified our sample in the same way as described by the developer and
>> somewhere a -4 is being returned in this case.
>> 
>> Setting up the Factory Method like this, calls my MIDIEvent function within
>> my plugin and now prints out some logging info and returns a user specified
>> error so I know my functions are getting called.
>> 
>> AUDIOCOMPONENT_ENTRY(AUMIDIEffectFactory, Filter)
>> 
>> Doug, do you agree that the above factory is what should be used when
>> building a 'aumf’?



> On Sep 21, 2016, at 10:03 AM, John Smith <hpde...@yahoo.com> wrote:
> 
> I recently converted my AU from an audio effect into a music effect so that 
> it can receive MIDI controller messages from the host. Only problem is my AU 
> fails the auval MIDI test with the message “ERROR: -4 IN CALL 
> MusicDeviceSendMIDI”. The error message is unclear because I am not 
> inheriting from the MusicDeviceBase class. I could use some help in trying to 
> isolate the cause of this error. Or general feedback if I am going about this 
> the wrong way.
> 
> Here is some background information:
> 1) While converting my AU to a music effect, I changed the inheritance from 
> AUEffectBase to  AUMIDIEffectBase. I implemented overrides for public and 
> protected methods having to do with MIDI, making sure that my AU does not 
> return error -4 (kAudio_UnimplementedError).
> 2) I followed the instructions in this tech note to be forward compatible 
> with the new AUPlugin model, and backwards compatible with OS X v10.6.x:  
> https://developer.apple.com/library/content/technotes/tn2276/_index.html 
> <https://developer.apple.com/library/content/technotes/tn2276/_index.html>
> 3) I updated all occurrences of kAudioUnitType_Effect (aufx) to 
> kAudioUnitType_MusicEffect (aumf), including the Info.plist dictionary entry 
> described in the above tech note.
> 
> System Config:
> OS X 10.11.6
> auval v1.6.1a1 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list      (Coreaudio-api@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/coreaudio-api/douglas_scott%40apple.com
> 
> This email sent to douglas_sc...@apple.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (Coreaudio-api@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to