| <script src="../resources/js-test.js"></script> |
| <script type="text/javascript" src="resources/audio-testing.js"></script> |
| <div id="description"></div> |
| description("Basic tests for DynamicsCompressorNode API."); |
| context = new webkitAudioContext(); |
| compressor = context.createDynamicsCompressor(); |
| if (compressor.threshold.value == -24) |
| testPassed("threshold attribute has correct default value."); |
| testFailed("threshold attribute has incorrect default value."); |
| if (compressor.knee.value == 30) |
| testPassed("knee attribute has correct default value."); |
| testFailed("knee attribute has incorrect default value."); |
| if (compressor.ratio.value == 12) |
| testPassed("ratio attribute has correct default value."); |
| testFailed("ratio attribute has incorrect default value."); |
| if (compressor.attack.value - 0.003 < 3e-8) |
| testPassed("attack attribute has correct default value."); |
| testFailed("attack attribute has incorrect default value."); |
| if (compressor.release.value - 0.25 < 3e-8) |
| testPassed("release attribute has correct default value."); |
| testFailed("release attribute has incorrect default value."); |
| testFailed("Exception thrown when accessing DynamicsCompressorNode attributes."); |