ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::speaker::PlaybackStartGate Class Reference

Decides when buffered audio starts playing. More...

#include <playback_start.h>

Public Member Functions

bool ready (bool announcement, size_t raw_bytes, size_t initial_bytes, uint32_t now_ms)
 

Protected Attributes

size_t last_raw_bytes_ {SIZE_MAX}
 
uint32_t last_change_ms_ {0}
 

Detailed Description

Decides when buffered audio starts playing.

Everything waits for the full start threshold while data keeps arriving; an announcement whose stream pauses below it (a spoken intro before a long reply) plays what it has. Called only once the decoder has stream info, so data has arrived even when the decoder holds all of it and the raw buffer reads zero.

Definition at line 17 of file playback_start.h.

Member Function Documentation

◆ ready()

bool esphome::speaker::PlaybackStartGate::ready ( bool announcement,
size_t raw_bytes,
size_t initial_bytes,
uint32_t now_ms )
inline

Definition at line 19 of file playback_start.h.

Field Documentation

◆ last_change_ms_

uint32_t esphome::speaker::PlaybackStartGate::last_change_ms_ {0}
protected

Definition at line 33 of file playback_start.h.

◆ last_raw_bytes_

size_t esphome::speaker::PlaybackStartGate::last_raw_bytes_ {SIZE_MAX}
protected

Definition at line 32 of file playback_start.h.


The documentation for this class was generated from the following file: