mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Fix some alignment errors with preallocation.
This commit is contained in:
+33
@@ -40867,6 +40867,9 @@ static ma_result ma_lpf1_get_heap_layout(const ma_lpf1_config* pConfig, ma_lpf1_
|
|||||||
pHeapLayout->r1Offset = pHeapLayout->sizeInBytes;
|
pHeapLayout->r1Offset = pHeapLayout->sizeInBytes;
|
||||||
pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels;
|
pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels;
|
||||||
|
|
||||||
|
/* Make sure allocation size is aligned. */
|
||||||
|
pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);
|
||||||
|
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41311,6 +41314,9 @@ static ma_result ma_lpf_get_heap_layout(const ma_lpf_config* pConfig, ma_lpf_hea
|
|||||||
pHeapLayout->sizeInBytes += sizeof(ma_lpf2) + lpf2HeapSizeInBytes;
|
pHeapLayout->sizeInBytes += sizeof(ma_lpf2) + lpf2HeapSizeInBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure allocation size is aligned. */
|
||||||
|
pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);
|
||||||
|
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41699,6 +41705,9 @@ static ma_result ma_hpf1_get_heap_layout(const ma_hpf1_config* pConfig, ma_hpf1_
|
|||||||
pHeapLayout->r1Offset = pHeapLayout->sizeInBytes;
|
pHeapLayout->r1Offset = pHeapLayout->sizeInBytes;
|
||||||
pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels;
|
pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels;
|
||||||
|
|
||||||
|
/* Make sure allocation size is aligned. */
|
||||||
|
pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);
|
||||||
|
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42143,6 +42152,9 @@ static ma_result ma_hpf_get_heap_layout(const ma_hpf_config* pConfig, ma_hpf_hea
|
|||||||
pHeapLayout->sizeInBytes += sizeof(ma_hpf2) + hpf2HeapSizeInBytes;
|
pHeapLayout->sizeInBytes += sizeof(ma_hpf2) + hpf2HeapSizeInBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure allocation size is aligned. */
|
||||||
|
pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);
|
||||||
|
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42684,6 +42696,9 @@ static ma_result ma_bpf_get_heap_layout(const ma_bpf_config* pConfig, ma_bpf_hea
|
|||||||
pHeapLayout->sizeInBytes += sizeof(ma_bpf2) + bpf2HeapSizeInBytes;
|
pHeapLayout->sizeInBytes += sizeof(ma_bpf2) + bpf2HeapSizeInBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure allocation size is aligned. */
|
||||||
|
pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);
|
||||||
|
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43782,6 +43797,9 @@ static ma_result ma_linear_resampler_get_heap_layout(const ma_linear_resampler_c
|
|||||||
pHeapLayout->sizeInBytes += lpfHeapSizeInBytes;
|
pHeapLayout->sizeInBytes += lpfHeapSizeInBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure allocation size is aligned. */
|
||||||
|
pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);
|
||||||
|
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45440,6 +45458,9 @@ static ma_result ma_channel_converter_get_heap_layout(const ma_channel_converter
|
|||||||
pHeapLayout->sizeInBytes += sizeof(ma_channel) * pConfig->channelsOut;
|
pHeapLayout->sizeInBytes += sizeof(ma_channel) * pConfig->channelsOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Alignment for the next section. */
|
||||||
|
pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);
|
||||||
|
|
||||||
/* Whether or not we use weights of a shuffle table depends on the channel map themselves and the algorithm we've chosen. */
|
/* Whether or not we use weights of a shuffle table depends on the channel map themselves and the algorithm we've chosen. */
|
||||||
conversionPath = ma_channel_converter_config_get_conversion_path(pConfig);
|
conversionPath = ma_channel_converter_config_get_conversion_path(pConfig);
|
||||||
|
|
||||||
@@ -45456,6 +45477,9 @@ static ma_result ma_channel_converter_get_heap_layout(const ma_channel_converter
|
|||||||
pHeapLayout->sizeInBytes += sizeof(float ) * pConfig->channelsIn * pConfig->channelsOut;
|
pHeapLayout->sizeInBytes += sizeof(float ) * pConfig->channelsIn * pConfig->channelsOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure allocation size is aligned. */
|
||||||
|
pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);
|
||||||
|
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46230,6 +46254,9 @@ static ma_result ma_data_converter_get_heap_layout(const ma_data_converter_confi
|
|||||||
pHeapLayout->sizeInBytes += heapSizeInBytes;
|
pHeapLayout->sizeInBytes += heapSizeInBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure allocation size is aligned. */
|
||||||
|
pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);
|
||||||
|
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57713,6 +57740,9 @@ static ma_result ma_noise_get_heap_layout(const ma_noise_config* pConfig, ma_noi
|
|||||||
pHeapLayout->sizeInBytes += sizeof(double) * pConfig->channels;
|
pHeapLayout->sizeInBytes += sizeof(double) * pConfig->channels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure allocation size is aligned. */
|
||||||
|
pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);
|
||||||
|
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63291,6 +63321,9 @@ static ma_result ma_node_get_heap_layout(const ma_node_config* pConfig, ma_node_
|
|||||||
pHeapLayout->inputBusCount = inputBusCount;
|
pHeapLayout->inputBusCount = inputBusCount;
|
||||||
pHeapLayout->outputBusCount = outputBusCount;
|
pHeapLayout->outputBusCount = outputBusCount;
|
||||||
|
|
||||||
|
/* Make sure allocation size is aligned. */
|
||||||
|
pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);
|
||||||
|
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user