From 04539a4413defd00134d1132b3af19ffe746ade6 Mon Sep 17 00:00:00 2001 From: pschatzmann Date: Tue, 12 Sep 2023 13:49:10 +0200 Subject: [PATCH] BaseBuffer optimize writeArrayOverwrite --- src/AudioTools/Buffers.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/AudioTools/Buffers.h b/src/AudioTools/Buffers.h index b35f2ea37e..df9b4084af 100644 --- a/src/AudioTools/Buffers.h +++ b/src/AudioTools/Buffers.h @@ -79,8 +79,7 @@ class BaseBuffer { virtual int writeArrayOverwrite(const T data[], int len) { int to_delete = len - availableForWrite(); if (to_delete>0){ - T buffer[to_delete]; - readArray(buffer,to_delete); + clearArray(to_delete); } return writeArray(data, len); }