Skip to content

Add sendQueueSize and ondequeue to MIDIOutput for backpressure - #287

Open
mjwilson-google wants to merge 1 commit into
WebAudio:gh-pagesfrom
mjwilson-google:fix-158
Open

mjwilson-google wants to merge 1 commit into
WebAudio:gh-pagesfrom
mjwilson-google:fix-158

Conversation

@mjwilson-google

Copy link
Copy Markdown
Member

Fixes #158

Comment thread index.html
Comment on lines +1108 to +1113
Increase {{MIDIOutput/sendQueueSize}} by the number of bytes in
<var>data</var> when the message is enqueued. When the
underlying system finishes sending the enqueued <var>data</var>
to the port, decrease {{MIDIOutput/sendQueueSize}} by the number
of bytes in <var>data</var> and [=fire an event=] named
"dequeue" at the {{MIDIOutput}}.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In an ideal world we'd normalize dequeuing and such like we do for the Web Audio API, but this is good enough for now.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backpressure exposure for asynchronous send()

2 participants