Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: sdk/lib/web_audio/dartium/web_audio_dartium.dart

Issue 138003019: Fix for bug 14923 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/web_audio/dart2js/web_audio_dart2js.dart ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/web_audio/dartium/web_audio_dartium.dart
diff --git a/sdk/lib/web_audio/dartium/web_audio_dartium.dart b/sdk/lib/web_audio/dartium/web_audio_dartium.dart
index 8e581b0d5b74d45a700c673e2b9281038a980222..aa737b554c0c3ed1e10a9ea7b20b7ae49b2d7fdc 100644
--- a/sdk/lib/web_audio/dartium/web_audio_dartium.dart
+++ b/sdk/lib/web_audio/dartium/web_audio_dartium.dart
@@ -479,14 +479,6 @@ class AudioContext extends EventTarget {
@DocsEditable()
void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallback, [AudioBufferCallback errorCallback]) native "AudioContext_decodeAudioData_Callback";
- Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) {
- var completer = new Completer<AudioBuffer>();
- _decodeAudioData(audioData,
- (value) { completer.complete(value); },
- (error) { completer.completeError(error); });
- return completer.future;
- }
-
@DomName('AudioContext.startRendering')
@DocsEditable()
void startRendering() native "AudioContext_startRendering_Callback";
@@ -511,6 +503,20 @@ class AudioContext extends EventTarget {
@DocsEditable()
Stream<Event> get onComplete => completeEvent.forTarget(this);
+ @DomName('AudioContext.decodeAudioData')
+ Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) {
+ var completer = new Completer<AudioBuffer>();
+ _decodeAudioData(audioData,
+ (value) { completer.complete(value); },
+ (error) {
+ if (error == null) {
+ completer.completeError('');
+ } else {
+ completer.completeError(error);
+ }
+ });
+ return completer.future;
+ }
}
// 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
« no previous file with comments | « sdk/lib/web_audio/dart2js/web_audio_dart2js.dart ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698