This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20500 - enumerate is misnomer
Summary: enumerate is misnomer
Status: CLOSED FIXED
Alias: None
Product: AudioWG
Classification: Unclassified
Component: MIDI API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: TBD
Assignee: Chris Wilson
QA Contact: public-audio
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-24 08:10 UTC by Marcos Caceres
Modified: 2013-01-18 15:50 UTC (History)
2 users (show)

See Also:


Attachments

Description Marcos Caceres 2012-12-24 08:10:02 UTC
enumerateInputs() and enumerateOutputs() are misnomers (apart from being somewhat hard to type and confusingly named). From reading the spec, my understanding is that methods just "get" a copy of the currently available to the system at the time the method is invoked. The methods don't actually "enumerate" anything in this sense (i.e., give you a number or iterate over a sequence using numbers, etc). Can I kindly request that those two methods be renamed:

getInputs();
getOutputs();

or just:
inputs()
outputs()

The above are shorter and more closely match the intent of the methods, which is specified as:
"Returns a list of the MIDI input ports available on the system."
"Returns a list of the MIDI output ports available on the system."

The above definitions should also clarify that these are not a live list (i.e., are not updated as new midi devices are updated or removed from the device).
Comment 2 Chris Wilson 2012-12-26 19:11:37 UTC
Whoops, forgot the "live" comment.

https://github.com/WebAudio/web-midi-api/commit/7bf136465c074840f4e8b3cd76581534bf6fd3a2
Comment 3 Olivier Thereaux 2013-01-18 15:50:53 UTC
Batch-closing RESOLVED MIDI issues. Reminder: midi issues now tracked at https://github.com/WebAudio/web-midi-api/issues