2024-01-29 10:59:55 +00:00
|
|
|
#ifndef muz_SIGNAL_HPP
|
|
|
|
#define muz_SIGNAL_HPP
|
|
|
|
|
2024-01-30 18:09:57 +00:00
|
|
|
#include "commons.hpp"
|
|
|
|
|
2024-01-29 10:59:55 +00:00
|
|
|
namespace muz
|
|
|
|
{
|
2024-01-30 18:09:57 +00:00
|
|
|
MUZ_ERROR(signal_error);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Audio signal interface.
|
|
|
|
* @see Sine
|
|
|
|
* @see Constant
|
|
|
|
**/
|
2024-01-29 10:59:55 +00:00
|
|
|
class Signal
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit Signal();
|
|
|
|
virtual ~Signal();
|
|
|
|
|
2024-01-30 18:09:57 +00:00
|
|
|
/**
|
|
|
|
* Get the next sample.
|
|
|
|
* @return std::vector<float> of size N for a sample of N channels or an empty vector at end.
|
|
|
|
*
|
|
|
|
**/
|
|
|
|
virtual std::vector<float> next() = 0;
|
2024-01-29 10:59:55 +00:00
|
|
|
private:
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|