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
6aa0b573
Commit
6aa0b573
authored
Jul 28, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for disabling sigvis in the resampling test.
parent
df0f5081
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
tests/mal_resampling.c
tests/mal_resampling.c
+15
-4
No files found.
tests/mal_resampling.c
View file @
6aa0b573
// We're using sigvis for visualizations. This will include mini_al for us, so no need to include mini_al in this file.
// We're using sigvis for visualizations. This will include mini_al for us, so no need to include mini_al in this file.
#define NO_SIGVIS
#define MAL_NO_SSE2
#define MAL_NO_SSE2
#define MAL_NO_AVX2
#define MAL_NO_AVX2
#define MINI_SIGVIS_IMPLEMENTATION
#include "../tools/mini_sigvis/mini_sigvis.h" // <-- Includes mini_al.
#ifdef NO_SIGVIS
#define MINI_AL_IMPLEMENTATION
#include "../mini_al.h"
#else
#define MINI_SIGVIS_IMPLEMENTATION
#include "../tools/mini_sigvis/mini_sigvis.h" // <-- Includes mini_al.
#endif
// There is a usage pattern for resampling that mini_al does not properly support which is where the client continuously
// There is a usage pattern for resampling that mini_al does not properly support which is where the client continuously
// reads samples until mal_src_read() returns 0. The problem with this pattern is that is consumes the samples sitting
// reads samples until mal_src_read() returns 0. The problem with this pattern is that is consumes the samples sitting
...
@@ -100,6 +108,8 @@ int main(int argc, char** argv)
...
@@ -100,6 +108,8 @@ int main(int argc, char** argv)
mal_device
device
;
mal_device
device
;
mal_result
result
;
mal_result
result
;
config
.
bufferSizeInFrames
=
8192
*
1
;
// We first play the sound the way it's meant to be played.
// We first play the sound the way it's meant to be played.
result
=
mal_device_init
(
NULL
,
mal_device_type_playback
,
NULL
,
&
config
,
NULL
,
&
device
);
result
=
mal_device_init
(
NULL
,
mal_device_type_playback
,
NULL
,
&
config
,
NULL
,
&
device
);
if
(
result
!=
MAL_SUCCESS
)
{
if
(
result
!=
MAL_SUCCESS
)
{
...
@@ -114,6 +124,7 @@ int main(int argc, char** argv)
...
@@ -114,6 +124,7 @@ int main(int argc, char** argv)
mal_src_config
srcConfig
=
mal_src_config_init
(
sampleRateIn
,
sampleRateOut
,
1
,
on_src
,
NULL
);
mal_src_config
srcConfig
=
mal_src_config_init
(
sampleRateIn
,
sampleRateOut
,
1
,
on_src
,
NULL
);
srcConfig
.
algorithm
=
mal_src_algorithm_sinc
;
srcConfig
.
algorithm
=
mal_src_algorithm_sinc
;
srcConfig
.
neverConsumeEndOfInput
=
MAL_TRUE
;
result
=
mal_src_init
(
&
srcConfig
,
&
src
);
result
=
mal_src_init
(
&
srcConfig
,
&
src
);
if
(
result
!=
MAL_SUCCESS
)
{
if
(
result
!=
MAL_SUCCESS
)
{
...
@@ -123,7 +134,7 @@ int main(int argc, char** argv)
...
@@ -123,7 +134,7 @@ int main(int argc, char** argv)
#if
0
#if
ndef NO_SIGVIS
msigvis_context
sigvis
;
msigvis_context
sigvis
;
result
=
msigvis_init
(
&
sigvis
);
result
=
msigvis_init
(
&
sigvis
);
if
(
result
!=
MAL_SUCCESS
)
{
if
(
result
!=
MAL_SUCCESS
)
{
...
@@ -192,4 +203,4 @@ int main(int argc, char** argv)
...
@@ -192,4 +203,4 @@ int main(int argc, char** argv)
#endif
#endif
return
0
;
return
0
;
}
}
\ No newline at end of file
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