|
|
|
@ -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];
|
|
|
|
|