浏览代码

fix for bug I introduced with my last fix.

I left 'end' in an undefined state before.
dds
robsoles 10 年前
父节点
当前提交
49234c34ab
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      filter_biquad.cpp

+ 2
- 2
filter_biquad.cpp 查看文件

@@ -34,13 +34,12 @@ void AudioFilterBiquad::update(void)
uint32_t in2, out2, aprev, bprev, flag;
uint32_t *data, *end;
int32_t *state;

block = receiveWritable();
data = (uint32_t *)(block->data);
if (!block) return;
end = data + AUDIO_BLOCK_SAMPLES/2;
state = (int32_t *)definition;
do {
data = (uint32_t *)(block->data); // needs to be done inside the loop, end need not be reset.
a0 = *state++;
a1 = *state++;
a2 = *state++;
@@ -73,6 +72,7 @@ void AudioFilterBiquad::update(void)
*state++ = sum | flag;
*(state-2) = bprev;
*(state-3) = aprev;
data = (uint32_t *)(block->data); // needs to be reset, may as well be done here
} while (flag);
transmit(block);
release(block);

正在加载...
取消
保存