Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  refresh_port_list.html   Sprache: HTML

 
 products/sources/formale Sprachen/C/Firefox/dom/midi/tests/refresh_port_list.html


<!DOCTYPE html>
<html>
<head>
<title>Refresh MIDI port list test</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"></meta>
</head>
<body>
<script>
  var access = null;
  async function get_access() {
    access = await navigator.requestMIDIAccess({ sysex: true });
  }

  async function reset_access() {
    access = null;
  }

  async function get_num_ports() {
    return access.inputs.size + access.outputs.size;
  }

  async function add_port() {
    let addPortPromise = new Promise(resolve => {
      access.addEventListener("statechange", (event) => { dump("***** 1 event.port.name = " + event.port.name + "event.connection = " + event.port.connection + "\n"); if (event.port.connection != "open") { resolve(); } });
    });
    const outputs = access.outputs.values();
    const output = outputs.next().value;
    output.send([0x90, 0x01, 0x00]);
    await addPortPromise;
  }

  async function remove_port() {
    let removePortPromise = new Promise(resolve => {
        access.addEventListener("statechange", (event) => { dump("***** 2 event.port.name = " + event.port.name + "event.connection = " + event.port.connection + "\n"); if (event.port.connection != "open") { resolve(); } });
    });
    const outputs = access.outputs.values();
    const output = outputs.next().value;
    output.send([0x90, 0x02, 0x00]);
    await removePortPromise;
  }

  async function force_refresh() {
    const outputs = access.outputs.values();
    const output = outputs.next().value;
    output.send([0x90, 0x04, 0x00]);
  }
</script>
</body>
</html>

Messung V0.5
C=96 H=93 G=94

¤ Dauer der Verarbeitung: 0.19 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge