Skip to content

Commit

Permalink
Reduce margin, update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
HEnquist committed Apr 8, 2021
1 parent 7d91934 commit bc14de6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ New features:
- Add `debug` feature for extra logging.
- Improve validation of filters.
- Setting to enable retry on reads from Alsa capture devices.
- Avoid blocking reads on Alsa capture devices (helps avoiding driver bugs for some devices).

Bugfixes:
- Don't block playback for CoreAudio/Wasapi if there is no data in time.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "camilladsp"
version = "0.5.0"
version = "0.5.0-beta5"
authors = ["Henrik Enquist <[email protected]>"]
description = "A flexible tool for processing audio"

Expand Down
4 changes: 2 additions & 2 deletions src/alsadevice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ fn capture_buffer(
frames,
frames_to_read
);
// Let's wait for more frames, with 20% plus 1 ms of margin
// Let's wait for more frames, with 10% plus 1 ms of margin
thread::sleep(Duration::from_millis(
(1 + (1200 * (frames_to_read - frames as usize)) / samplerate) as u64,
(1 + (1100 * (frames_to_read - frames as usize)) / samplerate) as u64,
));
if (pcmdevice.avail().unwrap_or(0) as usize) < frames_to_read {
// Still not enough,
Expand Down

0 comments on commit bc14de6

Please sign in to comment.