Skip to content

Commit

Permalink
Clean render buffers before writing (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
MyBlackMIDIScore authored Aug 3, 2024
1 parent a376103 commit 2f805fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
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

0 comments on commit 2f805fa

Please sign in to comment.