Option for Unprocessed Mic Audio
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
|
||||||
|
#include "application.h"
|
||||||
#include "utils/named_thread.h"
|
#include "utils/named_thread.h"
|
||||||
#include "wivrn_client.h"
|
#include "wivrn_client.h"
|
||||||
#include "xr/instance.h"
|
#include "xr/instance.h"
|
||||||
@@ -157,6 +158,10 @@ void wivrn::android::audio::build_microphone(AAudioStreamBuilder * builder, int3
|
|||||||
AAudioStreamBuilder_setPerformanceMode(builder, AAUDIO_PERFORMANCE_MODE_LOW_LATENCY);
|
AAudioStreamBuilder_setPerformanceMode(builder, AAUDIO_PERFORMANCE_MODE_LOW_LATENCY);
|
||||||
AAudioStreamBuilder_setSharingMode(builder, AAUDIO_SHARING_MODE_EXCLUSIVE);
|
AAudioStreamBuilder_setSharingMode(builder, AAUDIO_SHARING_MODE_EXCLUSIVE);
|
||||||
AAudioStreamBuilder_setFormat(builder, AAUDIO_FORMAT_PCM_I16);
|
AAudioStreamBuilder_setFormat(builder, AAUDIO_FORMAT_PCM_I16);
|
||||||
|
if (application::get_config().mic_unprocessed_audio)
|
||||||
|
{
|
||||||
|
AAudioStreamBuilder_setInputPreset(builder, AAUDIO_INPUT_PRESET_UNPROCESSED);
|
||||||
|
}
|
||||||
|
|
||||||
AAudioStreamBuilder_setDataCallback(builder, µphone_data_cb, this);
|
AAudioStreamBuilder_setDataCallback(builder, µphone_data_cb, this);
|
||||||
AAudioStreamBuilder_setErrorCallback(builder, µphone_error_cb, this);
|
AAudioStreamBuilder_setErrorCallback(builder, µphone_error_cb, this);
|
||||||
|
|||||||
@@ -188,6 +188,9 @@ configuration::configuration(xr::system & system)
|
|||||||
if (auto val = root["passthrough_enabled"]; val.is_bool())
|
if (auto val = root["passthrough_enabled"]; val.is_bool())
|
||||||
passthrough_enabled = val.get_bool();
|
passthrough_enabled = val.get_bool();
|
||||||
|
|
||||||
|
if (auto val = root["mic_unprocessed_audio"]; val.is_bool())
|
||||||
|
mic_unprocessed_audio = val.get_bool();
|
||||||
|
|
||||||
if (auto val = root["virtual_keyboard_layout"]; val.is_string())
|
if (auto val = root["virtual_keyboard_layout"]; val.is_string())
|
||||||
virtual_keyboard_layout = val.get_string().value();
|
virtual_keyboard_layout = val.get_string().value();
|
||||||
|
|
||||||
@@ -252,6 +255,7 @@ void configuration::save()
|
|||||||
json << ",\"preferred_refresh_rate\":" << preferred_refresh_rate;
|
json << ",\"preferred_refresh_rate\":" << preferred_refresh_rate;
|
||||||
json << ",\"resolution_scale\":" << resolution_scale;
|
json << ",\"resolution_scale\":" << resolution_scale;
|
||||||
json << ",\"passthrough_enabled\":" << std::boolalpha << passthrough_enabled;
|
json << ",\"passthrough_enabled\":" << std::boolalpha << passthrough_enabled;
|
||||||
|
json << ",\"mic_unprocessed_audio\":" << std::boolalpha << mic_unprocessed_audio;
|
||||||
for (auto & [key, value]: features)
|
for (auto & [key, value]: features)
|
||||||
json << "," << key << ":" << std::boolalpha << value;
|
json << "," << key << ":" << std::boolalpha << value;
|
||||||
json << ",\"virtual_keyboard_layout\":" << json_string(virtual_keyboard_layout);
|
json << ",\"virtual_keyboard_layout\":" << json_string(virtual_keyboard_layout);
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public:
|
|||||||
float resolution_scale = 1.4;
|
float resolution_scale = 1.4;
|
||||||
bool show_performance_metrics = false;
|
bool show_performance_metrics = false;
|
||||||
bool passthrough_enabled = false;
|
bool passthrough_enabled = false;
|
||||||
|
bool mic_unprocessed_audio = false;
|
||||||
|
|
||||||
std::string virtual_keyboard_layout = "QWERTY";
|
std::string virtual_keyboard_layout = "QWERTY";
|
||||||
|
|
||||||
|
|||||||
@@ -636,6 +636,17 @@ void scenes::lobby::gui_settings()
|
|||||||
}
|
}
|
||||||
vibrate_on_hover();
|
vibrate_on_hover();
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
ImGui::BeginDisabled(not config.check_feature(feature::microphone));
|
||||||
|
if (ImGui::Checkbox(_S("Unprocessed Microphone Audio"), &config.mic_unprocessed_audio))
|
||||||
|
{
|
||||||
|
config.save();
|
||||||
|
}
|
||||||
|
vibrate_on_hover();
|
||||||
|
if (ImGui::IsItemHovered())
|
||||||
|
tooltip(_("Force disable audio filters, such as noise cancellation"));
|
||||||
|
ImGui::EndDisabled();
|
||||||
|
}
|
||||||
{
|
{
|
||||||
ImGui::BeginDisabled(not application::get_hand_tracking_supported());
|
ImGui::BeginDisabled(not application::get_hand_tracking_supported());
|
||||||
bool enabled = config.check_feature(feature::hand_tracking);
|
bool enabled = config.check_feature(feature::hand_tracking);
|
||||||
|
|||||||
+38
-30
@@ -2,7 +2,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WiVRn 0.16\n"
|
"Project-Id-Version: WiVRn 0.16\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2025-02-02 18:36+0900\n"
|
"POT-Creation-Date: 2025-02-13 02:56+0900\n"
|
||||||
"PO-Revision-Date: 2024-06-20 10:33+0900\n"
|
"PO-Revision-Date: 2024-06-20 10:33+0900\n"
|
||||||
"Last-Translator: Mitsuami Megane <hello@mitsua.me>\n"
|
"Last-Translator: Mitsuami Megane <hello@mitsua.me>\n"
|
||||||
"Language: Japanese\n"
|
"Language: Japanese\n"
|
||||||
@@ -154,114 +154,122 @@ msgstr ""
|
|||||||
msgid "Enable microphone"
|
msgid "Enable microphone"
|
||||||
msgstr "マイクを有効する"
|
msgstr "マイクを有効する"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:642
|
#: client/scenes/lobby_gui.cpp:641
|
||||||
|
msgid "Unprocessed Microphone Audio"
|
||||||
|
msgstr "未処理のマイク音声"
|
||||||
|
|
||||||
|
#: client/scenes/lobby_gui.cpp:648
|
||||||
|
msgid "Force disable audio filters, such as noise cancellation"
|
||||||
|
msgstr "ノイズ除去などのフィルターを無効化する"
|
||||||
|
|
||||||
|
#: client/scenes/lobby_gui.cpp:653
|
||||||
msgid "Enable hand tracking"
|
msgid "Enable hand tracking"
|
||||||
msgstr "ハンドトラッキングを有効する"
|
msgstr "ハンドトラッキングを有効する"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:649 client/scenes/lobby_gui.cpp:662
|
#: client/scenes/lobby_gui.cpp:660 client/scenes/lobby_gui.cpp:673
|
||||||
#: client/scenes/lobby_gui.cpp:675 client/scenes/lobby_gui.cpp:687
|
#: client/scenes/lobby_gui.cpp:686 client/scenes/lobby_gui.cpp:698
|
||||||
msgid "This feature is not supported by your headset"
|
msgid "This feature is not supported by your headset"
|
||||||
msgstr "デバイスはこの機能をサポートしていません"
|
msgstr "デバイスはこの機能をサポートしていません"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:655
|
#: client/scenes/lobby_gui.cpp:666
|
||||||
msgid "Enable eye tracking"
|
msgid "Enable eye tracking"
|
||||||
msgstr "アイトラッキングを有効する"
|
msgstr "アイトラッキングを有効する"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:668
|
#: client/scenes/lobby_gui.cpp:679
|
||||||
msgid "Enable face tracking"
|
msgid "Enable face tracking"
|
||||||
msgstr "顔トラッキングを有効する"
|
msgstr "顔トラッキングを有効する"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:680
|
#: client/scenes/lobby_gui.cpp:691
|
||||||
msgid "Enable video passthrough in lobby"
|
msgid "Enable video passthrough in lobby"
|
||||||
msgstr "ロビーでパススルーを有効する"
|
msgstr "ロビーでパススルーを有効する"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:690
|
#: client/scenes/lobby_gui.cpp:701
|
||||||
msgid "Show performance metrics"
|
msgid "Show performance metrics"
|
||||||
msgstr "パフォーマンスグラフを表示する"
|
msgstr "パフォーマンスグラフを表示する"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:694
|
#: client/scenes/lobby_gui.cpp:705
|
||||||
msgid "Overlay can be toggled by pressing both thumbsticks"
|
msgid "Overlay can be toggled by pressing both thumbsticks"
|
||||||
msgstr "両方のサムスティックを同時に押すことで切り替え可能"
|
msgstr "両方のサムスティックを同時に押すことで切り替え可能"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:724 client/scenes/lobby_gui.cpp:732
|
#: client/scenes/lobby_gui.cpp:735 client/scenes/lobby_gui.cpp:743
|
||||||
#: client/scenes/stream_stats.cpp:159
|
#: client/scenes/stream_stats.cpp:159
|
||||||
msgid "CPU time"
|
msgid "CPU time"
|
||||||
msgstr "CPU使用時間"
|
msgstr "CPU使用時間"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:728
|
#: client/scenes/lobby_gui.cpp:739
|
||||||
msgid "CPU time [ms]"
|
msgid "CPU time [ms]"
|
||||||
msgstr "CPU使用時間、ミリ秒"
|
msgstr "CPU使用時間、ミリ秒"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:738 client/scenes/lobby_gui.cpp:746
|
#: client/scenes/lobby_gui.cpp:749 client/scenes/lobby_gui.cpp:757
|
||||||
#: client/scenes/stream_stats.cpp:161
|
#: client/scenes/stream_stats.cpp:161
|
||||||
msgid "GPU time"
|
msgid "GPU time"
|
||||||
msgstr "GPU使用時間"
|
msgstr "GPU使用時間"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:742
|
#: client/scenes/lobby_gui.cpp:753
|
||||||
msgid "GPU time [ms]"
|
msgid "GPU time [ms]"
|
||||||
msgstr "GPU使用時間、ミリ秒"
|
msgstr "GPU使用時間、ミリ秒"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:832 client/scenes/lobby_gui.cpp:1460
|
#: client/scenes/lobby_gui.cpp:843 client/scenes/lobby_gui.cpp:1482
|
||||||
msgid "Licenses"
|
msgid "Licenses"
|
||||||
msgstr "ライセンス"
|
msgstr "ライセンス"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1171
|
#: client/scenes/lobby_gui.cpp:1182
|
||||||
msgid "Microphone is enabled"
|
msgid "Microphone is enabled"
|
||||||
msgstr "マイクは有効です"
|
msgstr "マイクは有効です"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1172
|
#: client/scenes/lobby_gui.cpp:1183
|
||||||
msgid "Microphone is disabled"
|
msgid "Microphone is disabled"
|
||||||
msgstr "マイクは無効です"
|
msgstr "マイクは無効です"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1181
|
#: client/scenes/lobby_gui.cpp:1192
|
||||||
msgid "Hand tracking is enabled"
|
msgid "Hand tracking is enabled"
|
||||||
msgstr "ハンドトラッキングは有効です"
|
msgstr "ハンドトラッキングは有効です"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1182
|
#: client/scenes/lobby_gui.cpp:1193
|
||||||
msgid "Hand tracking is disabled"
|
msgid "Hand tracking is disabled"
|
||||||
msgstr "ハンドラッキングは無効です"
|
msgstr "ハンドラッキングは無効です"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1191
|
#: client/scenes/lobby_gui.cpp:1202
|
||||||
msgid "Eye tracking is enabled"
|
msgid "Eye tracking is enabled"
|
||||||
msgstr "アイトラッキングは有効です"
|
msgstr "アイトラッキングは有効です"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1192
|
#: client/scenes/lobby_gui.cpp:1203
|
||||||
msgid "Eye tracking is disabled"
|
msgid "Eye tracking is disabled"
|
||||||
msgstr "アイトラッキングは無効です"
|
msgstr "アイトラッキングは無効です"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1202
|
#: client/scenes/lobby_gui.cpp:1213 client/scenes/lobby_gui.cpp:1224
|
||||||
msgid "Face tracking is enabled"
|
msgid "Face tracking is enabled"
|
||||||
msgstr "顔トラッキングは有効です"
|
msgstr "顔トラッキングは有効です"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1203
|
#: client/scenes/lobby_gui.cpp:1214 client/scenes/lobby_gui.cpp:1225
|
||||||
msgid "Face tracking is disabled"
|
msgid "Face tracking is disabled"
|
||||||
msgstr "フェーストラッキングは無効です"
|
msgstr "フェーストラッキングは無効です"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1220
|
#: client/scenes/lobby_gui.cpp:1242
|
||||||
msgid "Add server"
|
msgid "Add server"
|
||||||
msgstr "サーバーを追加する"
|
msgstr "サーバーを追加する"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1445
|
#: client/scenes/lobby_gui.cpp:1467
|
||||||
msgid "Server list"
|
msgid "Server list"
|
||||||
msgstr "サーバー"
|
msgstr "サーバー"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1448
|
#: client/scenes/lobby_gui.cpp:1470
|
||||||
msgid "Settings"
|
msgid "Settings"
|
||||||
msgstr "設定"
|
msgstr "設定"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1452
|
#: client/scenes/lobby_gui.cpp:1474
|
||||||
msgid "Debug"
|
msgid "Debug"
|
||||||
msgstr "デバッグ"
|
msgstr "デバッグ"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1457
|
#: client/scenes/lobby_gui.cpp:1479
|
||||||
msgid "About"
|
msgid "About"
|
||||||
msgstr "WiVRnについて"
|
msgstr "WiVRnについて"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1463
|
#: client/scenes/lobby_gui.cpp:1485
|
||||||
msgid "Exit"
|
msgid "Exit"
|
||||||
msgstr "完了"
|
msgstr "完了"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1477
|
#: client/scenes/lobby_gui.cpp:1499
|
||||||
msgid ""
|
msgid ""
|
||||||
"Press A or X or put your palm up\n"
|
"Press A or X or put your palm up\n"
|
||||||
"to move the main window"
|
"to move the main window"
|
||||||
@@ -269,7 +277,7 @@ msgstr ""
|
|||||||
"ウィンドウを移動するには、手のひらを上に向けるか、\n"
|
"ウィンドウを移動するには、手のひらを上に向けるか、\n"
|
||||||
"AまたはBボタンを押しましょう"
|
"AまたはBボタンを押しましょう"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1479
|
#: client/scenes/lobby_gui.cpp:1501
|
||||||
msgid "Press A or X to move the main window"
|
msgid "Press A or X to move the main window"
|
||||||
msgstr "AまたはXボタンを押してウィンドウを移動"
|
msgstr "AまたはXボタンを押してウィンドウを移動"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user