Exemple #1
0
        // [input device port] --> [RETURNED PORT] --> app handles messages
        public AlsaPortInfo CreateInputConnectedPort(AlsaPortInfo pinfo, string portName = "alsa-sharp input")
        {
            var portId = input.CreateSimplePort(portName, input_connected_cap, midi_port_type);
            var sub    = new AlsaPortSubscription();

            sub.Destination.Client = (byte)input_client_id;
            sub.Destination.Port   = (byte)portId;
            sub.Sender.Client      = (byte)pinfo.Client;
            sub.Sender.Port        = (byte)pinfo.Port;
            input.SubscribePort(sub);
            return(input.GetPort(sub.Destination.Client, sub.Destination.Port));
        }