Skip to content

proposal: allow setting thread priority for stream threads #939

@Sorseg

Description

@Sorseg

When my CPU is under high load, the sound thread does not get enough compute time, which leads to buffer underruns and clicking.
Setting high priority on sound producing threads allows producing uninterrupted sound even with a high load, but this is not straightforward with the current API.

Do we want this to be configurable?

Maybe. There might be some environments where there should be limited number of realtime threads and stuttering sound is less of a priority.

If we do want to configure the priority, what is the API?

I see two paths:

  1. add an argument to the build_input_stream
  2. add another method build_input_stream_with_priority

Thank you for maintaining this library!

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