Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/client/StarClientApplication.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-07-19 23:16:59 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-07-19 23:16:59 +1000
commit1f038540a59ff96aed3cda901449a298b6f1c11c (patch)
treee0768bc861938423c74d6e2abb9ef74357574238 /source/client/StarClientApplication.cpp
parentd682b164aa87435183a5ad3196b25b5ff8a5ad18 (diff)
Port in the voice settings menu
Diffstat (limited to 'source/client/StarClientApplication.cpp')
-rw-r--r--source/client/StarClientApplication.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp
index d8d79fd..b264f15 100644
--- a/source/client/StarClientApplication.cpp
+++ b/source/client/StarClientApplication.cpp
@@ -376,6 +376,13 @@ void ClientApplication::update() {
else if (m_state > MainAppState::Title)
updateRunning();
+ // swallow leftover encoded data incase we aren't in-game yet to allow mic read to continue.
+ // TODO: directly disable encoding at menu so we don't have to do this
+ {
+ DataStreamBuffer ext;
+ m_voice->send(ext);
+ }
+
m_guiContext->cleanup();
m_edgeKeyEvents.clear();
m_input->reset();
@@ -499,7 +506,7 @@ void ClientApplication::changeState(MainAppState newState) {
m_statistics = make_shared<Statistics>(m_root->toStoragePath("player"), appController()->statisticsService());
m_universeClient = make_shared<UniverseClient>(m_playerStorage, m_statistics);
m_universeClient->setLuaCallbacks("input", LuaBindings::makeInputCallbacks());
- m_universeClient->setLuaCallbacks("voice", LuaBindings::makeVoiceCallbacks(m_voice.get()));
+ m_universeClient->setLuaCallbacks("voice", LuaBindings::makeVoiceCallbacks());
m_mainMixer->setUniverseClient(m_universeClient);
m_titleScreen = make_shared<TitleScreen>(m_playerStorage, m_mainMixer->mixer());