-
Notifications
You must be signed in to change notification settings - Fork 365
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
Invalid period size specification for ALSA? #913
Comments
abique
added a commit
to abique/cpal
that referenced
this issue
Sep 21, 2024
With ALSA, the buffer size is `nperiod * period_size`. We want 2 periods. The default was far too large, 1024 samples is a much more reasonable default (still too large for real-time audio). Fixes RustAudio#913
This was referenced Sep 21, 2024
abique
added a commit
to abique/cpal
that referenced
this issue
Sep 21, 2024
With ALSA, the buffer size is `nperiod * period_size`. We want 2 periods. The default was far too large, 1024 samples is a much more reasonable default (still too large for real-time audio). Fixes RustAudio#913
abique
added a commit
to abique/cpal
that referenced
this issue
Sep 21, 2024
With ALSA, the buffer size is `nperiod * period_size`. We want 2 periods. The default was far too large, 1024 samples is a much more reasonable default (still too large for real-time audio). Fixes RustAudio#913
abique
added a commit
to abique/cpal
that referenced
this issue
Sep 22, 2024
With ALSA, the buffer size is `nperiod * period_size`. We want 2 periods. The default was far too large, 1024 samples is a much more reasonable default (still too large for real-time audio). Fixes RustAudio#913
abique
added a commit
to abique/cpal
that referenced
this issue
Sep 22, 2024
With ALSA, the buffer size is `nperiod * period_size`. We want 2 periods. The default was far too large, 1024 samples is a much more reasonable default (still too large for real-time audio). Fixes RustAudio#913
abique
added a commit
to abique/cpal
that referenced
this issue
Sep 22, 2024
With ALSA, the buffer size is `nperiod * period_size`. We want 2 periods. The default was far too large, 1024 samples is a much more reasonable default (still too large for real-time audio). Fixes RustAudio#913
abique
added a commit
to abique/cpal
that referenced
this issue
Sep 22, 2024
With ALSA, the buffer size is `nperiod * period_size`. We want 2 periods. The default was far too large, 1024 samples is a much more reasonable default (still too large for real-time audio). Fixes RustAudio#913
abique
added a commit
to abique/cpal
that referenced
this issue
Sep 24, 2024
With ALSA, the buffer size is `nperiod * period_size`. We want 2 periods. The default was far too large, 1024 samples is a much more reasonable default (still too large for real-time audio). Fixes RustAudio#913
abique
added a commit
to abique/cpal
that referenced
this issue
Sep 24, 2024
With ALSA, the buffer size is `nperiod * period_size`. We want 2 periods ideally. The default is now set to 1024 samples which is a reasonable default, yet still too large for real-time audio. The default value now uses the same code path as custom values. Fixes RustAudio#913
abique
added a commit
to abique/cpal
that referenced
this issue
Sep 25, 2024
With ALSA, the buffer size is `nperiod * period_size`. We want 2 periods ideally. The default is now set to 1024 samples which is a reasonable default, yet still too large for real-time audio. The default value now uses the same code path as custom values. Fixes RustAudio#913
abique
added a commit
to abique/cpal
that referenced
this issue
Nov 19, 2024
With ALSA, the buffer size is `nperiod * period_size`. We want 2 periods. The default was far too large, 1024 samples is a much more reasonable default (still too large for real-time audio). Fixes RustAudio#913
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cpal/src/host/alsa/mod.rs
Line 1066 in 6ecfec4
Hi,
The code above seems wrong to me.
As I understand it, a cpal buffer size correspond to an alsa period size.
So the alsa buffer size should be:
nperiods * cpal_buffer_size
.While it is currently
cpal_buffer_size / 4
and I suppose thatnperiods == 4
.I think that better defaults for cpal would be a
nperiods == 2
.Cheers,
Alex
The text was updated successfully, but these errors were encountered: