From d7cd899653531ac5a8def9e9697b0d65b438b773 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Tue, 10 Oct 2023 09:48:31 -0400 Subject: small fixes; add compile checks --- firmware/source/samplebuffer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'firmware/source/samplebuffer.cpp') diff --git a/firmware/source/samplebuffer.cpp b/firmware/source/samplebuffer.cpp index 74c6778..f04173a 100644 --- a/firmware/source/samplebuffer.cpp +++ b/firmware/source/samplebuffer.cpp @@ -19,12 +19,12 @@ void SampleBuffer::clear() { } __attribute__((section(".convcode"))) void SampleBuffer::modify(Sample *data, unsigned int srcsize) { - auto size = srcsize < m_size ? srcsize : m_size; - size = (size + 15) & (~15); + auto dsize = srcsize < m_size ? srcsize : m_size; + dsize = (dsize + 15) & (~15); m_modified = m_buffer; const int *src = reinterpret_cast(data); - const int * const srcend = src + (size / 2); + const int * const srcend = src + (dsize / 2); int *dst = reinterpret_cast(m_buffer); do { int a = src[0]; @@ -49,12 +49,12 @@ void SampleBuffer::modify(Sample *data, unsigned int srcsize) { } __attribute__((section(".convcode"))) void SampleBuffer::midmodify(Sample *data, unsigned int srcsize) { - auto size = srcsize < m_size / 2 ? srcsize : m_size / 2; - size = (size + 15) & (~15); + auto dsize = srcsize < m_size / 2 ? srcsize : m_size / 2; + dsize = (dsize + 15) & (~15); m_modified = middata(); const int *src = reinterpret_cast(data); - const int * const srcend = src + (size / 2); + const int * const srcend = src + (dsize / 2); int *dst = reinterpret_cast(middata()); do { int a = src[0]; -- cgit v1.2.3