From 84bea0fac3633cf7f45e0aec3506e61d6575a8a7 Mon Sep 17 00:00:00 2001 From: casey langen Date: Tue, 28 Jan 2020 21:34:02 -0800 Subject: [PATCH] core_c_demo is compiling on Windows now. --- musikcube.sln | 10 + src/core/core.vcxproj | 8 +- src/core_c_demo/core_c_demo.rc | Bin 0 -> 4896 bytes src/core_c_demo/core_c_demo.vcxproj | 295 ++++++++++++++++++++ src/core_c_demo/core_c_demo.vcxproj.filters | 26 ++ src/core_c_demo/icon.ico | Bin 0 -> 14830 bytes src/core_c_demo/main.c | 26 +- src/core_c_demo/resource.h | Bin 0 -> 906 bytes 8 files changed, 357 insertions(+), 8 deletions(-) create mode 100644 src/core_c_demo/core_c_demo.rc create mode 100644 src/core_c_demo/core_c_demo.vcxproj create mode 100644 src/core_c_demo/core_c_demo.vcxproj.filters create mode 100644 src/core_c_demo/icon.ico create mode 100644 src/core_c_demo/resource.h diff --git a/musikcube.sln b/musikcube.sln index 63a0b912a..534eaad3e 100644 --- a/musikcube.sln +++ b/musikcube.sln @@ -54,6 +54,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "supereqdsp", "src\plugins\s EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmedecoder", "src\plugins\gmedecoder\gmedecoder.vcxproj", "{89FD1021-21B5-44EB-BDBE-70381ADE8522}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_c_demo", "src\core_c_demo\core_c_demo.vcxproj", "{DC9DBE2C-1277-4B5A-853C-8FBDF595E8FC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -198,6 +200,14 @@ Global {89FD1021-21B5-44EB-BDBE-70381ADE8522}.Release|Win32.Build.0 = Release|Win32 {89FD1021-21B5-44EB-BDBE-70381ADE8522}.Release|x64.ActiveCfg = Release|x64 {89FD1021-21B5-44EB-BDBE-70381ADE8522}.Release|x64.Build.0 = Release|x64 + {DC9DBE2C-1277-4B5A-853C-8FBDF595E8FC}.Debug|Win32.ActiveCfg = Debug|Win32 + {DC9DBE2C-1277-4B5A-853C-8FBDF595E8FC}.Debug|Win32.Build.0 = Debug|Win32 + {DC9DBE2C-1277-4B5A-853C-8FBDF595E8FC}.Debug|x64.ActiveCfg = Debug|x64 + {DC9DBE2C-1277-4B5A-853C-8FBDF595E8FC}.Debug|x64.Build.0 = Debug|x64 + {DC9DBE2C-1277-4B5A-853C-8FBDF595E8FC}.Release|Win32.ActiveCfg = Release|Win32 + {DC9DBE2C-1277-4B5A-853C-8FBDF595E8FC}.Release|Win32.Build.0 = Release|Win32 + {DC9DBE2C-1277-4B5A-853C-8FBDF595E8FC}.Release|x64.ActiveCfg = Release|x64 + {DC9DBE2C-1277-4B5A-853C-8FBDF595E8FC}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/core/core.vcxproj b/src/core/core.vcxproj index 2a202d217..a142f1809 100755 --- a/src/core/core.vcxproj +++ b/src/core/core.vcxproj @@ -95,7 +95,7 @@ Disabled ./;../;../3rdparty/include/;../3rdparty/win32_include;../../../boost_1_71_0;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;XML_STATIC;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;MCSDK_DEFINE_EXPORTS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -113,7 +113,7 @@ Disabled ./;../;../3rdparty/include/;../3rdparty/win32_include;../../../boost_1_71_0;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;XML_STATIC;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;MCSDK_DEFINE_EXPORTS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug Use @@ -133,7 +133,7 @@ true Speed ./;../;../3rdparty/include/;../3rdparty/win32_include;../../../boost_1_71_0;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_DEPRECATE;XML_STATIC;%(PreprocessorDefinitions) + WIN32;_CRT_SECURE_NO_DEPRECATE;MCSDK_DEFINE_EXPORTS;%(PreprocessorDefinitions) MultiThreaded Use pch.hpp @@ -152,7 +152,7 @@ true Speed ./;../;../3rdparty/include/;../3rdparty/win32_include;../../../boost_1_71_0;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_DEPRECATE;XML_STATIC;%(PreprocessorDefinitions) + WIN32;_CRT_SECURE_NO_DEPRECATE;MCSDK_DEFINE_EXPORTS;%(PreprocessorDefinitions) MultiThreaded Use pch.hpp diff --git a/src/core_c_demo/core_c_demo.rc b/src/core_c_demo/core_c_demo.rc new file mode 100644 index 0000000000000000000000000000000000000000..a82d6fb18b45ffb470b63fd039e15dabb5eb44a1 GIT binary patch literal 4896 zcmdUzTW=CU6vxkVKgGJfXly98KImhwNTkq|OEhUhYFjEvxr7C+iJx8l{bv}Kg)O1A z517gB?97}wbLL$B=fI!eJGNtyom$tfY-9sVcse#_uEktp6T7rKMu+x>7TK-cSf6La z{Fwflxe>kgP58RvJ7OemT^mAEur1Em;r)`CJ}Y-nUOT#YX>Y;4Sq!bHMbmM6#B<-y ztZof!+L4v5W^FsSV`h)|u3E*uFjMD!Y6r|z`1a@O?9FRICz33(5;tAcY6sm6tjFpY zok#->?)#Z{nfo4cLuule`L{faHdw9oA5N=&Ppa|F(^8N~-Y`K!-Xoso3!Co^5!UPz zVRu+3!RC>@!p40@A=2u6`M68$b&l1OY23 zcD5W!JdST3UdOhK9kE@2KNonakUN!YS%$qw-)&vaFCBtj6D#t3-{c8-Sh46i($402 zO^_&fhQCdj{5e3=Vb=E%KH=vhXCGyZ2pkzOQf^j0FXIQ1eRuhM;_}H5ic9wSEUrvD zn$nKh899xr0#Kfapd8YKO;-+sx=xPBjZ=wyCh9?L*lnjNE*BR9ux7x z72QG6o_AtC*Kp$__Rar-@E)FWA2>v6b57gU2fYRD1n!~F${tS1#!uj01byV|1$3on zed%Q<;oFE_xVEg7Jh=<(xaV2_oC?&p?gUw3i2mgRcr53^$Ed*Z@vX7Lod8ll;%}V&+%&{R56>^tLjrz xmD_O|(7z4q)Qg*UmmpE70yO^De-%`#Km4!4rq|35dv%{^Q3bmEf70^rg1-(~TjKx# literal 0 HcmV?d00001 diff --git a/src/core_c_demo/core_c_demo.vcxproj b/src/core_c_demo/core_c_demo.vcxproj new file mode 100644 index 000000000..c8ba43389 --- /dev/null +++ b/src/core_c_demo/core_c_demo.vcxproj @@ -0,0 +1,295 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + core_c_demo + {DC9DBE2C-1277-4B5A-853C-8FBDF595E8FC} + core_c_demo + Win32Proj + 10.0.17763.0 + + + + Application + Unicode + true + v141 + + + Application + Unicode + true + v141 + + + Application + false + false + Unicode + v141 + false + + + Application + false + false + Unicode + v141 + false + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)/bin32/$(Configuration)/ + ./obj32/$(Configuration)/ + true + true + $(SolutionDir)/bin32/$(Configuration)/ + ./obj32/$(Configuration)/ + false + false + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + $(SolutionDir)/bin64/$(Configuration)/ + ./obj64/$(Configuration)/ + + + $(SolutionDir)/bin64/$(Configuration)/ + ./obj64/$(Configuration)/ + + + + Disabled + ./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../../../boost_1_71_0;%(AdditionalIncludeDirectories) + WIN32;CURL_STATICLIB;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + NotUsing + Level3 + EditAndContinue + $(IntDir) + $(IntDir) + $(IntDir)vc$(PlatformToolsetVersion).pdb + true + + + + ../../../boost_1_71_0/lib32-msvc-14.1;../3rdparty/bin/win32/lib;../3rdparty/bin/win32/lib/debug;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + true + Console + + + MachineX86 + pdh.lib;psapi.lib;Ws2_32.lib;wldap32.lib;Comctl32.lib;libcurl.lib;%(AdditionalDependencies) + false + + + if not exist "$(TargetDir)themes" mkdir "$(TargetDir)themes" +xcopy "$(ProjectDir)data\themes\*" "$(TargetDir)themes\" /Y /e +if not exist "$(TargetDir)locales" mkdir "$(TargetDir)locales" +xcopy "$(ProjectDir)data\locales\*" "$(TargetDir)locales\" /Y /e +xcopy "$(SolutionDir)src\3rdparty\bin\win32\dll\ffmpeg\*" "$(TargetDir)" /Y /e +xcopy "$(SolutionDir)src\3rdparty\bin\win32\dll\lame\*" "$(TargetDir)" /Y /e +xcopy "$(SolutionDir)src\3rdparty\bin\win32\dll\libcurl\*" "$(TargetDir)" /Y /e +if not exist "$(TargetDir)fonts" mkdir "$(TargetDir)fonts" +xcopy "$(SolutionDir)src\3rdparty\bin\win\font\*.ttf" "$(TargetDir)fonts\" /Y /e + + + + + Disabled + ./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../../../boost_1_71_0;%(AdditionalIncludeDirectories) + WIN32;CURL_STATICLIB;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + NotUsing + Level3 + ProgramDatabase + $(IntDir) + $(IntDir) + $(IntDir)vc$(PlatformToolsetVersion).pdb + true + + + + ../../../boost_1_71_0/lib64-msvc-14.1;../3rdparty/bin/win64/lib;../3rdparty/bin/win64/lib/debug;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + true + Console + + + pdh.lib;psapi.lib;Ws2_32.lib;wldap32.lib;Comctl32.lib;libcurl.lib;%(AdditionalDependencies) + false + + + if not exist "$(TargetDir)themes" mkdir "$(TargetDir)themes" +xcopy "$(ProjectDir)data\themes\*" "$(TargetDir)themes\" /Y /e +if not exist "$(TargetDir)locales" mkdir "$(TargetDir)locales" +xcopy "$(ProjectDir)data\locales\*" "$(TargetDir)locales\" /Y /e +xcopy "$(SolutionDir)src\3rdparty\bin\win64\dll\ffmpeg\*" "$(TargetDir)" /Y /e +xcopy "$(SolutionDir)src\3rdparty\bin\win64\dll\lame\*" "$(TargetDir)" /Y /e +xcopy "$(SolutionDir)src\3rdparty\bin\win64\dll\libcurl\*" "$(TargetDir)" /Y /e +if not exist "$(TargetDir)fonts" mkdir "$(TargetDir)fonts" +xcopy "$(SolutionDir)src\3rdparty\bin\win\font\*.ttf" "$(TargetDir)fonts\" /Y /e + + + + + ./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../../../boost_1_71_0;%(AdditionalIncludeDirectories) + WIN32;CURL_STATICLIB;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreaded + NotUsing + Level3 + ProgramDatabase + $(IntDir) + $(IntDir) + $(IntDir)vc$(PlatformToolsetVersion).pdb + Speed + true + Full + true + true + Sync + + + + ../../../boost_1_71_0/lib32-msvc-14.1;../3rdparty/bin/win32/lib;../3rdparty/bin/win32/lib/release;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + false + Console + + + + + + + MachineX86 + pdh.lib;psapi.lib;Ws2_32.lib;wldap32.lib;Comctl32.lib;libcurl.lib;%(AdditionalDependencies) + true + + + if not exist "$(TargetDir)themes" mkdir "$(TargetDir)themes" +xcopy "$(ProjectDir)data\themes\*" "$(TargetDir)themes\" /Y /e +if not exist "$(TargetDir)locales" mkdir "$(TargetDir)locales" +xcopy "$(ProjectDir)data\locales\*" "$(TargetDir)locales\" /Y /e +xcopy "$(SolutionDir)src\3rdparty\bin\win32\dll\ffmpeg\*" "$(TargetDir)" /Y /e +xcopy "$(SolutionDir)src\3rdparty\bin\win32\dll\lame\*" "$(TargetDir)" /Y /e +xcopy "$(SolutionDir)src\3rdparty\bin\win32\dll\libcurl\*" "$(TargetDir)" /Y /e +if not exist "$(TargetDir)fonts" mkdir "$(TargetDir)fonts" +xcopy "$(SolutionDir)src\3rdparty\bin\win\font\*.ttf" "$(TargetDir)fonts\" /Y /e + + + + + ./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../../../boost_1_71_0;%(AdditionalIncludeDirectories) + WIN32;CURL_STATICLIB;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreaded + NotUsing + Level3 + ProgramDatabase + $(IntDir) + $(IntDir) + $(IntDir)vc$(PlatformToolsetVersion).pdb + Speed + true + Full + true + true + Sync + + + + ../../../boost_1_71_0/lib64-msvc-14.1;../3rdparty/bin/win64/lib;../3rdparty/bin/win64/lib/release;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + false + Console + + + + + + + pdh.lib;psapi.lib;Ws2_32.lib;wldap32.lib;Comctl32.lib;libcurl.lib;%(AdditionalDependencies) + false + + + if not exist "$(TargetDir)themes" mkdir "$(TargetDir)themes" +xcopy "$(ProjectDir)data\themes\*" "$(TargetDir)themes\" /Y /e +if not exist "$(TargetDir)locales" mkdir "$(TargetDir)locales" +xcopy "$(ProjectDir)data\locales\*" "$(TargetDir)locales\" /Y /e +xcopy "$(SolutionDir)src\3rdparty\bin\win64\dll\ffmpeg\*" "$(TargetDir)" /Y /e +xcopy "$(SolutionDir)src\3rdparty\bin\win64\dll\lame\*" "$(TargetDir)" /Y /e +xcopy "$(SolutionDir)src\3rdparty\bin\win64\dll\libcurl\*" "$(TargetDir)" /Y /e +if not exist "$(TargetDir)fonts" mkdir "$(TargetDir)fonts" +xcopy "$(SolutionDir)src\3rdparty\bin\win\font\*.ttf" "$(TargetDir)fonts\" /Y /e + + + + + {b2165720-b4b2-4f4b-8888-8c390c3cb4db} + false + + + {b2165720-b4b2-4f4b-9634-8c390c3cb4db} + false + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/core_c_demo/core_c_demo.vcxproj.filters b/src/core_c_demo/core_c_demo.vcxproj.filters new file mode 100644 index 000000000..400b52528 --- /dev/null +++ b/src/core_c_demo/core_c_demo.vcxproj.filters @@ -0,0 +1,26 @@ + + + + + {2c3b4873-a5d1-4aad-9902-8d403857cca3} + + + {f520399d-3c2e-4ede-8497-d1518fddbbab} + + + + + src + + + + + res + + + + + res + + + \ No newline at end of file diff --git a/src/core_c_demo/icon.ico b/src/core_c_demo/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..d86629c3e0f79523f10a789cdc8d39776fe9daae GIT binary patch literal 14830 zcmeHOF^Ci~6pbDh7QzW990;-px+;iVbzpa#U?;X`BNi6IqNSDKbz)_w&7xo-a)tHT zSy)&J+u3Ymcm4L`e>1-DHx0mNzj-xX3eax86$S+ z#+Y6Y<(~N>^&g~ed;4Gcnlbk_jJY8?@=7!cI}v7A^xWrX^~Y@@TrS#{_h+{*^?$s* z{pa(o-yb(#J`7n{{R@xoigNK!OhkY4&6A?2&8@yDT>bXinh2cD7v=?`*0&r))6y%f z&fU2l*SEHkx%un;%IV8kST~m8U${jyWfW%Wi#M)(dLe3d2;%;+&OCpAM+{}WO6prf zn<>V((qC&^GlO~7le8-d^AXPhCSD64aZJ`kqAQxf2BwQIWz;24>~Du(ctH6hx$iN) z3NI(1%B{zjl`xY9G?R5SleM}QU)A4A{g+?g92@vdvhr8vP!}I#CqGdZ8yw_k;RHVX zf_kLO@1C7_KM%fq5@Z|$`T)FiVm+mNf=s=ig+CY!ve9Ui_51xPJB@)n$HT2hpNUN= zKccp+S@>x0=;$arK0eO&_xG)xixa|!9^wKqN_^N@;lza_rRALWnW8X}4dd#CWG@L9hsS@hnRW#PFv#BWmK+u}fu2%1R1#yN!?5t_%6 z>^X&;6?RWMJ>bT0+sm#O+s@bJ7veAV3tNv>hmF=T`K;-!W_o@B_Ey>`*@%(bk5|St84p|{51~poEL6A z%Y5&fH@^D`*tLm2_=L{ZFm~*xmR0%Ve0@9~NADYS`#Mkm>N+=%xgY9-tBZ0~{;d;_}UEBmEliY=ptq?e~?1+z7Bt2a2#;=gL8P|#$*-#x}BI^UH)vJV=>P?8rurV zl>C7S|KkbWf00*=2X%ZhX7|7Pf0g5(F`sh%(Q&lM_@Uop_stqx=VLsyo|})^%^UwN zR;)}O*azr)`j`#g(axvW1b=?t;JXgLwfLO^$Iu?Ft^C;!E%BYR_4QT$-OMpsCH}fE z%*VdFml;3U4 +#endif #include -#include #include -#define INPUT_FILE "/home/clangen/in.opus" -#define OUTPUT_FILE "/home/clangen/out.flac" +#ifdef WIN32 + #define INPUT_FILE "c:\\clangen\\in.mp3" + #define OUTPUT_FILE "c:\\clangen\\out.opus" +#elif defined __APPLE__ + #define INPUT_FILE "/Users/clangen/in.mp3" + #define OUTPUT_FILE "/Users/clangen/out.opus" +#else + #define INPUT_FILE "/home/clangen/in.mp3" + #define OUTPUT_FILE "/home/clangen/out.mp3" +#endif + +static void internal_sleep(int seconds) { +#ifdef WIN32 + Sleep(seconds * 1000); +#else + usleep(1000000); +#endif +} static void test_decode_encode() { mcsdk_data_stream in = mcsdk_env_open_data_stream(INPUT_FILE, mcsdk_stream_open_flags_read); @@ -44,7 +62,7 @@ static void test_playback(mcsdk_context* context) { mcsdk_track_list_release(tl); printf("test_playback: playing for 5 seconds...\n"); for (int i = 0; i < 5; i++) { - usleep(1000000); + internal_sleep(1); printf(" %d\n", i + 1); } printf("test_playback: done.\n"); diff --git a/src/core_c_demo/resource.h b/src/core_c_demo/resource.h new file mode 100644 index 0000000000000000000000000000000000000000..1c86ad6a6ab67e36b0d1dd26981bb5ab7167e368 GIT binary patch literal 906 zcmb7?-%i3%4934}6W`$^T$+d&Utn%r5Mdg}h+Zv%%%CXA#{3iGtE<26KtzH>(sZY7 z+OJ>ReSJ37)H@RET$v)Zb%DmU6)RK+FVP3GuRU^`a_VWKkqXUJqPgb82EGme_>Ih^z{4jGq&kVjZq@NWt>iL%osnNOnoy1C^DAb#{ThJ+E=knW}=j&Hr3aUJ)(va`sa28j}~^ z8JzF2N92|(c%Ju!e2?c8u>VATr8RrINr$cjCOG2~QC-_$#vJUwYc9zR$hNt=x&|fT z+tVqLF7~E