Closed
Bug 1201593
Opened 9 years ago
Closed 3 years ago
Implement Mac OS X backend for WebMIDI
Categories
(Core :: DOM: Device Interfaces, task, P3)
Core
DOM: Device Interfaces
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: qdot, Assigned: padenot)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fixed by bug 1728436])
Attachments
(3 obsolete files)
Implement platform specific MIDI backend for Mac OS X.
Comment 1•9 years ago
|
||
Hi Kyle. Would you mind attaching your WIP patches so other people can play around with the prelimenary support?
Flags: needinfo?(kyle)
Reporter | ||
Comment 2•9 years ago
|
||
Sure, will try to do that today. If you want to track development without having to patch from bugzilla, my current dev branch is at
https://github.com/qdot/gecko-hg/tree/836897-webmidi
Flags: needinfo?(kyle)
Reporter | ||
Comment 3•9 years ago
|
||
Reporter | ||
Comment 4•9 years ago
|
||
Fixed compilation against v1 set of DOM API patches.
Attachment #8697714 -
Attachment is obsolete: true
Reporter | ||
Comment 5•9 years ago
|
||
Ok, so here's what I know is missing from mac support at the moment:
- Packet timing doesn't work. Need to figure out how to get MIDITimeStamps (which are just host time for mac) into our TimeStamp type.
- Device hotplugging doesn't work, because of an issue with how we deal with CFRunLoop.
So, as long as everything is plugged in when you start firefox, and you don't particularly care about when you sent anything, or sending things in the future, this patch at least allows you to play with devices.
Reporter | ||
Comment 6•9 years ago
|
||
And adding to that list:
- Need to change copyright to chromium, since this is an adaptation of their MIDI core.
Comment 7•9 years ago
|
||
I worked on Web MIDI for Chromium, and would love to see it in Firefox.
For timestamp code, I recommend not using any of the OS-level timestamp/scheduling stuff. The requirements of Web MIDI don't match well across Mac/Linux/Windows around this aspect. What happened in Chromium was that Mac was implemented first with the native OS scheduling, then Windows and Linux needed to implement their independently. Now for simplicity, we want to move to just one scheduling code path.
See https://code.google.com/p/chromium/issues/detail?id=467442
Reporter | ||
Comment 8•9 years ago
|
||
(In reply to Adam Goode from comment #7)
> I worked on Web MIDI for Chromium, and would love to see it in Firefox.
Hey! I recognized your name from reading the Chromium code. :D
> For timestamp code, I recommend not using any of the OS-level
> timestamp/scheduling stuff. The requirements of Web MIDI don't match well
> across Mac/Linux/Windows around this aspect. What happened in Chromium was
> that Mac was implemented first with the native OS scheduling, then Windows
> and Linux needed to implement their independently. Now for simplicity, we
> want to move to just one scheduling code path.
Hmm, yeah, I was wondering about this too. We've actually got a generalized TimeStamp class for cross-platform monotonically increasing timers, which on OS X uses mach_absolute_time at its base. I was thinking about using that for our MIDI timing since it seems like it will "just work" once we get above the platform specifics.
Reporter | ||
Comment 9•9 years ago
|
||
Annnnnnd now that I've read the chromium patch I see what's going on. So you're just having all platforms schedule a task through the MIDIScheduler, versus having just one OS do it natively while the others have to schedule through it. Totally makes sense, I was probably being a little myopic by just looking at the OS X implementation. I was planning on going a similar direction once I got to linux/windows, but should probably just get the implementation over with now. Thanks for the heads up!
Comment 10•9 years ago
|
||
We're currently split between OS/non-OS scheduling but trying to consolidate.
Separately, I think that using the OS timestamp for incoming events is fine as long as the OS uses the correct clock. ALSA uses a separate clock from the normal monotonic clock so rather than try to synchronize, we just put on a new timestamp. Mac I think is fine.
Reporter | ||
Comment 11•8 years ago
|
||
Making this depend on bug 1135640 since we're doing midi platform specifics in Rust.
Depends on: oxidation
Reporter | ||
Updated•7 years ago
|
Priority: -- → P3
Reporter | ||
Updated•6 years ago
|
Assignee: kyle → nobody
Updated•6 years ago
|
Type: defect → task
Assignee | ||
Updated•3 years ago
|
Attachment #8697726 -
Attachment is obsolete: true
Assignee | ||
Comment 12•3 years ago
|
||
Updated•3 years ago
|
Assignee: nobody → padenot
Status: NEW → ASSIGNED
Updated•3 years ago
|
Attachment #9252130 -
Attachment is obsolete: true
Updated•3 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Updated•3 years ago
|
Severity: normal → --
status-firefox43:
affected → ---
status-firefox97:
--- → fixed
Whiteboard: [fixed by bug 1728436]
You need to log in
before you can comment on or make changes to this bug.
Description
•