22 #ifndef EDSP_MAKE_OSCILLATOR_HPP 23 #define EDSP_MAKE_OSCILLATOR_HPP 30 namespace edsp {
namespace oscillators {
33 template <OscillatorType Type,
typename T>
34 struct _build_Generator;
37 struct _build_Generator<OscillatorType::
Sinusoidal, T> {
38 template <
typename... Args>
45 struct _build_Generator<OscillatorType::
Square, T> {
46 template <
typename... Args>
53 struct _build_Generator<OscillatorType::
Triangular, T> {
54 template <
typename... Args>
61 struct _build_Generator<OscillatorType::
Sawtooth, T> {
62 template <
typename... Args>
80 -> decltype(internal::_build_Generator<Type, T>{}.template
build(std::declval<Args&&>()...)) {
81 return internal::_build_Generator<Type, T>{}.build(arg...);
86 #endif //EDSP_MAKE_OSCILLATOR_HPP
The class sawtooth_oscillator generates a sawtooth signal.
Definition: sawtooth.hpp:41
The class triangular_oscillator generates a triangular signal.
Definition: triangular.hpp:41
template build(std::declval< Args &&>()...))
Definition: oscillator.hpp:80
The class square_oscillator generates a square signal.
Definition: square.hpp:49
constexpr auto make_oscillator(Args... arg) noexcept -> decltype(internal::_build_Generator< Type, T >
Creates an oscillator using args as the parameter list for the construction.
Definition: oscillator.hpp:79
The class sin_oscillator generates a sinusoidal signal.
Definition: sinusoidal.hpp:167
Definition: amplifier.hpp:29
OscillatorType
the OscillatorType enum represents the different waveforms generated by tha available oscillators...
Definition: sinusoidal.hpp:35