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
19f4630c
Commit
19f4630c
authored
Mar 25, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename mal_get_sample_size_in_bytes() to mal_get_bytes_per_sample().
parent
a95005af
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
65 deletions
+67
-65
mini_al.h
mini_al.h
+64
-62
tests/mal_test_0.c
tests/mal_test_0.c
+3
-3
No files found.
mini_al.h
View file @
19f4630c
This diff is collapsed.
Click to expand it.
tests/mal_test_0.c
View file @
19f4630c
...
@@ -99,7 +99,7 @@ void* load_raw_audio_data(const char* filePath, mal_format format, mal_uint64* p
...
@@ -99,7 +99,7 @@ void* load_raw_audio_data(const char* filePath, mal_format format, mal_uint64* p
return
NULL
;
return
NULL
;
}
}
*
pBenchmarkFrameCount
=
fileSize
/
mal_get_
sample_size_in_bytes
(
format
);
*
pBenchmarkFrameCount
=
fileSize
/
mal_get_
bytes_per_sample
(
format
);
return
pFileData
;
return
pFileData
;
}
}
...
@@ -438,7 +438,7 @@ int do_format_conversion_test(mal_format formatIn, mal_format formatOut)
...
@@ -438,7 +438,7 @@ int do_format_conversion_test(mal_format formatIn, mal_format formatOut)
void
*
pBenchmarkData
=
load_raw_audio_data
(
pBenchmarkFilePath
,
formatOut
,
&
benchmarkFrameCount
);
void
*
pBenchmarkData
=
load_raw_audio_data
(
pBenchmarkFilePath
,
formatOut
,
&
benchmarkFrameCount
);
if
(
pBenchmarkData
!=
NULL
)
{
if
(
pBenchmarkData
!=
NULL
)
{
if
(
benchmarkFrameCount
==
baseFrameCount
)
{
if
(
benchmarkFrameCount
==
baseFrameCount
)
{
void
*
pConvertedData
=
(
void
*
)
mal_malloc
(
benchmarkFrameCount
*
mal_get_
sample_size_in_bytes
(
formatOut
));
void
*
pConvertedData
=
(
void
*
)
mal_malloc
(
benchmarkFrameCount
*
mal_get_
bytes_per_sample
(
formatOut
));
if
(
pConvertedData
!=
NULL
)
{
if
(
pConvertedData
!=
NULL
)
{
onConvertPCM
(
pConvertedData
,
pBaseData
,
(
mal_uint32
)
benchmarkFrameCount
,
mal_dither_mode_none
);
onConvertPCM
(
pConvertedData
,
pBaseData
,
(
mal_uint32
)
benchmarkFrameCount
,
mal_dither_mode_none
);
result
=
mal_pcm_compare
(
pBenchmarkData
,
pConvertedData
,
benchmarkFrameCount
,
formatOut
,
allowedDifference
);
result
=
mal_pcm_compare
(
pBenchmarkData
,
pConvertedData
,
benchmarkFrameCount
,
formatOut
,
allowedDifference
);
...
@@ -650,7 +650,7 @@ int do_format_conversion_tests()
...
@@ -650,7 +650,7 @@ int do_format_conversion_tests()
int
compare_interleaved_and_separated_buffers
(
const
void
*
interleaved
,
const
void
**
separated
,
mal_uint32
frameCount
,
mal_uint32
channels
,
mal_format
format
)
int
compare_interleaved_and_separated_buffers
(
const
void
*
interleaved
,
const
void
**
separated
,
mal_uint32
frameCount
,
mal_uint32
channels
,
mal_format
format
)
{
{
mal_uint32
bytesPerSample
=
mal_get_
sample_size_in_bytes
(
format
);
mal_uint32
bytesPerSample
=
mal_get_
bytes_per_sample
(
format
);
const
mal_uint8
*
interleaved8
=
(
const
mal_uint8
*
)
interleaved
;
const
mal_uint8
*
interleaved8
=
(
const
mal_uint8
*
)
interleaved
;
const
mal_uint8
**
separated8
=
(
const
mal_uint8
**
)
separated
;
const
mal_uint8
**
separated8
=
(
const
mal_uint8
**
)
separated
;
...
...
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