Fix a bug in engine node resampling due to an invalid pointer offset.

This commit is contained in:
David Reid
2021-10-04 11:25:32 +10:00
parent 6319d2d977
commit 7b50c136c3
+1 -1
View File
@@ -68961,7 +68961,7 @@ MA_API ma_result ma_engine_node_init_preallocated(const ma_engine_node_config* p
resamplerConfig = ma_linear_resampler_config_init(ma_format_f32, baseNodeConfig.pInputChannels[0], pEngineNode->sampleRate, ma_engine_get_sample_rate(pEngineNode->pEngine));
resamplerConfig.lpfOrder = 0; /* <-- Need to disable low-pass filtering for pitch shifting for now because there's cases where the biquads are becoming unstable. Need to figure out a better fix for this. */
result = ma_linear_resampler_init_preallocated(&resamplerConfig, ma_offset_ptr(pHeap, heapLayout.baseNodeOffset), &pEngineNode->resampler);
result = ma_linear_resampler_init_preallocated(&resamplerConfig, ma_offset_ptr(pHeap, heapLayout.resamplerOffset), &pEngineNode->resampler);
if (result != MA_SUCCESS) {
goto error1;
}