// Path: src/main/java/org/picofarad/sdr101/blocks/sources/NullSource.java
// public class NullSource implements SignalBlock {
//     public double output() {
//         return 0.0;
//     }
// }


import java.util.ArrayDeque;
import java.util.Deque;
import java.util.List;
import org.picofarad.sdr101.blocks.sources.NullSource;
/* sdr101-java
 * Simple software-defined radio for Java.
 *
 * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/
 * Licensed under the GNU GPL 2.0 or later.
 */

package org.picofarad.sdr101.blocks;



public class FirFilter implements SignalBlock {
    private Double[] coefficients;
    private Deque<Double> buffer;
    private SignalBlock input;

    public FirFilter(List<Double> f) {
        buffer = new ArrayDeque<Double>();
        coefficients = f.toArray(new Double[0]);
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/NullSource.java
// public class NullSource implements SignalBlock {
//     public double output() {
//         return 0.0;
//     }
// }


// Path: src/main/java/org/picofarad/sdr101/blocks/FirFilter.java
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.List;
import org.picofarad.sdr101.blocks.sources.NullSource;

/* sdr101-java
 * Simple software-defined radio for Java.
 *
 * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/
 * Licensed under the GNU GPL 2.0 or later.
 */

package org.picofarad.sdr101.blocks;



public class FirFilter implements SignalBlock {
    private Double[] coefficients;
    private Deque<Double> buffer;
    private SignalBlock input;

    public FirFilter(List<Double> f) {
        buffer = new ArrayDeque<Double>();
        coefficients = f.toArray(new Double[0]);
        setInput(new NullSource());