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
23b6b307
Commit
23b6b307
authored
Feb 02, 2020
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove an unused function.
parent
a7837316
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
46 deletions
+0
-46
miniaudio.h
miniaudio.h
+0
-46
No files found.
miniaudio.h
View file @
23b6b307
...
...
@@ -4660,52 +4660,6 @@ static MA_INLINE ma_int32 ma_dither_s32(ma_dither_mode ditherMode, ma_int32 dith
}
/*
Splits a buffer into parts of equal length and of the given alignment. The returned size of the split buffers will be a
multiple of the alignment. The alignment must be a power of 2.
*/
void ma_split_buffer(void* pBuffer, size_t bufferSize, size_t splitCount, size_t alignment, void** ppBuffersOut, size_t* pSplitSizeOut)
{
ma_uintptr pBufferUnaligned;
ma_uintptr pBufferAligned;
size_t unalignedBytes;
size_t splitSize;
if (pSplitSizeOut) {
*pSplitSizeOut = 0;
}
if (pBuffer == NULL || bufferSize == 0 || splitCount == 0) {
return;
}
if (alignment == 0) {
alignment = 1;
}
pBufferUnaligned = (ma_uintptr)pBuffer;
pBufferAligned = (pBufferUnaligned + (alignment-1)) & ~(alignment-1);
unalignedBytes = (size_t)(pBufferAligned - pBufferUnaligned);
splitSize = 0;
if (bufferSize >= unalignedBytes) {
splitSize = (bufferSize - unalignedBytes) / splitCount;
splitSize = splitSize & ~(alignment-1);
}
if (ppBuffersOut != NULL) {
size_t i;
for (i = 0; i < splitCount; ++i) {
ppBuffersOut[i] = (ma_uint8*)(pBufferAligned + (splitSize*i));
}
}
if (pSplitSizeOut) {
*pSplitSizeOut = splitSize;
}
}
/******************************************************************************
Atomics
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