Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cf741ea

Browse files
author
U-NVIDIA.COM\sahils
committed
discrete fourier transform from mic. sort of ready for today's demo
1 parent 0182246 commit cf741ea

File tree

68 files changed

+135943
-183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+135943
-183
lines changed

‎5.Hexcalc/hexcalc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
125125
case WM_DESTROY:
126126
PostQuitMessage(0);
127127
return 0;
128-
default:
128+
default:
129129
break;
130130
}
131131
return DefWindowProc(hwnd, message, wParam, lParam);

‎6.POPPAD/6.POPPAD.vcxproj‎

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>15.0</VCProjectVersion>
23+
<ProjectGuid>{58E6388F-7CA2-4008-B6AA-926DB2CF3761}</ProjectGuid>
24+
<RootNamespace>My6POPPAD</RootNamespace>
25+
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
26+
</PropertyGroup>
27+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
29+
<ConfigurationType>Application</ConfigurationType>
30+
<UseDebugLibraries>true</UseDebugLibraries>
31+
<PlatformToolset>v141</PlatformToolset>
32+
<CharacterSet>MultiByte</CharacterSet>
33+
</PropertyGroup>
34+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
35+
<ConfigurationType>Application</ConfigurationType>
36+
<UseDebugLibraries>false</UseDebugLibraries>
37+
<PlatformToolset>v141</PlatformToolset>
38+
<WholeProgramOptimization>true</WholeProgramOptimization>
39+
<CharacterSet>MultiByte</CharacterSet>
40+
</PropertyGroup>
41+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
42+
<ConfigurationType>Application</ConfigurationType>
43+
<UseDebugLibraries>true</UseDebugLibraries>
44+
<PlatformToolset>v141</PlatformToolset>
45+
<CharacterSet>MultiByte</CharacterSet>
46+
</PropertyGroup>
47+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
48+
<ConfigurationType>Application</ConfigurationType>
49+
<UseDebugLibraries>false</UseDebugLibraries>
50+
<PlatformToolset>v141</PlatformToolset>
51+
<WholeProgramOptimization>true</WholeProgramOptimization>
52+
<CharacterSet>MultiByte</CharacterSet>
53+
</PropertyGroup>
54+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
55+
<ImportGroup Label="ExtensionSettings">
56+
</ImportGroup>
57+
<ImportGroup Label="Shared">
58+
</ImportGroup>
59+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
60+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
61+
</ImportGroup>
62+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
63+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
64+
</ImportGroup>
65+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
66+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
67+
</ImportGroup>
68+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
69+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
70+
</ImportGroup>
71+
<PropertyGroup Label="UserMacros" />
72+
<PropertyGroup />
73+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
74+
<ClCompile>
75+
<WarningLevel>Level3</WarningLevel>
76+
<Optimization>Disabled</Optimization>
77+
<SDLCheck>true</SDLCheck>
78+
<ConformanceMode>true</ConformanceMode>
79+
</ClCompile>
80+
</ItemDefinitionGroup>
81+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
82+
<ClCompile>
83+
<WarningLevel>Level3</WarningLevel>
84+
<Optimization>Disabled</Optimization>
85+
<SDLCheck>true</SDLCheck>
86+
<ConformanceMode>true</ConformanceMode>
87+
</ClCompile>
88+
</ItemDefinitionGroup>
89+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
90+
<ClCompile>
91+
<WarningLevel>Level3</WarningLevel>
92+
<Optimization>MaxSpeed</Optimization>
93+
<FunctionLevelLinking>true</FunctionLevelLinking>
94+
<IntrinsicFunctions>true</IntrinsicFunctions>
95+
<SDLCheck>true</SDLCheck>
96+
<ConformanceMode>true</ConformanceMode>
97+
</ClCompile>
98+
<Link>
99+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
100+
<OptimizeReferences>true</OptimizeReferences>
101+
</Link>
102+
</ItemDefinitionGroup>
103+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
104+
<ClCompile>
105+
<WarningLevel>Level3</WarningLevel>
106+
<Optimization>MaxSpeed</Optimization>
107+
<FunctionLevelLinking>true</FunctionLevelLinking>
108+
<IntrinsicFunctions>true</IntrinsicFunctions>
109+
<SDLCheck>true</SDLCheck>
110+
<ConformanceMode>true</ConformanceMode>
111+
</ClCompile>
112+
<Link>
113+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
114+
<OptimizeReferences>true</OptimizeReferences>
115+
</Link>
116+
</ItemDefinitionGroup>
117+
<ItemGroup>
118+
<ClCompile Include="poppadd.c" />
119+
</ItemGroup>
120+
<ItemGroup>
121+
<ClInclude Include="resource.h" />
122+
</ItemGroup>
123+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
124+
<ImportGroup Label="ExtensionTargets">
125+
</ImportGroup>
126+
</Project>

‎6.POPPAD/6.POPPAD.vcxproj.filters‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="poppadd.c">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
</ItemGroup>
22+
<ItemGroup>
23+
<ClInclude Include="resource.h">
24+
<Filter>Resource Files</Filter>
25+
</ClInclude>
26+
</ItemGroup>
27+
</Project>

‎6.POPPAD/poppadd.c‎

Whitespace-only changes.

‎6.POPPAD/resource.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#pragma once
Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,72 @@
1-
#include <Windows.h>
2-
#include <iostream>
3-
#include <string>
4-
#include "..\DLL_Math\MyMath.h"
5-
6-
using namespace std;
7-
8-
LRESULT WndProc(HWND, UINT, WPARAM, LPARAM);
9-
10-
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int iCmdShow)
11-
{
12-
WNDCLASSEX wndclass;
13-
memset(&wndclass, 0, sizeof(wndclass));
14-
TCHAR className[] = TEXT("MyWindow");
15-
16-
17-
wndclass.cbSize = sizeof(wndclass);
18-
wndclass.lpfnWndProc = WndProc;
19-
wndclass.lpszClassName = className;
20-
wndclass.style = CS_HREDRAW | CS_VREDRAW;
21-
22-
RegisterClassEx(&wndclass);
23-
24-
HWND hWnd = CreateWindow(className, TEXT("Using Math DLL"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
25-
26-
ShowWindow(hWnd, iCmdShow);
27-
UpdateWindow(hWnd);
28-
29-
MSG msg;
30-
while (GetMessage(&msg, NULL, 0, 0))
31-
{
32-
TranslateMessage(&msg);
33-
DispatchMessage(&msg);
34-
}
35-
36-
return (int)msg.wParam;
37-
}
38-
39-
LRESULT WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
40-
{
41-
switch (iMsg)
42-
{
43-
case WM_CHAR:
44-
{
45-
string s;
46-
s.append((char*)&wParam);
47-
char c = '0円';
48-
s.append(&c);
49-
int res = MySquare((int)(wParam - '0'));
50-
MessageBoxA(NULL, (s+string(" square is ")+to_string(res)).c_str(), "Calculate Square...", MB_OK);
51-
52-
}
53-
break;
54-
case WM_PAINT:
55-
{
56-
PAINTSTRUCT ps;
57-
auto hDc = BeginPaint(hWnd, &ps);
58-
RECT rc;
59-
GetWindowRect(hWnd, &rc);
60-
GetWindowRect(hWnd, &rc);
61-
DrawText(hDc, "Press nums 1..9 on keyboard...", -1, &rc, DT_CENTER | DT_VCENTER);
62-
}
63-
break;
64-
case WM_DESTROY:
65-
PostQuitMessage(0);
66-
break;
67-
default:
68-
break;
69-
}
70-
71-
return DefWindowProc(hWnd, iMsg, wParam, lParam);
1+
#include <Windows.h>
2+
#include <iostream>
3+
#include <string>
4+
#include "..\DLL_Math\MyMath.h"
5+
6+
using namespace std;
7+
8+
LRESULT WndProc(HWND, UINT, WPARAM, LPARAM);
9+
10+
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int iCmdShow)
11+
{
12+
WNDCLASSEX wndclass;
13+
memset(&wndclass, 0, sizeof(wndclass));
14+
TCHAR className[] = TEXT("MyWindow");
15+
16+
17+
wndclass.cbSize = sizeof(wndclass);
18+
wndclass.lpfnWndProc = WndProc;
19+
wndclass.lpszClassName = className;
20+
wndclass.style = CS_HREDRAW | CS_VREDRAW;
21+
22+
RegisterClassEx(&wndclass);
23+
24+
HWND hWnd = CreateWindow(className, TEXT("Using Math DLL"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
25+
26+
ShowWindow(hWnd, iCmdShow);
27+
UpdateWindow(hWnd);
28+
29+
MSG msg;
30+
while (GetMessage(&msg, NULL, 0, 0))
31+
{
32+
TranslateMessage(&msg);
33+
DispatchMessage(&msg);
34+
}
35+
36+
return (int)msg.wParam;
37+
}
38+
39+
LRESULT WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
40+
{
41+
switch (iMsg)
42+
{
43+
case WM_CHAR:
44+
{
45+
string s;
46+
s.append((char*)&wParam);
47+
char c = '0円';
48+
s.append(&c);
49+
int res = MySquare((int)(wParam - '0'));
50+
MessageBoxA(NULL, (s+string(" square is ")+to_string(res)).c_str(), "Calculate Square...", MB_OK);
51+
52+
}
53+
break;
54+
case WM_PAINT:
55+
{
56+
PAINTSTRUCT ps;
57+
auto hDc = BeginPaint(hWnd, &ps);
58+
RECT rc;
59+
GetWindowRect(hWnd, &rc);
60+
GetWindowRect(hWnd, &rc);
61+
DrawText(hDc, "Press nums 1..9 on keyboard...", -1, &rc, DT_CENTER | DT_VCENTER);
62+
}
63+
break;
64+
case WM_DESTROY:
65+
PostQuitMessage(0);
66+
break;
67+
default:
68+
break;
69+
}
70+
71+
return DefWindowProc(hWnd, iMsg, wParam, lParam);
7272
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /