Don't ask for the friendly name of a default device if we failed to enumerate it.
Bug: b/144233691 Change-Id: I5f80c63858ec851ab14bcc3c1ca51ca2e9507834 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159582 Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Commit-Queue: Tim Haloun <thaloun@chromium.org> Cr-Commit-Position: refs/heads/master@{#29778}
This commit is contained in:
parent
dcc910a209
commit
86b33e0b7e
@ -476,6 +476,10 @@ bool GetDeviceNamesInternal(EDataFlow data_flow,
|
||||
for (size_t i = 0; i < arraysize(role); ++i) {
|
||||
default_device = CreateDeviceInternal(AudioDeviceName::kDefaultDeviceId,
|
||||
data_flow, role[i]);
|
||||
if (!default_device.Get()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string device_name;
|
||||
device_name += (role[i] == eConsole ? "Default - " : "Communication - ");
|
||||
device_name += GetDeviceFriendlyNameInternal(default_device.Get());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user