Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean render buffers before writing #79

Merged
merged 1 commit into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/src/buffered_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ impl BufferedRenderer {

/// Reads samples from the remainder and the output queue into the destination array.
pub fn read(&mut self, dest: &mut [f32]) {
dest.fill(0.0);

let mut i: usize = 0;
let len = dest.len().min(self.remainder.len());
let samples = self
Expand Down
1 change: 1 addition & 0 deletions core/src/channel_group/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ impl ChannelGroup {
let channels = &mut self.channels;
let sample_cache_vecs = &mut self.sample_cache_vecs;

buffer.fill(0.0);
thread_pool.install(move || {
channels
.par_iter_mut()
Expand Down
Loading