Remove an unnecessary function.

This removes the horrendously named `ma_device__post_init_setup()` which
I've been meaning to remove for years.
This commit is contained in:
David Reid
2026-02-04 12:44:35 +10:00
parent 02f8a6b952
commit cb26c7ec52
+13 -29
View File
@@ -21155,7 +21155,6 @@ MA_API ma_uint32 ma_get_format_priority_index(ma_format format) /* Lower = bette
return (ma_uint32)-1;
}
static ma_result ma_device__post_init_setup(ma_device* pDevice, ma_device_type deviceType, const ma_device_descriptor* pPublicDescriptorPlayback, const ma_device_descriptor* pPublicDescriptorCapture, const ma_device_descriptor* pInternalDescriptorPlayback, const ma_device_descriptor* pInternalDescriptorCapture);
static ma_bool32 ma_device_descriptor_is_valid(const ma_device_descriptor* pDeviceDescriptor)
{
@@ -47657,30 +47656,6 @@ MA_API ma_result ma_device_update_descriptor(ma_device* pDevice, ma_device_type
return MA_SUCCESS;
}
static ma_result ma_device__post_init_setup(ma_device* pDevice, ma_device_type deviceType, const ma_device_descriptor* pPublicDescriptorPlayback, const ma_device_descriptor* pPublicDescriptorCapture, const ma_device_descriptor* pInternalDescriptorPlayback, const ma_device_descriptor* pInternalDescriptorCapture)
{
ma_result result;
MA_ASSERT(pDevice != NULL);
if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) {
result = ma_device_update_descriptor(pDevice, ma_device_type_capture, pPublicDescriptorCapture, pInternalDescriptorCapture);
if (result != MA_SUCCESS) {
return result;
}
}
if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) {
result = ma_device_update_descriptor(pDevice, ma_device_type_playback, pPublicDescriptorPlayback, pInternalDescriptorPlayback);
if (result != MA_SUCCESS) {
return result;
}
}
return MA_SUCCESS;
}
MA_API ma_result ma_device_post_init(ma_device* pDevice, ma_device_type deviceType, const ma_device_descriptor* pPublicDescriptorPlayback, const ma_device_descriptor* pPublicDescriptorCapture, const ma_device_descriptor* pInternalDescriptorPlayback, const ma_device_descriptor* pInternalDescriptorCapture)
{
ma_result result;
@@ -47725,10 +47700,19 @@ MA_API ma_result ma_device_post_init(ma_device* pDevice, ma_device_type deviceTy
}
}
/* Update data conversion. */
result = ma_device__post_init_setup(pDevice, deviceType, pPublicDescriptorPlayback, pPublicDescriptorCapture, pInternalDescriptorPlayback, pInternalDescriptorCapture); /* TODO: Should probably rename ma_device__post_init_setup() to something better. */
if (result != MA_SUCCESS) {
return result;
/* Update descriptors. */
if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) {
result = ma_device_update_descriptor(pDevice, ma_device_type_capture, pPublicDescriptorCapture, pInternalDescriptorCapture);
if (result != MA_SUCCESS) {
return result;
}
}
if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) {
result = ma_device_update_descriptor(pDevice, ma_device_type_playback, pPublicDescriptorPlayback, pInternalDescriptorPlayback);
if (result != MA_SUCCESS) {
return result;
}
}
return MA_SUCCESS;