mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 23:55:40 +00:00
Merge pull request #1185 from ggrtk/update-cubeb
dep/cubeb: Update to 860bf2b
This commit is contained in:
commit
baa3fe41c6
|
@ -2185,7 +2185,7 @@ int setup_wasapi_stream_one_side(cubeb_stream * stm,
|
||||||
|
|
||||||
void wasapi_find_matching_output_device(cubeb_stream * stm) {
|
void wasapi_find_matching_output_device(cubeb_stream * stm) {
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
cubeb_device_info * input_device;
|
cubeb_device_info * input_device = nullptr;
|
||||||
cubeb_device_collection collection;
|
cubeb_device_collection collection;
|
||||||
|
|
||||||
// Only try to match to an output device if the input device is a bluetooth
|
// Only try to match to an output device if the input device is a bluetooth
|
||||||
|
@ -2220,11 +2220,13 @@ void wasapi_find_matching_output_device(cubeb_stream * stm) {
|
||||||
|
|
||||||
for (uint32_t i = 0; i < collection.count; i++) {
|
for (uint32_t i = 0; i < collection.count; i++) {
|
||||||
cubeb_device_info dev = collection.device[i];
|
cubeb_device_info dev = collection.device[i];
|
||||||
if (dev.type == CUBEB_DEVICE_TYPE_OUTPUT &&
|
if (dev.type == CUBEB_DEVICE_TYPE_OUTPUT && dev.group_id && input_device &&
|
||||||
dev.group_id && !strcmp(dev.group_id, input_device->group_id) &&
|
!strcmp(dev.group_id, input_device->group_id) &&
|
||||||
dev.default_rate == input_device->default_rate) {
|
dev.default_rate == input_device->default_rate) {
|
||||||
LOG("Found matching device for %s: %s", input_device->friendly_name, dev.friendly_name);
|
LOG("Found matching device for %s: %s", input_device->friendly_name,
|
||||||
stm->output_device_id = utf8_to_wstr(reinterpret_cast<char const *>(dev.devid));
|
dev.friendly_name);
|
||||||
|
stm->output_device_id =
|
||||||
|
utf8_to_wstr(reinterpret_cast<char const *>(dev.devid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue