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

Delay reinitialization when the stream is paused while the change happens #234

Merged
merged 5 commits into from
Aug 9, 2024

Conversation

padenot
Copy link
Collaborator

@padenot padenot commented Aug 8, 2024

@padenot padenot requested a review from Pehrsons August 8, 2024 15:35
@padenot padenot force-pushed the reinit-while-aused branch 2 times, most recently from 6c22759 to 7deb2a2 Compare August 9, 2024 08:20
Copy link
Contributor

@Pehrsons Pehrsons left a comment

Choose a reason for hiding this comment

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

You removed the error early-exit guard on the result from the run_sync block in start. That needs to be fixed.
I think the test should also check that the audio unit has started, once start with the delayed reinit returns success. Either by checking an internal state, or that the state callback fired a started event.
Consider the rest nits.

src/backend/mod.rs Outdated Show resolved Hide resolved
src/backend/mod.rs Outdated Show resolved Hide resolved
src/backend/mod.rs Show resolved Hide resolved
src/backend/mod.rs Outdated Show resolved Hide resolved
src/backend/tests/device_change.rs Outdated Show resolved Hide resolved
src/backend/tests/device_change.rs Outdated Show resolved Hide resolved
@padenot padenot force-pushed the reinit-while-aused branch from 7deb2a2 to 88b1802 Compare August 9, 2024 09:17
Copy link
Contributor

@Pehrsons Pehrsons left a comment

Choose a reason for hiding this comment

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

Thanks. I see a latent issue if start fails. It might get exacerbated by adding reinit to a path in start.

src/backend/mod.rs Outdated Show resolved Hide resolved
src/backend/tests/device_change.rs Outdated Show resolved Hide resolved
padenot added 2 commits August 9, 2024 13:47
…einitialize the stream next time it is started
…re the ones we expect before and after switching
@padenot padenot force-pushed the reinit-while-aused branch from 88b1802 to f04a50e Compare August 9, 2024 11:48
src/backend/mod.rs Outdated Show resolved Hide resolved
@padenot padenot force-pushed the reinit-while-aused branch from f04a50e to e8f19e4 Compare August 9, 2024 13:59
@padenot padenot merged commit 0f642c8 into trailblazer Aug 9, 2024
8 checks passed
@padenot padenot deleted the reinit-while-aused branch August 9, 2024 14:39
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