mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
XAudio: Fix an error with device enumeration.
This commit is contained in:
@@ -48122,6 +48122,7 @@ static ma_result ma_context_enumerate_devices__xaudio(ma_context* pContext, ma_e
|
|||||||
{
|
{
|
||||||
ma_context_state_xaudio* pContextStateXAudio = ma_context_get_backend_state__xaudio(pContext);
|
ma_context_state_xaudio* pContextStateXAudio = ma_context_get_backend_state__xaudio(pContext);
|
||||||
ma_device_info deviceInfo;
|
ma_device_info deviceInfo;
|
||||||
|
ma_device_enumeration_result enumerationResult;
|
||||||
|
|
||||||
(void)pContextStateXAudio;
|
(void)pContextStateXAudio;
|
||||||
|
|
||||||
@@ -48134,6 +48135,12 @@ static ma_result ma_context_enumerate_devices__xaudio(ma_context* pContext, ma_e
|
|||||||
/* Audio is always s16, stereo, 48000. */
|
/* Audio is always s16, stereo, 48000. */
|
||||||
ma_device_info_add_native_data_format(&deviceInfo, ma_format_s16, 2, 2, 48000, 48000);
|
ma_device_info_add_native_data_format(&deviceInfo, ma_format_s16, 2, 2, 48000, 48000);
|
||||||
|
|
||||||
|
/* The return value of the callback does not matter here because we're only enumerating a single device, but we're putting the checks down anyway for completeness. */
|
||||||
|
enumerationResult = callback(ma_device_type_playback, &deviceInfo, pCallbackUserData);
|
||||||
|
if (enumerationResult == MA_DEVICE_ENUMERATION_ABORT) {
|
||||||
|
return MA_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user