W3C home > Mailing lists > Public > public-audio@w3.org > October to December 2012

[Bug 20415] Add a serializer to MIDIPort

From: <bugzilla@jessica.w3.org>
Date: Mon, 17 Dec 2012 20:57:09 +0000
To: public-audio@w3.org
Message-ID: <bug-20415-5429-p6uX2l8Ylu@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20415

--- Comment #2 from Marcos Caceres <w3c@marcosc.com> ---
(In reply to comment #1)
> Can you describe exactly what feature you're trying to get from this (i.e.
> user scenario)?

See "9.2 Enumerating Inputs and Outputs" example:
https://dvcs.w3.org/hg/audio/raw-file/tip/midi/specification.html#enumerating-inputs-and-outputs

That's pretty common... with toJSON, it becomes something like:

function showPorts( midiAccess ) {
  function show(port, i){
     console.log("Input port #" + i + " " + port.toJSON());
  }
  midiAccess.enumerateInputs().forEach(show);
  midiAccess.enumerateOutputs().forEach(show);
}

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Monday, 17 December 2012 20:57:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:04 UTC