From cc5980e215ad9336100da5d59d568802d1052eb7 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 1 Apr 2023 15:21:12 +0200 Subject: [PATCH] Zero out auxiliary output buffers We used to do this, but this got lost in the migration to the new buffer management system. --- CHANGELOG.md | 7 +++++++ src/wrapper/util/buffer_management.rs | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dd91abc..4ff65f6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,13 @@ Since there is no stable release yet, the changes are organized per day in reverse chronological order. The main purpose of this document in its current state is to list breaking changes. +## [2023-04-01] + +### Fixed + +- Auxiliary output buffers are now always zeroed out in case the host didn't do + this for us. This was a regression from before 2023-03-31. + ## [2023-03-31] ### Changed diff --git a/src/wrapper/util/buffer_management.rs b/src/wrapper/util/buffer_management.rs index 73a20b31..a7e15691 100644 --- a/src/wrapper/util/buffer_management.rs +++ b/src/wrapper/util/buffer_management.rs @@ -338,6 +338,10 @@ impl BufferManager { *output_channel_pointer, num_samples, ); + + // The host may not zero out the buffers, and assume the plugin always + // write something there + output_slice.fill(0.0); } // If the caller/host should have provided buffer pointers but didn't then