package net.heartshield.sensors;

import net.heartshield.data.Measurement;

import java.util.ArrayList;
import java.util.List;

/**
 * @author David Madl (git@abanbytes.eu)
 * @date 2017-04-12
 */
public class DummyAudioSensor implements IAudioSensor {
    public DummyAudioSensor() {}

    @Override
    public byte[] getPCM() {
        return new byte[0];
    }

    @Override
    public long getStartTimeNanos() {
        return 0;
    }

    @Override
    public double getFps() {
        return 0;
    }

    @Override
    public void start() {
        // TODO: this should start a thread and behave just the same as AudioSensor
    }

    @Override
    public void stop() {

    }

    @Override
    public List<double[]> getSamples() {
        List<double[]> l = new ArrayList<>();
        l.add(new double[0]);
        l.add(new double[0]);
        return l;
    }

    @Override
    public int length() {
        return 0;
    }

    @Override
    public void setListener(Listener listener) {

    }

    @Override
    public Exception getError() {
        return null;
    }

    @Override
    public AudioStartTimeAccuracy getExpectedStartTimeAccuracy() {
        return AudioStartTimeAccuracy.LOW;
    }
}
