aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/source/samplebuffer.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2023-10-10 09:48:31 -0400
committerClyne Sullivan <clyne@bitgloo.com>2023-10-10 09:48:31 -0400
commitd7cd899653531ac5a8def9e9697b0d65b438b773 (patch)
tree0ae570693a9f549b940f7672bbdf69b710d48ee2 /firmware/source/samplebuffer.cpp
parentf3c28dd2f1a27ee8039a86942ccd2277fbb4102e (diff)
small fixes; add compile checksHEADmain
Diffstat (limited to 'firmware/source/samplebuffer.cpp')
-rw-r--r--firmware/source/samplebuffer.cpp12
1 files changed, 6 insertions, 6 deletions
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<const int *>(data);
- const int * const srcend = src + (size / 2);
+ const int * const srcend = src + (dsize / 2);
int *dst = reinterpret_cast<int *>(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<const int *>(data);
- const int * const srcend = src + (size / 2);
+ const int * const srcend = src + (dsize / 2);
int *dst = reinterpret_cast<int *>(middata());
do {
int a = src[0];