external c-sources updated
This commit is contained in:
parent
2ad5a4babf
commit
a0882a5b81
13 changed files with 7674 additions and 4241 deletions
12
raylib/external/miniaudio.h
vendored
12
raylib/external/miniaudio.h
vendored
|
@ -21473,7 +21473,9 @@ static ma_result ma_context_get_MMDevice__wasapi(ma_context* pContext, ma_device
|
|||
MA_ASSERT(pContext != NULL);
|
||||
MA_ASSERT(ppMMDevice != NULL);
|
||||
|
||||
ma_CoInitializeEx(pContext, NULL, MA_COINIT_VALUE);
|
||||
hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
|
||||
ma_CoUninitialize(pContext);
|
||||
if (FAILED(hr)) {
|
||||
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create IMMDeviceEnumerator.\n");
|
||||
return ma_result_from_HRESULT(hr);
|
||||
|
@ -36076,9 +36078,15 @@ static ma_result ma_context_get_device_info_from_fd__audio4(ma_context* pContext
|
|||
ma_uint32 channels;
|
||||
ma_uint32 sampleRate;
|
||||
|
||||
#ifdef __NetBSD__
|
||||
if (ioctl(fd, AUDIO_GETFORMAT, &fdInfo) < 0) {
|
||||
return MA_ERROR;
|
||||
}
|
||||
#else
|
||||
if (ioctl(fd, AUDIO_GETINFO, &fdInfo) < 0) {
|
||||
return MA_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (deviceType == ma_device_type_playback) {
|
||||
channels = fdInfo.play.channels;
|
||||
|
@ -36356,7 +36364,11 @@ static ma_result ma_device_init_fd__audio4(ma_device* pDevice, const ma_device_c
|
|||
/* We're using a default device. Get the info from the /dev/audioctl file instead of /dev/audio. */
|
||||
int fdctl = open(pDefaultDeviceCtlNames[iDefaultDevice], fdFlags, 0);
|
||||
if (fdctl != -1) {
|
||||
#ifdef __NetBSD__
|
||||
fdInfoResult = ioctl(fdctl, AUDIO_GETFORMAT, &fdInfo);
|
||||
#else
|
||||
fdInfoResult = ioctl(fdctl, AUDIO_GETINFO, &fdInfo);
|
||||
#endif
|
||||
close(fdctl);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue