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); }