|
|
@ -19,8 +19,8 @@ void SampleBuffer::clear() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
__attribute__((section(".convcode")))
|
|
|
|
__attribute__((section(".convcode")))
|
|
|
|
void SampleBuffer::modify(Sample *data, unsigned int srcsize) {
|
|
|
|
void SampleBuffer::modify(Sample *data, unsigned int srcsize) {
|
|
|
|
auto size = std::min(srcsize, m_size);
|
|
|
|
auto size = srcsize < m_size ? srcsize : m_size;
|
|
|
|
size = (size + 15) & 0xFF0;
|
|
|
|
size = (size + 15) & (~15);
|
|
|
|
|
|
|
|
|
|
|
|
m_modified = m_buffer;
|
|
|
|
m_modified = m_buffer;
|
|
|
|
const int *src = reinterpret_cast<const int *>(data);
|
|
|
|
const int *src = reinterpret_cast<const int *>(data);
|
|
|
@ -49,8 +49,8 @@ void SampleBuffer::modify(Sample *data, unsigned int srcsize) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
__attribute__((section(".convcode")))
|
|
|
|
__attribute__((section(".convcode")))
|
|
|
|
void SampleBuffer::midmodify(Sample *data, unsigned int srcsize) {
|
|
|
|
void SampleBuffer::midmodify(Sample *data, unsigned int srcsize) {
|
|
|
|
auto size = std::min(srcsize, m_size / 2);
|
|
|
|
auto size = srcsize < m_size / 2 ? srcsize : m_size / 2;
|
|
|
|
size = (size + 15) & 0xFF0;
|
|
|
|
size = (size + 15) & (~15);
|
|
|
|
|
|
|
|
|
|
|
|
m_modified = middata();
|
|
|
|
m_modified = middata();
|
|
|
|
const int *src = reinterpret_cast<const int *>(data);
|
|
|
|
const int *src = reinterpret_cast<const int *>(data);
|
|
|
|