The number of input buses. This is how many sub-buffers will be contained in the `ppFramesIn`
The number of input buses. This is how many sub-buffers will be contained in the `ppFramesIn`
...
@@ -1850,7 +1850,7 @@ typedef struct
...
@@ -1850,7 +1850,7 @@ typedef struct
ma_engine*pEngine;/* A pointer to the engine. Set based on the value from the config. */
ma_engine*pEngine;/* A pointer to the engine. Set based on the value from the config. */
ma_uint32sampleRate;/* The sample rate of the input data. For sounds backed by a data source, this will be the data source's sample rate. Otherwise it'll be the engine's sample rate. */
ma_uint32sampleRate;/* The sample rate of the input data. For sounds backed by a data source, this will be the data source's sample rate. Otherwise it'll be the engine's sample rate. */
ma_faderfader;
ma_faderfader;
ma_resamplerresampler;/* For pitch shift. May change this to ma_linear_resampler later. */
ma_linear_resamplerresampler;/* For pitch shift. */
resamplerConfig.linear.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. */
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_resampler_init(&resamplerConfig,&pEngineNode->pEngine->allocationCallbacks,&pEngineNode->resampler);/* TODO: Use pre-allocation here. */
result=ma_linear_resampler_init(&resamplerConfig,&pEngineNode->pEngine->allocationCallbacks,&pEngineNode->resampler);/* TODO: Use pre-allocation here. */
if(result!=MA_SUCCESS){
if(result!=MA_SUCCESS){
gotoerror1;
gotoerror1;
}
}
...
@@ -12725,7 +12736,7 @@ MA_API ma_result ma_engine_node_init_preallocated(const ma_engine_node_config* p
...
@@ -12725,7 +12736,7 @@ MA_API ma_result ma_engine_node_init_preallocated(const ma_engine_node_config* p
returnMA_SUCCESS;
returnMA_SUCCESS;
error3:ma_spatializer_uninit(&pEngineNode->spatializer,NULL);/* <-- No need for allocation callbacks here because we use a preallocated heap. */
error3:ma_spatializer_uninit(&pEngineNode->spatializer,NULL);/* <-- No need for allocation callbacks here because we use a preallocated heap. */
error2:ma_resampler_uninit(&pEngineNode->resampler,&pConfig->pEngine->allocationCallbacks);/* TODO: Remove this when we have support for preallocated heaps with resamplers. */
error2:ma_linear_resampler_uninit(&pEngineNode->resampler,&pConfig->pEngine->allocationCallbacks);/* TODO: Remove this when we have support for preallocated heaps with resamplers. */
error1:ma_node_uninit(&pEngineNode->baseNode,NULL);/* <-- No need for allocation callbacks here because we use a preallocated heap. */
error1:ma_node_uninit(&pEngineNode->baseNode,NULL);/* <-- No need for allocation callbacks here because we use a preallocated heap. */