Remove duplicate information from duplex callbacks
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- audio-video-rtc
Research direction
Start by locating DuplexCallbackInfo, CallbackInfo, and StreamTimestamp::callback, then trace the duplex callback data flow and their dependencies on #1437. Confirm that the refactor leaves one callback timestamp, one xrun, and one shared data length, potentially using a separate duplex data struct with distinct input and output pointers. No specific files or tests are named in the issue.
Written by the indexing model from the issue text.
Description
DuplexCallbackInfois composed of 2CallbackInfos, which means it contains 2 distinctStreamTimestamp::callbackvalues. But duplex streams use a single shared data callback, so there is only 1 callback timestamp to record. This doesn't apply to the device timestamp, as the output one is merely a prediction based on latency (which I think should be exposed separately, but that's another topic).- Having 2 distinct
xrunvalues is pointless, as a disjoint xrun would be, well, disjoint, but the whole point of duplex streams is making this impossible. - Duplex callbacks take 2 distinct
Dataparameters, each with its ownlen. These being distinct from one another would again defeat the essence of a duplex stream, so there should only be 1len.
If we follow through with #1437, then we could simply remove As for the 3rd point, I suggest adding a struct like this:DuplexCallbackInfo and use the regular CallbackInfo in its place.
struct DuplexData {
input: *const (),
output: *mut (),
len: usize,
input_format: SampleFormat,
output_format: SampleFormat,
}
- Dominant language
- Rust
- Stars
- 4k
- Forks
- 554
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 1
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RustAudio/cpal
-
API design
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
correctness
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
aaudio: dynamic buffer tuning never grows the buffer (set_buffer_size_in_frames reports Err on success)Possibly taken @dannyward630 claimed this 39 days ago. Openhost - aaudio platform - android
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
-
WebAudio wasm build fails with wasm-bindgen panic=unwind closuresPossibly taken @bogusyogi claimed this 48 days ago. Openhost - webaudio platform - web
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
PipeWire: dropping callback captures on the realtime worker can terminate the process with SIGXCPUOpenhost - pipewire platform - linux
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
ci: migrate pinned macos-15 runners to macos-26 and macos-26-intelPossibly taken @hawkingrei claimed this today. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
nowledge-co/hawdb#2224 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipse-score/coverage_tool#95 ·
Maintainers usually reply within 2 days
-
bug nvim
Difficulty 2/5 1-3 hours Newbie friendliness 74/100