Skip to content

Dartium does not support Web Audio API #1432

Closed
@sethladd

Description

@sethladd

The following Dart code:

import('dart:dom');

main() {

  var audioContext = new AudioContext();

  var source = audioContext.createBufferSource();
  source.connect(audioContext.destination);

  var xhr = new XMLHttpRequest();
  xhr.open("GET", "techno.mp3", true);
  xhr.responseType = "arraybuffer";
  xhr.addEventListener('load', () {
      var buffer = audioContext.createBuffer(xhr.response, false);
      source.buffer = buffer;
      source.noteOn(0);
  });
  xhr.send();

}

(which works fine in JavaScript) does not work in Dartium

Error:

Exception: NotImplementedException
Stack Trace: 0. Function: 'AudioContextImplementation._bind@1c3f8015' url: '/b/build/slave/dartium-mac-inc/build/src/xcodebuild/DerivedSources/Release/webkit/bindings/AudioContextImplementation.dart' line:61 col:3
 1. Function: 'AudioContextImplementation.AudioContextImplementation.' url: '/b/build/slave/dartium-mac-inc/build/src/xcodebuild/DerivedSources/Release/webkit/bindings/AudioContextImplementation.dart' line:57 col:15
 2. Function: '::main' url: 'http://localhost:8000/app.dart' line:5 col:20

Dartium version: 18.0.1023.0 (Developer Build 119649 Mac OS X)

See attachments for HTML and MP3


Attachments:
techno.mp3 (362.45 KB)
app.dart (448 Bytes)
index.html (325 Bytes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions