             }
         }
 
-        if virtOutput != 0 {
-            MIDIReceived(virtOutput, packetListPtr);
+        if virtualOutput != 0 {
+            MIDIReceived(virtualOutput, packetListPtr);
         }
         
         packetListPtr.destroy()

    public var midiOutPort = MIDIPortRef()

    // virtual midi source (output)
    public var virtOutput = MIDIPortRef()

    
    /// Array of MIDI Endpoints

        }

        if virtualInput != 0 {
            MIDIEndpointDispose(virtualOutput)
            virtualInput = 0
        }
    }
