Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MIDITHRONCONNECTIONCREATE xcode_Xcode_Coremidi - Fatal编程技术网

MIDITHRONCONNECTIONCREATE xcode

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;

我用coreMIDI和Xcode为“midithronnectioncreate”尝试了这个方法,但它不起作用。 MIDI In和MIDI Out正在工作,但不是MIDI Thru。谢谢你的帮助

- (void) midiThru
{
    MIDIThruConnectionParams params;
    CFDataRef dataRef;

    #if __LP64__
        typedef MIDIObjectRef MIDIThruConnectionRef;
    #else
        typedef struct OpaqueMIDIThruConnection * MIDIThruConnectionRef;
    #endif

    MIDIThruConnectionRef thru;

    MIDIThruConnectionParamsInitialize(&params);
    params.numSources = 1;
    params.sources[0].endpointRef = sourceMIDI;
    params.numDestinations = 1;
    params.destinations[0].endpointRef = destMIDI;
    dataRef = CFDataCreate(NULL, (unsigned char*) &params,
                                 sizeof(MIDIThruConnectionParams));
    s = MIDIThruConnectionCreate(NULL, dataRef, &thru);

    CFRelease(dataRef);
}