File sampleratereducer.h¶
File List > DaisySP > Source > Effects > sampleratereducer.h
Go to the documentation of this file
Source Code¶
/*
Copyright (c) 2020 Electrosmith, Corp, Emilie Gillet
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
#pragma once
#ifndef DSY_SR_REDUCER_H
#define DSY_SR_REDUCER_H
#include <stdint.h>
#ifdef __cplusplus
namespace daisysp
{
class SampleRateReducer
{
public:
SampleRateReducer() {}
~SampleRateReducer() {}
void Init();
float Process(float in);
void SetFreq(float frequency);
private:
float frequency_;
float phase_;
float sample_;
float previous_sample_;
float next_sample_;
};
} // namespace daisysp
#endif
#endif