Commit 6548f4e2 authored by David Reid's avatar David Reid

Set up some infrastructure for separate in/out device IDs.

parent e8e41984
This diff is collapsed.
...@@ -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.pPlaybackDeviceID = NULL;
deviceConfig.format = mal_format_f32; deviceConfig.format = mal_format_f32;
deviceConfig.channels = 2; deviceConfig.channels = 2;
deviceConfig.sampleRate = 44100; deviceConfig.sampleRate = 44100;
......
...@@ -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;
......
...@@ -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'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</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'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment