Frage

I have just converted the Filter AU example from apple to use AUMIDIEffectBase class in order to convert it to midi controlled effect.

https://developer.apple.com/library/mac/samplecode/FilterDemo/Introduction/Intro.html

The filter builds however I am getting error in auval tool:

Test MIDI ERROR: -4 IN CALL MusicDeviceSendMIDI

Anybody has implemented AUMIDIEffectBase successfully? Any example code?

War es hilfreich?

Lösung

I was having the same problem today and discovered the issue is in a slightly non-current release of Apple's CoreAudioUtilityClasses, AUMIDIEffectBase class. Due to multiple inheritance the following needed to be added to AUMIDIEffectBase.h so that AUPluginDispatch calls the correct overridden methods.

virtual OSStatus    MIDIEvent(      UInt32                      inStatus, 
                                    UInt32                      inData1, 
                                    UInt32                      inData2, 
                                    UInt32                      inOffsetSampleFrame)
{
    return AUMIDIBase::MIDIEvent (inStatus, inData1, inData2, inOffsetSampleFrame);
}

/*! @method SysEx */
virtual OSStatus    SysEx(          const UInt8 *               inData, 
                                    UInt32                      inLength) 
{
    return AUMIDIBase::SysEx (inData, inLength);
}

I just pulled the latest from Apple's site: https://developer.apple.com/library/mac/samplecode/CoreAudioUtilityClasses/CoreAudioUtilityClasses.zip and it looks like they already fixed the issue. We both had bad download timing, it seems!

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top