diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-07-19 13:59:30 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-07-19 13:59:30 +1000 |
| commit | 9475d10d1000c7e21a7ea311b0c8ee6a72ef46c4 (patch) | |
| tree | 099258a8107f75f14cf5b2f451f1d4008da1dfa4 /src/tangara/audio/audio_fsm.cpp | |
| parent | 370d1853b5d099de28c032def4ce3e53b7d735ad (diff) | |
| download | tangara-fw-9475d10d1000c7e21a7ea311b0c8ee6a72ef46c4.tar.gz | |
WIP initial tts player wiring
Diffstat (limited to 'src/tangara/audio/audio_fsm.cpp')
| -rw-r--r-- | src/tangara/audio/audio_fsm.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tangara/audio/audio_fsm.cpp b/src/tangara/audio/audio_fsm.cpp index ad60ab86..dbf1954c 100644 --- a/src/tangara/audio/audio_fsm.cpp +++ b/src/tangara/audio/audio_fsm.cpp @@ -43,6 +43,7 @@ #include "sample.hpp" #include "system_fsm/service_locator.hpp" #include "system_fsm/system_events.hpp" +#include "tts/player.hpp" namespace audio { @@ -369,6 +370,11 @@ void Uninitialised::react(const system_fsm::BootComplete& ev) { sBtOutput.reset(new BluetoothAudioOutput( sServices->bluetooth(), *sDrainBuffers, sServices->bg_worker())); + auto& tts_provider = sServices->tts(); + auto tts_player = std::make_unique<tts::Player>( + sServices->bg_worker(), sDrainBuffers->second, *sStreamFactory); + tts_provider.player(std::move(tts_player)); + auto& nvs = sServices->nvs(); sI2SOutput->SetMaxVolume(nvs.AmpMaxVolume()); sI2SOutput->SetVolume(nvs.AmpCurrentVolume()); |
