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

Playback stuttering #590

Open
vyfor opened this issue Jul 4, 2024 · 4 comments
Open

Playback stuttering #590

vyfor opened this issue Jul 4, 2024 · 4 comments

Comments

@vyfor
Copy link

vyfor commented Jul 4, 2024

Hello,
I'm facing noticeable audio stutters whenever I switch between applications (e.g. by Alt+Tabbing). When the same issue occurred in cpal, I simply set the buffer size to be a Fixed(4096) and that fixed the problem. However, I'm not quite sure if I can do the same in rodio. Here's how I tried to do it:

let default_config = device.default_output_config()?;
let config = SupportedStreamConfig::new(
    default_config.channels(),
    default_config.sample_rate(),
    SupportedBufferSize::Range {
        min: BUFFER_SIZE,
        max: BUFFER_SIZE,
    },
    default_config.sample_format(),
);
let (_, _) = OutputStream::try_from_device_config(&device, config)?;

But no matter how low or high I set the BUFFER_SIZE, I still experience the stutters. Running on Windows 10.

@vyfor
Copy link
Author

vyfor commented Jul 4, 2024

#512 seems to fix the issue.

@dvdsk
Copy link
Collaborator

dvdsk commented Jul 4, 2024

#512 seems to fix the issue.

good to know! We might have to change the default then. If we do that now audio latency will increase (cant imagine 4096 is a problem for anyone) but to be sure I wanna wait till after applying #512. And I'am waiting with #512 till I have time to work through some other breaking changes so we can bundle them in one release and add a migration guide to that.

@dvdsk
Copy link
Collaborator

dvdsk commented Jul 6, 2024

Is your system under high cpu load when it stutters?

@vyfor
Copy link
Author

vyfor commented Jul 7, 2024

Is your system under high cpu load when it stutters?

As far as I tested, I haven't experienced such issues.

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

No branches or pull requests

2 participants