[sendspin] Updates sendspin-cpp to v0.5.0 (#16380)

This commit is contained in:
Kevin Ahrendt
2026-05-12 16:42:44 -04:00
committed by GitHub
parent 66e4a1dfa8
commit b512cc42a8
4 changed files with 6 additions and 14 deletions
+5 -2
View File
@@ -206,12 +206,15 @@ async def to_code(config: ConfigType) -> None:
)
# sendspin-cpp library
esp32.add_idf_component(name="sendspin/sendspin-cpp", ref="0.4.0")
esp32.add_idf_component(name="sendspin/sendspin-cpp", ref="0.5.0")
cg.add_define("USE_SENDSPIN", True) # for MDNS
data = _get_data()
# The color role is not yet wired up in ESPHome; disable it in the library for now.
esp32.add_idf_sdkconfig_option("CONFIG_SENDSPIN_ENABLE_COLOR", False)
# Configure Sendspin roles based on requested features (ESPHome internally via USE_SENDSPIN_*)
# and disable building unused code paths in the sendspin-cpp library (IDF SDKConfig via CONFIG_SENDSPIN_ENABLE_*).
if data.artwork_support:
@@ -264,7 +267,7 @@ async def to_code(config: ConfigType) -> None:
# Library defaults: priority 18 (one above httpd_priority 17 so the decoder is not
# starved by the HTTP server during the initial encoded-audio burst at stream start),
# interpolation/decode buffer locations PREFER_EXTERNAL.
# decode buffer location PREFER_EXTERNAL.
player_struct_fields = [
("audio_formats", audio_format_structs),
("audio_buffer_capacity", player_cfg[CONF_BUFFER_SIZE]),
@@ -188,14 +188,6 @@ void SendspinMediaSource::on_stream_end() {
}
}
// THREAD CONTEXT: Main loop (PlayerRoleListener lifecycle callback)
void SendspinMediaSource::on_stream_clear() {
if (this->get_state() != media_source::MediaSourceState::IDLE) {
// Only set to IDLE if we were previously in a non-IDLE state, to avoid duplicate state changes
this->set_state_(media_source::MediaSourceState::IDLE);
}
}
// THREAD CONTEXT: Main loop (PlayerRoleListener callback)
void SendspinMediaSource::on_volume_changed(uint8_t volume) { this->request_volume_(volume / 100.0f); }
@@ -49,9 +49,6 @@ class SendspinMediaSource : public SendspinChild,
/// @brief Called when the audio stream ends (main loop thread).
void on_stream_end() override;
/// @brief Called when the audio stream is cleared (main loop thread).
void on_stream_clear() override;
/// @brief Called when volume changes (main loop thread).
void on_volume_changed(uint8_t volume) override;
+1 -1
View File
@@ -100,6 +100,6 @@ dependencies:
esp32async/asynctcp:
version: 3.4.91
sendspin/sendspin-cpp:
version: 0.4.0
version: 0.5.0
lvgl/lvgl:
version: 9.5.0