浏览代码

bugfix

dds
Frank 3 年前
父节点
当前提交
2096210d3c
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. +8
    -8
      output_pt8211.cpp

+ 8
- 8
output_pt8211.cpp 查看文件

@@ -648,19 +648,19 @@ void interleave(const int16_t *dest,const audio_block_t *block_left, const audio
uint32_t *end = p + NUM_SAMPLES;

if (block_left != nullptr && block_right != nullptr) {
int16_t *l = (int16_t*)&block_left->data[offset];
int16_t *r = (int16_t*)&block_right->data[offset];
uint16_t *l = (uint16_t*)&block_left->data[offset];
uint16_t *r = (uint16_t*)&block_right->data[offset];
do {
*p++ = (uint32_t)(*l++) << 16 | (uint32_t)(*r++);
*p++ = (uint32_t)(*l++) << 16 | (uint32_t)(*r++);
*p++ = (uint32_t)(*l++) << 16 | (uint32_t)(*r++);
*p++ = (uint32_t)(*l++) << 16 | (uint32_t)(*r++);
*p++ = (((uint32_t)(*l++)) << 16) | (uint32_t)(*r++);
*p++ = (((uint32_t)(*l++)) << 16) | (uint32_t)(*r++);
*p++ = (((uint32_t)(*l++)) << 16) | (uint32_t)(*r++);
*p++ = (((uint32_t)(*l++)) << 16) | (uint32_t)(*r++);
} while (p < end);
return;
}

if (block_left != nullptr) {
int16_t *l = (int16_t*)&block_left->data[offset];
uint16_t *l = (uint16_t*)&block_left->data[offset];
do {
*p++ = (uint32_t)(*l++) << 16;
*p++ = (uint32_t)(*l++) << 16;
@@ -671,7 +671,7 @@ void interleave(const int16_t *dest,const audio_block_t *block_left, const audio
}

if (block_right != nullptr) {
int16_t *r = (int16_t*)&block_right->data[offset];
uint16_t *r = (uint16_t*)&block_right->data[offset];
do {
*p++ =(uint32_t)(*r++);
*p++ =(uint32_t)(*r++);

正在加载...
取消
保存