Exemplo n.º 1
0
 public AlsaMidiApi()
 {
     input               = new AlsaSequencer(AlsaIOType.Duplex, AlsaIOMode.NonBlocking);
     input_client_id     = input.CurrentClientId;
     output              = new AlsaSequencer(AlsaIOType.Output, AlsaIOMode.NonBlocking);
     output_client_id    = output.CurrentClientId;
     system_announcement = new AlsaSequencer(AlsaIOType.Input, AlsaIOMode.NonBlocking);
 }
Exemplo n.º 2
0
        IEnumerable <AlsaPortInfo> EnumerateMatchingPorts(AlsaSequencer seq, AlsaPortCapabilities cap)
        {
            var cinfo = new AlsaClientInfo {
                Client = -1
            };

            while (seq.QueryNextClient(cinfo))
            {
                var pinfo = new AlsaPortInfo {
                    Client = cinfo.Client, Port = -1
                };
                while (seq.QueryNextPort(pinfo))
                {
                    if ((pinfo.PortType & midi_port_type) != 0 &&
                        (pinfo.Capabilities & cap) == cap)
                    {
                        yield return(pinfo.Clone());
                    }
                }
            }
        }
Exemplo n.º 3
0
 public void SetContextSequencer(AlsaSequencer seq)
 {
     Natives.snd_seq_system_info(seq.SequencerHandle, handle);
 }