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); }
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()); } } } }
public void SetContextSequencer(AlsaSequencer seq) { Natives.snd_seq_system_info(seq.SequencerHandle, handle); }