summaryrefslogtreecommitdiff
path: root/src/tangara/tts/player.cpp
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2025-02-20 17:26:06 +1100
committerailurux <ailuruxx@gmail.com>2025-02-20 17:26:06 +1100
commitb97c7974ea0bd9d4b0add639c699a07750a76a27 (patch)
treef4a953161bfea40c3b9691df389048248cb817a8 /src/tangara/tts/player.cpp
parentca74ace48c2df00e7d50c1e95da3542f60a81796 (diff)
parente7fa9bfbd1c0037c874cd156cc3146e2163438ef (diff)
downloadtangara-fw-b97c7974ea0bd9d4b0add639c699a07750a76a27.tar.gz
Merge branch 'main' of codeberg.org:cool-tech-zone/tangara-fw
Diffstat (limited to 'src/tangara/tts/player.cpp')
-rw-r--r--src/tangara/tts/player.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tangara/tts/player.cpp b/src/tangara/tts/player.cpp
index 9cc7a1f7..1b1e0bcf 100644
--- a/src/tangara/tts/player.cpp
+++ b/src/tangara/tts/player.cpp
@@ -44,7 +44,11 @@ auto Player::playFile(const std::string& text, const std::string& file)
stream_playing_ = true;
}
- openAndDecode(text, file);
+ // Only attempt playback if the card contains samples.
+ // We gate this on directory existence to avoid spamming the logs.
+ if (Provider::SamplesOnSDCard()) {
+ openAndDecode(text, file);
+ }
if (!stream_cancelled_) {
events::Audio().Dispatch(audio::TtsPlaybackChanged{.is_playing = false});