Skip to content

Simplify advance method on SpanTracker#874

Open
Keinsleif wants to merge 4 commits intoRustAudio:masterfrom
Keinsleif:feature/change_span_tracker_api
Open

Simplify advance method on SpanTracker#874
Keinsleif wants to merge 4 commits intoRustAudio:masterfrom
Keinsleif:feature/change_span_tracker_api

Conversation

@Keinsleif
Copy link
Copy Markdown
Contributor

Similar code appear on some sources.

let current_sample_rate = self.input.sample_rate();
let current_channels = self.input.channels();
let input_span_len = self.input.current_span_len();

I think this is not clean.

I used code similar to the seek method to fix this.
Now, advance method receive reference for Source.

Also, channel count and sample rate are not used on loops that are not boundaries.
In this PR, SpanTracker retrieves them from input source only on boundaries.

@Keinsleif
Copy link
Copy Markdown
Contributor Author

I'm not very familiar with how SpanTracker works, but is this working correctly?

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.

1 participant