MIDITHRONCONNECTIONCREATE xcode
我用coreMIDI和Xcode为“midithronnectioncreate”尝试了这个方法,但它不起作用。 MIDI In和MIDI Out正在工作,但不是MIDI Thru。谢谢你的帮助MIDITHRONCONNECTIONCREATE xcode,xcode,coremidi,Xcode,Coremidi,我用coreMIDI和Xcode为“midithronnectioncreate”尝试了这个方法,但它不起作用。 MIDI In和MIDI Out正在工作,但不是MIDI Thru。谢谢你的帮助 - (void) midiThru { MIDIThruConnectionParams params; CFDataRef dataRef; #if __LP64__ typedef MIDIObjectRef MIDIThruConnectionRef;
- (void) midiThru
{
MIDIThruConnectionParams params;
CFDataRef dataRef;
#if __LP64__
typedef MIDIObjectRef MIDIThruConnectionRef;
#else
typedef struct OpaqueMIDIThruConnection * MIDIThruConnectionRef;
#endif
MIDIThruConnectionRef thru;
MIDIThruConnectionParamsInitialize(¶ms);
params.numSources = 1;
params.sources[0].endpointRef = sourceMIDI;
params.numDestinations = 1;
params.destinations[0].endpointRef = destMIDI;
dataRef = CFDataCreate(NULL, (unsigned char*) ¶ms,
sizeof(MIDIThruConnectionParams));
s = MIDIThruConnectionCreate(NULL, dataRef, &thru);
CFRelease(dataRef);
}