Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
9964922b
Commit
9964922b
authored
Aug 14, 2021
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some alignment errors with preallocation.
parent
2e9b6422
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
miniaudio.h
miniaudio.h
+33
-0
No files found.
miniaudio.h
View file @
9964922b
...
@@ -40867,6 +40867,9 @@ static ma_result ma_lpf1_get_heap_layout(const ma_lpf1_config* pConfig, ma_lpf1_
...
@@ -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
...
@@ -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_
...
@@ -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
...
@@ -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
...
@@ -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
...
@@ -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
...
@@ -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
...
@@ -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
...
@@ -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
...
@@ -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_
...
@@ -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;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment