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


Quellcode-Bibliothek test_oscillatorNode.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/dom/media/webaudio/test/test_oscillatorNode.html


<!DOCTYPE HTML>
<html>
<head>
  <title>Test the OscillatorNode interface</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="webaudio.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">

SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {

  var context = new AudioContext();
  var osc = new OscillatorNode(context);

  is(osc.channelCount, 2, "Oscillator node has 2 input channels by default");
  is(osc.channelCountMode, "max""Correct channelCountMode for the Oscillator node");
  is(osc.channelInterpretation, "speakers""Correct channelCountInterpretation for the Oscillator node");
  is(osc.type, "sine""Correct default type");
  expectException(function() {
    osc.type = "custom";
  }, DOMException.INVALID_STATE_ERR);
  is(osc.type, "sine""Cannot set the type to custom");
  is(osc.frequency.value, 440, "Correct default frequency value");
  is(osc.detune.value, 0, "Correct default detine value");

  // Make sure that we can set all of the valid type values
  var types = [
    "sine",
    "square",
    "sawtooth",
    "triangle",
  ];
  for (var i = 0; i < types.length; ++i) {
    osc.type = types[i];
  }

  // Verify setPeriodicWave()
  var real = new Float32Array([1.0, 0.5, 0.25, 0.125]);
  var imag = new Float32Array([1.0, 0.7, -1.0, 0.5]);
  osc.setPeriodicWave(context.createPeriodicWave(real, imag));
  is(osc.type, "custom""Failed to set custom waveform");

  expectNoException(function() {
    osc.start();
  });
  expectNoException(function() {
    osc.stop();
  });

  SimpleTest.finish();
});

</script>
</pre>
</body>
</html>

Messung V0.5
C=96 H=88 G=91

¤ 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.0.12Bemerkung:  (vorverarbeitet)  ¤

*Bot Zugriff






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