| Index: lib/html/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate
|
| ===================================================================
|
| --- lib/html/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate (revision 0)
|
| +++ lib/html/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate (working copy)
|
| @@ -0,0 +1,25 @@
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
|
| +
|
| + // TODO(efortuna): Remove these methods when Chrome stable also uses start
|
| + // instead of noteOn.
|
| + void start(num when, [num grainOffset, num grainDuration]) {
|
| + if (JS('bool', '!!#.start', this)) {
|
| + JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration);
|
| + } else {
|
| + JS('void', '#.noteOn(#, #, #)', this, when, grainOffset, grainDuration);
|
| + }
|
| + }
|
| +
|
| + void stop(num when) {
|
| + if (JS('bool', '!!#.stop', this)) {
|
| + JS('void', '#.stop(#)', this, when);
|
| + } else {
|
| + JS('void', '#.noteOff(#)', this, when);
|
| + }
|
| + }
|
| +$!MEMBERS
|
| +}
|
|
|