Exemplo n.º 1
0
        public async void SetOutputPort(IMidiPortDetails port)
        {
            await output.CloseAsync();

            // output.Dispose();
            this.output = await access.OpenOutputAsync(port.Id);
        }
Exemplo n.º 2
0
 private MidiCommunicationChannel(IMidiAccess2 midiAccess, string inputNameOrId, string outputNameOrId) : this(
         midiAccess.OpenInputAsync(midiAccess.Inputs.First(a => a.Name == inputNameOrId || a.Id == inputNameOrId).Id)
         .Result,
         midiAccess.OpenOutputAsync(midiAccess.Outputs.First(a => a.Name == outputNameOrId || a.Id == outputNameOrId)
                                    .Id).Result)
 {
 }
Exemplo n.º 3
0
 public Player()
 {
     this.access = (IMidiAccess2)MidiAccessManager.Default;
     this.output = access.OpenOutputAsync(access.Outputs.Last().Id).Result;
 }