diff options
| author | ailurux <ailuruxx@gmail.com> | 2025-02-20 17:26:06 +1100 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2025-02-20 17:26:06 +1100 |
| commit | b97c7974ea0bd9d4b0add639c699a07750a76a27 (patch) | |
| tree | f4a953161bfea40c3b9691df389048248cb817a8 /src/tangara/tts/player.cpp | |
| parent | ca74ace48c2df00e7d50c1e95da3542f60a81796 (diff) | |
| parent | e7fa9bfbd1c0037c874cd156cc3146e2163438ef (diff) | |
| download | tangara-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.cpp | 6 |
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}); |
