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
4e6f702f
Commit
4e6f702f
authored
Jan 05, 2019
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test_0 and project files.
parent
a392eefb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
7 deletions
+27
-7
tests/mal_test_0.c
tests/mal_test_0.c
+6
-1
tests/mal_test_0.vcxproj
tests/mal_test_0.vcxproj
+15
-6
tests/mal_test_0.vcxproj.filters
tests/mal_test_0.vcxproj.filters
+6
-0
No files found.
tests/mal_test_0.c
View file @
4e6f702f
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#include "../extras/stb_vorbis.c"
#include "../extras/stb_vorbis.c"
#endif
#endif
//#define MAL_DEBUG_OUTPUT
#define MINI_AL_IMPLEMENTATION
#define MINI_AL_IMPLEMENTATION
#include "../mini_al.h"
#include "../mini_al.h"
...
@@ -2247,7 +2248,7 @@ mal_uint32 on_send__playback_test(mal_device* pDevice, mal_uint32 frameCount, vo
...
@@ -2247,7 +2248,7 @@ mal_uint32 on_send__playback_test(mal_device* pDevice, mal_uint32 frameCount, vo
if
(
pDevice
->
format
==
mal_format_f32
)
{
if
(
pDevice
->
format
==
mal_format_f32
)
{
for
(
mal_uint32
iFrame
=
0
;
iFrame
<
frameCount
;
++
iFrame
)
{
for
(
mal_uint32
iFrame
=
0
;
iFrame
<
frameCount
;
++
iFrame
)
{
float
sample
;
float
sample
;
mal_sine_wave_read
(
pData
->
pSineWave
,
1
,
&
sample
);
mal_sine_wave_read
_f32
(
pData
->
pSineWave
,
1
,
&
sample
);
for
(
mal_uint32
iChannel
=
0
;
iChannel
<
pDevice
->
channels
;
++
iChannel
)
{
for
(
mal_uint32
iChannel
=
0
;
iChannel
<
pDevice
->
channels
;
++
iChannel
)
{
((
float
*
)
pFrames
)[
iFrame
*
pDevice
->
channels
+
iChannel
]
=
sample
;
((
float
*
)
pFrames
)[
iFrame
*
pDevice
->
channels
+
iChannel
]
=
sample
;
...
@@ -2360,6 +2361,10 @@ int do_playback_test(mal_backend backend)
...
@@ -2360,6 +2361,10 @@ int do_playback_test(mal_backend backend)
emscripten_set_main_loop
(
main_loop__em
,
0
,
1
);
emscripten_set_main_loop
(
main_loop__em
,
0
,
1
);
#endif
#endif
// Test rapid stopping and restarting.
//mal_device_stop(&device);
//mal_device_start(&device);
mal_event_wait
(
&
callbackData
.
endOfPlaybackEvent
);
// Wait for the sound to finish.
mal_event_wait
(
&
callbackData
.
endOfPlaybackEvent
);
// Wait for the sound to finish.
printf
(
"Done
\n
"
);
printf
(
"Done
\n
"
);
}
}
...
...
tests/mal_test_0.vcxproj
View file @
4e6f702f
...
@@ -270,13 +270,14 @@
...
@@ -270,13 +270,14 @@
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
true
</ExcludedFromBuild>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"..\examples\simple_enumeration.c"
/>
<ClCompile
Include=
"..\examples\simple_playback.c"
>
<ClCompile
Include=
"..\examples\simple_playback.c"
>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
fals
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
tru
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
fals
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
tru
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|ARM'"
>
fals
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|ARM'"
>
tru
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|ARM'"
>
fals
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|ARM'"
>
tru
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
fals
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
tru
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
fals
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
tru
e
</ExcludedFromBuild>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"..\research\tests\mal_resampler_test_0.c"
>
<ClCompile
Include=
"..\research\tests\mal_resampler_test_0.c"
>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
true
</ExcludedFromBuild>
...
@@ -286,6 +287,14 @@
...
@@ -286,6 +287,14 @@
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
true
</ExcludedFromBuild>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"mal_blocking.c"
>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|ARM'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|ARM'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
true
</ExcludedFromBuild>
</ClCompile>
<ClCompile
Include=
"mal_dithering.c"
>
<ClCompile
Include=
"mal_dithering.c"
>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
true
</ExcludedFromBuild>
...
...
tests/mal_test_0.vcxproj.filters
View file @
4e6f702f
...
@@ -45,6 +45,12 @@
...
@@ -45,6 +45,12 @@
<ClCompile
Include=
"..\debugging\source\mal_router_1.c"
>
<ClCompile
Include=
"..\debugging\source\mal_router_1.c"
>
<Filter>
Source Files
</Filter>
<Filter>
Source Files
</Filter>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"mal_blocking.c"
>
<Filter>
Source Files
</Filter>
</ClCompile>
<ClCompile
Include=
"..\examples\simple_enumeration.c"
>
<Filter>
Source Files
</Filter>
</ClCompile>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<ClInclude
Include=
"..\mini_al.h"
>
<ClInclude
Include=
"..\mini_al.h"
>
...
...
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