Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move audio sink into audio destination node #38

Merged
merged 4 commits into from
Jun 7, 2018

Conversation

ferjm
Copy link
Contributor

@ferjm ferjm commented Jun 4, 2018

No description provided.

@ferjm ferjm requested a review from Manishearth June 4, 2018 15:45
@ferjm
Copy link
Contributor Author

ferjm commented Jun 4, 2018

r? @Manishearth

Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

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

Perhaps we should just store the destination node separately from the graph? I'm not sure.

Looks fine as is, either way.

I'd rather not have the Any stuff here. I don't think we need it.

@ferjm ferjm mentioned this pull request Jun 5, 2018
@ferjm
Copy link
Contributor Author

ferjm commented Jun 5, 2018

I ended up storing the destination node separated from the graph. I think it'll be slightly simpler this way. Once we add graph support, we can simply store the indexes that are connected to the destination node input.

@ferjm ferjm merged commit bc844d9 into servo:master Jun 7, 2018
@ferjm ferjm deleted the destinationnode.sink branch June 7, 2018 08:41
}
}

impl AudioNodeEngine for DestinationNode {
fn process(&mut self, inputs: Chunk, _: &BlockInfo) -> Chunk {
inputs
fn process(&mut self, inputs: Chunk, _: &BlockInfo) -> Option<Chunk> {
Copy link
Member

@Manishearth Manishearth Jun 7, 2018

Choose a reason for hiding this comment

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

I don't think we need to return Option here, Chunk::default is empty. Chunk contains the number of blocks equal to the number of output ports, here zero.

Also, can we switch back to the old sink model? My graph PR needs it to work since there's some extra work that may need to be done in between.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. Since the PR was approved and you didn't comment any further, I assumed you were ok with merging this. I'll revert it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ferjm added a commit to ferjm/media that referenced this pull request Jun 7, 2018
@Manishearth
Copy link
Member

Manishearth commented Jun 7, 2018 via email

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.

2 participants