Skip to content

Invalid period size specification for ALSA? #913

Open
@abique

Description

@abique

hw_params.set_period_size_near((v / 4) as alsa::pcm::Frames, alsa::ValueOr::Nearest)?;

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 that nperiods == 4.

I think that better defaults for cpal would be a nperiods == 2.

Cheers,
Alex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions