{"action":"created","comment":{"url":"https://api.github.com/repos/servo/media/pulls/comments/193712671","pull_request_review_id":126733537,"id":193712671,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzcxMjY3MQ==","diff_hunk":"@@ -0,0 +1,147 @@\n+use audio::block::Block;\n+use audio::block::Chunk;\n+use audio::destination_node::DestinationNode;\n+use audio::node::AudioNodeEngine;\n+use audio::node::BlockInfo;\n+use petgraph::Direction;\n+use petgraph::graph::DefaultIx;\n+use petgraph::stable_graph::NodeIndex;\n+use petgraph::stable_graph::StableGraph;\n+use petgraph::visit::{DfsPostOrder, EdgeRef};\n+use std::cell::RefCell;\n+\n+#[derive(Clone, Copy)]\n+pub struct NodeId(pub usize);\n+\n+// we'll later alias NodeId to this\n+pub type LocalNodeId = NodeIndex<DefaultIx>;\n+\n+/// A zero-indexed \"port\" for a node. Most nodes have one\n+/// input and one output port, but some may have more.\n+/// For example, a channel splitter node will have one output\n+/// port for each channel.\n+///\n+/// These are essentially indices into the Chunks\n+///\n+/// Kind is a zero sized type and is useful for distinguishing\n+/// between input and output ports (which may otherwise share indices)\n+pub type PortIndex<Kind> = (u32, Kind);\n+\n+/// An identifier for a port.\n+pub type PortId<Kind> = (LocalNodeId, PortIndex<Kind>);\n+\n+#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]\n+pub struct InputPort;\n+#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]\n+pub struct OutputPort;\n+\n+pub struct GraphImpl {\n+    graph: StableGraph<Node, Edge>,\n+    dest_id: LocalNodeId,\n+}\n+\n+pub struct Node {\n+    node: RefCell<Box<AudioNodeEngine>>,","path":"src/audio/graph_impl.rs","position":44,"original_position":44,"commit_id":"f3a9639e06bdb28e978d247eeb8feb71926602c6","original_commit_id":"f3a9639e06bdb28e978d247eeb8feb71926602c6","user":{"login":"ferjm","id":480202,"node_id":"MDQ6VXNlcjQ4MDIwMg==","avatar_url":"https://avatars0.githubusercontent.com/u/480202?v=4","gravatar_id":"","url":"https://api.github.com/users/ferjm","html_url":"https://github.com/ferjm","followers_url":"https://api.github.com/users/ferjm/followers","following_url":"https://api.github.com/users/ferjm/following{/other_user}","gists_url":"https://api.github.com/users/ferjm/gists{/gist_id}","starred_url":"https://api.github.com/users/ferjm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferjm/subscriptions","organizations_url":"https://api.github.com/users/ferjm/orgs","repos_url":"https://api.github.com/users/ferjm/repos","events_url":"https://api.github.com/users/ferjm/events{/privacy}","received_events_url":"https://api.github.com/users/ferjm/received_events","type":"User","site_admin":false},"body":"Note that AudioParams may be graph nodes as well.","created_at":"2018-06-07T11:27:15Z","updated_at":"2018-06-07T11:28:23Z","html_url":"https://github.com/servo/media/pull/45#discussion_r193712671","pull_request_url":"https://api.github.com/repos/servo/media/pulls/45","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/servo/media/pulls/comments/193712671"},"html":{"href":"https://github.com/servo/media/pull/45#discussion_r193712671"},"pull_request":{"href":"https://api.github.com/repos/servo/media/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/servo/media/pulls/45","id":193160731,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMTYwNzMx","html_url":"https://github.com/servo/media/pull/45","diff_url":"https://github.com/servo/media/pull/45.diff","patch_url":"https://github.com/servo/media/pull/45.patch","issue_url":"https://api.github.com/repos/servo/media/issues/45","number":45,"state":"open","locked":false,"title":"Basic graph abstraction","user":{"login":"Manishearth","id":1617736,"node_id":"MDQ6VXNlcjE2MTc3MzY=","avatar_url":"https://avatars2.githubusercontent.com/u/1617736?v=4","gravatar_id":"","url":"https://api.github.com/users/Manishearth","html_url":"https://github.com/Manishearth","followers_url":"https://api.github.com/users/Manishearth/followers","following_url":"https://api.github.com/users/Manishearth/following{/other_user}","gists_url":"https://api.github.com/users/Manishearth/gists{/gist_id}","starred_url":"https://api.github.com/users/Manishearth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manishearth/subscriptions","organizations_url":"https://api.github.com/users/Manishearth/orgs","repos_url":"https://api.github.com/users/Manishearth/repos","events_url":"https://api.github.com/users/Manishearth/events{/privacy}","received_events_url":"https://api.github.com/users/Manishearth/received_events","type":"User","site_admin":false},"body":"Todo: Using it in the code\n\nr? @ferjm","created_at":"2018-06-06T22:43:51Z","updated_at":"2018-06-07T11:28:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90b24374e75bef148ea4df882f0302edc8486f9e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/servo/media/pulls/45/commits","review_comments_url":"https://api.github.com/repos/servo/media/pulls/45/comments","review_comment_url":"https://api.github.com/repos/servo/media/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/media/issues/45/comments","statuses_url":"https://api.github.com/repos/servo/media/statuses/f3a9639e06bdb28e978d247eeb8feb71926602c6","head":{"label":"servo:graph","ref":"graph","sha":"f3a9639e06bdb28e978d247eeb8feb71926602c6","user":{"login":"servo","id":2566135,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NjYxMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/2566135?v=4","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"repo":{"id":125494444,"node_id":"MDEwOlJlcG9zaXRvcnkxMjU0OTQ0NDQ=","name":"media","full_name":"servo/media","owner":{"login":"servo","id":2566135,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NjYxMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/2566135?v=4","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servo/media","description":null,"fork":false,"url":"https://api.github.com/repos/servo/media","forks_url":"https://api.github.com/repos/servo/media/forks","keys_url":"https://api.github.com/repos/servo/media/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servo/media/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servo/media/teams","hooks_url":"https://api.github.com/repos/servo/media/hooks","issue_events_url":"https://api.github.com/repos/servo/media/issues/events{/number}","events_url":"https://api.github.com/repos/servo/media/events","assignees_url":"https://api.github.com/repos/servo/media/assignees{/user}","branches_url":"https://api.github.com/repos/servo/media/branches{/branch}","tags_url":"https://api.github.com/repos/servo/media/tags","blobs_url":"https://api.github.com/repos/servo/media/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servo/media/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servo/media/git/refs{/sha}","trees_url":"https://api.github.com/repos/servo/media/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servo/media/statuses/{sha}","languages_url":"https://api.github.com/repos/servo/media/languages","stargazers_url":"https://api.github.com/repos/servo/media/stargazers","contributors_url":"https://api.github.com/repos/servo/media/contributors","subscribers_url":"https://api.github.com/repos/servo/media/subscribers","subscription_url":"https://api.github.com/repos/servo/media/subscription","commits_url":"https://api.github.com/repos/servo/media/commits{/sha}","git_commits_url":"https://api.github.com/repos/servo/media/git/commits{/sha}","comments_url":"https://api.github.com/repos/servo/media/comments{/number}","issue_comment_url":"https://api.github.com/repos/servo/media/issues/comments{/number}","contents_url":"https://api.github.com/repos/servo/media/contents/{+path}","compare_url":"https://api.github.com/repos/servo/media/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servo/media/merges","archive_url":"https://api.github.com/repos/servo/media/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servo/media/downloads","issues_url":"https://api.github.com/repos/servo/media/issues{/number}","pulls_url":"https://api.github.com/repos/servo/media/pulls{/number}","milestones_url":"https://api.github.com/repos/servo/media/milestones{/number}","notifications_url":"https://api.github.com/repos/servo/media/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servo/media/labels{/name}","releases_url":"https://api.github.com/repos/servo/media/releases{/id}","deployments_url":"https://api.github.com/repos/servo/media/deployments","created_at":"2018-03-16T09:29:29Z","updated_at":"2018-06-07T08:41:04Z","pushed_at":"2018-06-07T08:41:02Z","git_url":"git://github.com/servo/media.git","ssh_url":"git@github.com:servo/media.git","clone_url":"https://github.com/servo/media.git","svn_url":"https://github.com/servo/media","homepage":null,"size":296,"stargazers_count":1,"watchers_count":1,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":3,"open_issues":9,"watchers":1,"default_branch":"master"}},"base":{"label":"servo:master","ref":"master","sha":"ca8fc8b93fd9759f4f63c92f448f6c385ab6b667","user":{"login":"servo","id":2566135,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NjYxMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/2566135?v=4","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"repo":{"id":125494444,"node_id":"MDEwOlJlcG9zaXRvcnkxMjU0OTQ0NDQ=","name":"media","full_name":"servo/media","owner":{"login":"servo","id":2566135,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NjYxMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/2566135?v=4","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servo/media","description":null,"fork":false,"url":"https://api.github.com/repos/servo/media","forks_url":"https://api.github.com/repos/servo/media/forks","keys_url":"https://api.github.com/repos/servo/media/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servo/media/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servo/media/teams","hooks_url":"https://api.github.com/repos/servo/media/hooks","issue_events_url":"https://api.github.com/repos/servo/media/issues/events{/number}","events_url":"https://api.github.com/repos/servo/media/events","assignees_url":"https://api.github.com/repos/servo/media/assignees{/user}","branches_url":"https://api.github.com/repos/servo/media/branches{/branch}","tags_url":"https://api.github.com/repos/servo/media/tags","blobs_url":"https://api.github.com/repos/servo/media/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servo/media/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servo/media/git/refs{/sha}","trees_url":"https://api.github.com/repos/servo/media/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servo/media/statuses/{sha}","languages_url":"https://api.github.com/repos/servo/media/languages","stargazers_url":"https://api.github.com/repos/servo/media/stargazers","contributors_url":"https://api.github.com/repos/servo/media/contributors","subscribers_url":"https://api.github.com/repos/servo/media/subscribers","subscription_url":"https://api.github.com/repos/servo/media/subscription","commits_url":"https://api.github.com/repos/servo/media/commits{/sha}","git_commits_url":"https://api.github.com/repos/servo/media/git/commits{/sha}","comments_url":"https://api.github.com/repos/servo/media/comments{/number}","issue_comment_url":"https://api.github.com/repos/servo/media/issues/comments{/number}","contents_url":"https://api.github.com/repos/servo/media/contents/{+path}","compare_url":"https://api.github.com/repos/servo/media/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servo/media/merges","archive_url":"https://api.github.com/repos/servo/media/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servo/media/downloads","issues_url":"https://api.github.com/repos/servo/media/issues{/number}","pulls_url":"https://api.github.com/repos/servo/media/pulls{/number}","milestones_url":"https://api.github.com/repos/servo/media/milestones{/number}","notifications_url":"https://api.github.com/repos/servo/media/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servo/media/labels{/name}","releases_url":"https://api.github.com/repos/servo/media/releases{/id}","deployments_url":"https://api.github.com/repos/servo/media/deployments","created_at":"2018-03-16T09:29:29Z","updated_at":"2018-06-07T08:41:04Z","pushed_at":"2018-06-07T08:41:02Z","git_url":"git://github.com/servo/media.git","ssh_url":"git@github.com:servo/media.git","clone_url":"https://github.com/servo/media.git","svn_url":"https://github.com/servo/media","homepage":null,"size":296,"stargazers_count":1,"watchers_count":1,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":3,"open_issues":9,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/media/pulls/45"},"html":{"href":"https://github.com/servo/media/pull/45"},"issue":{"href":"https://api.github.com/repos/servo/media/issues/45"},"comments":{"href":"https://api.github.com/repos/servo/media/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/media/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/media/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/media/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/servo/media/statuses/f3a9639e06bdb28e978d247eeb8feb71926602c6"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ferjm"}}