Fix some warnings
This commit is contained in:
parent
be9640ac9c
commit
9efcafcb6d
6 changed files with 13 additions and 8 deletions
|
@ -829,9 +829,16 @@ macro_rules! fc {
|
|||
($F: ident, $e: expr) => { F::from_f64($e).unwrap() }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[inline]
|
||||
fn f<F: Flt>(x: f64) -> F { F::from_f64(x).unwrap() }
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[inline]
|
||||
fn fclamp<F: Flt>(x: F, mi: F, mx: F) -> F { x.max(mi).min(mx) }
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[inline]
|
||||
fn fclampc<F: Flt>(x: F, mi: f64, mx: f64) -> F { x.max(f(mi)).min(f(mx)) }
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
|
|
|
@ -233,7 +233,7 @@ impl DspNode for PVerb {
|
|||
let out_l = &mut out_l[0];
|
||||
let out_r = &mut out_r[0];
|
||||
|
||||
let mut verb = &mut *self.verb;
|
||||
let verb = &mut *self.verb;
|
||||
|
||||
for frame in 0..ctx.nframes() {
|
||||
let (i_l, i_r) = (in_l.read(frame), in_r.read(frame));
|
||||
|
|
|
@ -6,7 +6,6 @@ use crate::nodes::{NodeAudioContext, NodeExecContext};
|
|||
use crate::dsp::helpers::{Rng, Trigger, SlewValue};
|
||||
use crate::dsp::{
|
||||
NodeId, SAtom, ProcBuf, DspNode, LedPhaseVals, NodeContext,
|
||||
GraphAtomData, GraphFun,
|
||||
};
|
||||
|
||||
/// A triggered random walker
|
||||
|
@ -106,7 +105,7 @@ impl DspNode for RndWk {
|
|||
_atoms: &[SAtom], inputs: &[ProcBuf],
|
||||
outputs: &mut [ProcBuf], ctx_vals: LedPhaseVals)
|
||||
{
|
||||
use crate::dsp::{out, inp, denorm, denorm_offs, at};
|
||||
use crate::dsp::{out, inp, denorm};
|
||||
|
||||
let trig = inp::RndWk::trig(inputs);
|
||||
let step = inp::RndWk::step(inputs);
|
||||
|
|
|
@ -70,7 +70,7 @@ impl DspNode for TsLFO {
|
|||
fn process<T: NodeAudioContext>(
|
||||
&mut self, ctx: &mut T, _ectx: &mut NodeExecContext,
|
||||
_nctx: &NodeContext,
|
||||
atoms: &[SAtom], inputs: &[ProcBuf],
|
||||
_atoms: &[SAtom], inputs: &[ProcBuf],
|
||||
outputs: &mut [ProcBuf], ctx_vals: LedPhaseVals)
|
||||
{
|
||||
use crate::dsp::{out, inp, denorm};
|
||||
|
@ -80,7 +80,7 @@ impl DspNode for TsLFO {
|
|||
let rev = inp::TsLFO::rev(inputs);
|
||||
let out = out::TsLFO::sig(outputs);
|
||||
|
||||
let mut lfo = &mut *self.lfo;
|
||||
let lfo = &mut *self.lfo;
|
||||
|
||||
for frame in 0..ctx.nframes() {
|
||||
if self.trig.check_trigger(denorm::TsLFO::trig(trig, frame)) {
|
||||
|
@ -103,7 +103,7 @@ impl DspNode for TsLFO {
|
|||
let mut lfo = TriSawLFO::new();
|
||||
lfo.set_sample_rate(160.0);
|
||||
|
||||
Some(Box::new(move |gd: &dyn GraphAtomData, init: bool, _x: f32, xn: f32| -> f32 {
|
||||
Some(Box::new(move |gd: &dyn GraphAtomData, init: bool, _x: f32, _xn: f32| -> f32 {
|
||||
if init {
|
||||
lfo.reset();
|
||||
let time_idx = NodeId::TsLFO(0).inp_param("time").unwrap().inp();
|
||||
|
|
|
@ -131,7 +131,7 @@ impl DspNode for VOsc {
|
|||
let dist = dist.i() as u8;
|
||||
let oversample = ovrsmpl.i() == 1;
|
||||
|
||||
let mut osc = &mut self.osc;
|
||||
let osc = &mut self.osc;
|
||||
|
||||
if oversample {
|
||||
for frame in 0..ctx.nframes() {
|
||||
|
|
|
@ -44,7 +44,6 @@ fn setup_pverb(matrix: &mut Matrix) {
|
|||
fn check_node_pverb_dcy_1() {
|
||||
init_test!(matrix, node_exec, 3);
|
||||
|
||||
let ad_1 = NodeId::Ad(0);
|
||||
let pverb_1 = NodeId::PVerb(0);
|
||||
|
||||
setup_pverb(matrix);
|
||||
|
|
Loading…
Reference in a new issue