Force channel count = 1 for microphone

This commit is contained in:
Patrick Nicolas
2024-03-26 21:49:38 +01:00
parent cd16b45270
commit 1aa49bb44f
+3 -2
View File
@@ -220,8 +220,9 @@ void wivrn::android::audio::get_audio_description(xrt::drivers::wivrn::from_head
if (result == AAUDIO_OK) if (result == AAUDIO_OK)
{ {
info.microphone = { info.microphone = {
.num_channels = (uint8_t)AAudioStream_getChannelCount(stream), .num_channels = 1, // Some headsets report 2 channels but then fail
.sample_rate = (uint32_t)AAudioStream_getSampleRate(stream)}; .sample_rate = (uint32_t)AAudioStream_getSampleRate(stream),
};
AAudioStream_close(stream); AAudioStream_close(stream);
} }