mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
(XAudio 2.8) Audio device selection can now be set
This commit is contained in:
parent
1650a03b80
commit
8a4d3f7431
@ -93,16 +93,15 @@ void *mmdevice_list_new(void *u)
|
||||
br = string_list_append(sl, dev_name_str, attr);
|
||||
if (!br)
|
||||
goto error;
|
||||
if (dev_id_str)
|
||||
sl->elems[sl->size-1].userdata = dev_id_str;
|
||||
|
||||
PropVariantClear(&prop_var);
|
||||
prop_var_init = false;
|
||||
if (dev_id_wstr)
|
||||
CoTaskMemFree(dev_id_wstr);
|
||||
if (dev_id_str)
|
||||
free(dev_id_str);
|
||||
if (dev_name_str)
|
||||
free(dev_name_str);
|
||||
dev_id_str = NULL;
|
||||
dev_name_str = NULL;
|
||||
dev_id_wstr = NULL;
|
||||
IFACE_RELEASE(prop_store);
|
||||
|
@ -243,7 +243,10 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
|
||||
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
{
|
||||
wchar_t *temp = utf8_to_utf16_string_alloc((const char*)(char)idx_found);
|
||||
wchar_t *temp = NULL;
|
||||
if (device)
|
||||
temp = utf8_to_utf16_string_alloc((const char*)list->elems[idx_found].userdata);
|
||||
|
||||
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, (LPCWSTR)(uintptr_t)temp, NULL, AudioCategory_GameEffects)))
|
||||
{
|
||||
free(temp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user