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
6548f4e2
Commit
6548f4e2
authored
Jan 27, 2019
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set up some infrastructure for separate in/out device IDs.
parent
e8e41984
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
393 additions
and
190 deletions
+393
-190
mini_al.h
mini_al.h
+372
-174
tests/mal_duplex.c
tests/mal_duplex.c
+4
-2
tests/mal_test_0.c
tests/mal_test_0.c
+5
-2
tests/mal_test_0.vcxproj
tests/mal_test_0.vcxproj
+12
-12
No files found.
mini_al.h
View file @
6548f4e2
This diff is collapsed.
Click to expand it.
tests/mal_duplex.c
View file @
6548f4e2
...
@@ -32,7 +32,9 @@ int main(int argc, char** argv)
...
@@ -32,7 +32,9 @@ int main(int argc, char** argv)
mal_backend
backend
=
mal_backend_wasapi
;
mal_backend
backend
=
mal_backend_wasapi
;
mal_context_config
contextConfig
=
mal_context_config_init
(
log_callback
);
mal_context_config
contextConfig
=
mal_context_config_init
();
contextConfig
.
logCallback
=
log_callback
;
mal_context
context
;
mal_context
context
;
result
=
mal_context_init
(
&
backend
,
1
,
&
contextConfig
,
&
context
);
result
=
mal_context_init
(
&
backend
,
1
,
&
contextConfig
,
&
context
);
if
(
result
!=
MAL_SUCCESS
)
{
if
(
result
!=
MAL_SUCCESS
)
{
...
@@ -41,7 +43,7 @@ int main(int argc, char** argv)
...
@@ -41,7 +43,7 @@ int main(int argc, char** argv)
}
}
mal_device_config
deviceConfig
=
mal_device_config_init
(
mal_device_type_duplex
);
mal_device_config
deviceConfig
=
mal_device_config_init
(
mal_device_type_duplex
);
deviceConfig
.
pDeviceID
=
NULL
;
deviceConfig
.
p
Playback
DeviceID
=
NULL
;
deviceConfig
.
format
=
mal_format_f32
;
deviceConfig
.
format
=
mal_format_f32
;
deviceConfig
.
channels
=
2
;
deviceConfig
.
channels
=
2
;
deviceConfig
.
sampleRate
=
44100
;
deviceConfig
.
sampleRate
=
44100
;
...
...
tests/mal_test_0.c
View file @
6548f4e2
...
@@ -2117,7 +2117,8 @@ int do_backend_test(mal_backend backend)
...
@@ -2117,7 +2117,8 @@ int do_backend_test(mal_backend backend)
// Context.
// Context.
printf
(
" Creating Context... "
);
printf
(
" Creating Context... "
);
{
{
mal_context_config
contextConfig
=
mal_context_config_init
(
on_log
);
mal_context_config
contextConfig
=
mal_context_config_init
();
contextConfig
.
logCallback
=
on_log
;
result
=
mal_context_init
(
&
backend
,
1
,
&
contextConfig
,
&
context
);
result
=
mal_context_init
(
&
backend
,
1
,
&
contextConfig
,
&
context
);
if
(
result
==
MAL_SUCCESS
)
{
if
(
result
==
MAL_SUCCESS
)
{
...
@@ -2285,7 +2286,9 @@ int do_playback_test(mal_backend backend)
...
@@ -2285,7 +2286,9 @@ int do_playback_test(mal_backend backend)
// Device.
// Device.
printf
(
" Opening Device... "
);
printf
(
" Opening Device... "
);
{
{
mal_context_config
contextConfig
=
mal_context_config_init
(
on_log
);
mal_context_config
contextConfig
=
mal_context_config_init
();
contextConfig
.
logCallback
=
on_log
;
mal_device_config
deviceConfig
=
mal_device_config_init
(
mal_device_type_playback
);
mal_device_config
deviceConfig
=
mal_device_config_init
(
mal_device_type_playback
);
deviceConfig
.
pUserData
=
&
callbackData
;
deviceConfig
.
pUserData
=
&
callbackData
;
deviceConfig
.
dataCallback
=
on_send__playback_test
;
deviceConfig
.
dataCallback
=
on_send__playback_test
;
...
...
tests/mal_test_0.vcxproj
View file @
6548f4e2
...
@@ -319,12 +319,12 @@
...
@@ -319,12 +319,12 @@
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
true
</ExcludedFromBuild>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"mal_duplex.c"
>
<ClCompile
Include=
"mal_duplex.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=
"mal_no_device_io.c"
>
<ClCompile
Include=
"mal_no_device_io.c"
>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
true
</ExcludedFromBuild>
...
@@ -359,12 +359,12 @@
...
@@ -359,12 +359,12 @@
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
true
</ExcludedFromBuild>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"mal_test_0.c"
>
<ClCompile
Include=
"mal_test_0.c"
>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
tru
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
fals
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|ARM'"
>
tru
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|ARM'"
>
fals
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
tru
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
fals
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|ARM'"
>
tru
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|ARM'"
>
fals
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
tru
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
fals
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
tru
e
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
fals
e
</ExcludedFromBuild>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"mal_test_0.cpp"
>
<ClCompile
Include=
"mal_test_0.cpp"
>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
true
</ExcludedFromBuild>
...
...
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