1 Star 0 Fork 0

tectim/engine-sim

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
derivative_filter.cpp 317 Bytes
一键复制 编辑 原始数据 按行查看 历史
Ange Yaghi 提交于 2022-08-15 10:45 +08:00 . Audio synthesizer optimizations
#include "../include/derivative_filter.h"
DerivativeFilter::DerivativeFilter() {
m_previous = 0;
m_dt = 0;
}
DerivativeFilter::~DerivativeFilter() {
/* void */
}
float DerivativeFilter::f(float sample) {
const float temp = m_previous;
m_previous = sample;
return (sample - temp) / m_dt;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tectim/engine-sim.git
git@gitee.com:tectim/engine-sim.git
tectim
engine-sim
engine-sim
master

搜索帮助