26static const size_t SAMPLE_BUFFER_SIZE = 2048;
44 void play(std::string rtttl);
59 ret = (ret * 10) + (this->
rtttl_[this->position_++] -
'0');
100 void play(Ts...
x)
override { this->
rtttl_->
play(this->value_.value(
x...)); }
virtual void play(Ts... x)=0
Base class for all automation conditions.
Helper class to easily give an object a parent of type T.
Base class for all output components that can output a variable level, like PWM.
FinishedPlaybackTrigger(Rtttl *parent)
bool check(Ts... x) override
TEMPLATABLE_VALUE(std::string, value) void play(Ts... x) override
output::FloatOutput * output_
void dump_config() override
void set_state_(State state)
void add_on_finished_playback_callback(std::function< void()> callback)
uint16_t default_duration_
void set_gain(float gain)
void set_speaker(speaker::Speaker *speaker)
speaker::Speaker * speaker_
void set_output(output::FloatOutput *output)
CallbackManager< void()> on_finished_playback_callback_
void play(std::string rtttl)
void play(Ts... x) override
Providing packet encoding functions for exchanging data with a remote host.
constexpr const T & clamp(const T &v, const T &lo, const T &hi, Compare comp)