Resource manager can now have a custom resampler.

This commit is contained in:
caturria
2025-04-26 13:09:37 -04:00
committed by David Reid
parent b62249ceaf
commit 962d11b4ce
+3
View File
@@ -10516,6 +10516,7 @@ typedef struct
ma_decoding_backend_vtable** ppCustomDecodingBackendVTables; ma_decoding_backend_vtable** ppCustomDecodingBackendVTables;
ma_uint32 customDecodingBackendCount; ma_uint32 customDecodingBackendCount;
void* pCustomDecodingBackendUserData; void* pCustomDecodingBackendUserData;
ma_resampler_config resampling;
} ma_resource_manager_config; } ma_resource_manager_config;
MA_API ma_resource_manager_config ma_resource_manager_config_init(void); MA_API ma_resource_manager_config ma_resource_manager_config_init(void);
@@ -69956,6 +69957,7 @@ MA_API ma_resource_manager_config ma_resource_manager_config_init(void)
config.jobThreadCount = 0; config.jobThreadCount = 0;
} }
#endif #endif
config.resampling = ma_resampler_config_init(ma_format_unknown, 0, 0, 0, ma_resample_algorithm_linear); /* Format/channels/rate doesn't matter here. */
return config; return config;
} }
@@ -70199,6 +70201,7 @@ static ma_decoder_config ma_resource_manager__init_decoder_config(ma_resource_ma
config.ppCustomBackendVTables = pResourceManager->config.ppCustomDecodingBackendVTables; config.ppCustomBackendVTables = pResourceManager->config.ppCustomDecodingBackendVTables;
config.customBackendCount = pResourceManager->config.customDecodingBackendCount; config.customBackendCount = pResourceManager->config.customDecodingBackendCount;
config.pCustomBackendUserData = pResourceManager->config.pCustomDecodingBackendUserData; config.pCustomBackendUserData = pResourceManager->config.pCustomDecodingBackendUserData;
config.resampling = pResourceManager->config.resampling;
return config; return config;
} }