From 1f038540a59ff96aed3cda901449a298b6f1c11c Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Wed, 19 Jul 2023 23:16:59 +1000 Subject: Port in the voice settings menu --- source/client/StarClientApplication.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/client/StarClientApplication.cpp') 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(m_root->toStoragePath("player"), appController()->statisticsService()); m_universeClient = make_shared(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(m_playerStorage, m_mainMixer->mixer()); -- cgit v1.2.3