diff options
author | Roxanne Skelly <roxanne@roxiware.com> | 2024-04-08 04:10:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-08 04:10:34 -0700 |
commit | f2ec9e5cca078434e624e42afec11ebd7d681e06 (patch) | |
tree | d6afcd0bc1cf2c86e5f5a668749c01c14bf04da2 /indra/llwebrtc | |
parent | a0cc1b6bd2b1f3578c8d34b634e4add20bae2dd2 (diff) | |
parent | 648741470f67120d99aec3a4aeceeaf4395cca09 (diff) |
Merge pull request #1150 from secondlife/roxie/webrtc-voice
Diffstat (limited to 'indra/llwebrtc')
-rw-r--r-- | indra/llwebrtc/llwebrtc.cpp | 11 | ||||
-rw-r--r-- | indra/llwebrtc/llwebrtc.h | 7 | ||||
-rw-r--r-- | indra/llwebrtc/llwebrtc_impl.h | 1 |
3 files changed, 12 insertions, 7 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index 7570bb4434..eb9bb65e67 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -26,7 +26,6 @@ #include "llwebrtc_impl.h" #include <algorithm> -#include <format> #include <string.h> #include "api/audio_codecs/audio_decoder_factory.h" @@ -389,7 +388,7 @@ void LLWebRTCImpl::unsetDevicesObserver(LLWebRTCDevicesObserver *observer) void ll_set_device_module_capture_device(rtc::scoped_refptr<webrtc::AudioDeviceModule> device_module, int16_t device) { device_module->StopRecording(); -#if LL_WINDOWS +#if WEBRTC_WIN if (device < 0) { device_module->SetRecordingDevice(webrtc::AudioDeviceModule::kDefaultDevice); @@ -442,7 +441,7 @@ void LLWebRTCImpl::setCaptureDevice(const std::string &id) void ll_set_device_module_render_device(rtc::scoped_refptr<webrtc::AudioDeviceModule> device_module, int16_t device) { device_module->StopPlayout(); -#if LL_WINDOWS +#if WEBRTC_WIN if (device < 0) { device_module->SetPlayoutDevice(webrtc::AudioDeviceModule::kDefaultDevice); @@ -501,10 +500,10 @@ void LLWebRTCImpl::setRenderDevice(const std::string &id) // updateDevices needs to happen on the worker thread. void LLWebRTCImpl::updateDevices() { - int16_t renderDeviceCount = mTuningDeviceModule->PlayoutDevices(); + int16_t renderDeviceCount = mTuningDeviceModule->PlayoutDevices(); mPlayoutDeviceList.clear(); -#if LL_WINDOWS +#if WEBRTC_WIN int16_t index = 0; #else // index zero is always "Default" for darwin/linux, @@ -522,7 +521,7 @@ void LLWebRTCImpl::updateDevices() int16_t captureDeviceCount = mTuningDeviceModule->RecordingDevices(); mRecordingDeviceList.clear(); -#if LL_WINDOWS +#if WEBRTC_WIN index = 0; #else // index zero is always "Default" for darwin/linux, diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h index 8830799cde..ac71e0c744 100644 --- a/indra/llwebrtc/llwebrtc.h +++ b/indra/llwebrtc/llwebrtc.h @@ -78,7 +78,12 @@ class LLWebRTCVoiceDevice LLWebRTCVoiceDevice(const std::string &display_name, const std::string &id) : mDisplayName(display_name), mID(id) - {}; + { + if (mID.empty()) + { + mID = display_name; + } + }; }; typedef std::vector<LLWebRTCVoiceDevice> LLWebRTCVoiceDeviceList; diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h index 78ae6b4444..e1031099c7 100644 --- a/indra/llwebrtc/llwebrtc_impl.h +++ b/indra/llwebrtc/llwebrtc_impl.h @@ -35,6 +35,7 @@ #define WEBRTC_POSIX 1 #elif __linux__ #define WEBRTC_LINUX 1 +#define WEBRTC_POSIX 1 #endif #include "llwebrtc.h" |