Expose hardware latency

Open
#1,436 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Read the stream API and the StreamInstant/StreamTimestamp definitions mentioned in the issue, then inspect how backend hosts expose hardware information. Compare the JACK and WASAPI loopback/process-capture scenarios, since latency may be unavailable or inapplicable for those streams. The change is done when hardware latency is exposed at the stream level, with appropriate handling for sample-rate dependence and unsupported streams.

Written by the indexing model from the issue text.

Description

API design

Low level hosts can retrieve this information from the hardware driver, but I suspect that some higher level hosts may not have access to this information. Further more, this property may be inapplicable in certain scenarios. E.g. a JACK graph may not involve any audio hardware, and a WASAPI loopback or process capture stream definitely doesn't.

Since hardware latency depends on sample rate, this should be exposed at the stream level, not device level.

Note that this has nothing to do with the delta between the two StreamInstants in StreamTimestamp, as that delta represents everything that happens before/after the hardware.

Dominant language
Rust
Stars
4k
Forks
554
Avg merge
1d 3h
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RustAudio/cpal

All issues in RustAudio/cpal

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.