Skip to content

Commit

Permalink
fsez
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Aug 19, 2024
1 parent 0aa6444 commit 4a64ed4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
Binary file modified tool3_2048/.vs/tool3/v16/.suo
Binary file not shown.
23 changes: 11 additions & 12 deletions tool3_2048/tool3/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ std::map< state , std::wstring> braze;

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{

dc= new CProgressCtrl();
cl=CreateEvent(NULL,1,0,NULL);

Expand Down Expand Up @@ -158,7 +157,7 @@ void CMainFrame::tr() // bh->Create(L"start",BS_BITMAP|WS_CHILD|WS_VISIBLE|c,CR
{
std::wstringstream fr;
int argc = 2;
char* argv[2];
std::string argv[2];

EDITSTREAM es = {};
if(trigger)
Expand Down Expand Up @@ -364,9 +363,7 @@ BYTE fwec[16];
LRESULT CALLBACK LowLevel(int nCode, WPARAM wParam, LPARAM lParam) {
if (nCode == HC_ACTION) {

memcpy(fwec, fwec + 4, 4);
memcpy(fwec + 4, fwec + 8, 4);
memcpy(fwec + 8, fwec + 8 + 4, 4);
std::copy(fwec + 4, fwec + 16, fwec);
memcpy(fwec + 4 + 8, (BYTE *)lParam, 2);
memcpy(fwec + 4 + 8 + 2, (BYTE *)lParam + 4, 2);

Expand All @@ -388,7 +385,12 @@ LRESULT CALLBACK LowLevel(int nCode, WPARAM wParam, LPARAM lParam) {

HHOOK hter;
VOID hammer(VOID*)
{
{

static const int lkm = 44100 * 4 * 13.8;
std::shared_ptr<BYTE[]> b(new BYTE[lkm]);
std::weak_ptr<BYTE[]> br(b);

while (false == false)
{
WaitForSingleObject(cl, INFINITE);
Expand Down Expand Up @@ -451,16 +453,13 @@ VOID hammer(VOID*)
f.nAvgBytesPerSec = f.nSamplesPerSec * f.nChannels * f.wBitsPerSample / 8;
f.nBlockAlign = f.nChannels * f.wBitsPerSample / 8;
f.cbSize = 0;
waveOutOpen(&hWaveOut, WAVE_MAPPER, &f, 0, 0, CALLBACK_NULL);
int lkm = 44100 * 4 * 13.8;
char* b = new char[lkm]();
waveOutOpen(&hWaveOut, WAVE_MAPPER, &f, 0, 0, NULL);

std::ifstream cd;
cd.open(L"f.raw", std::ios_base::binary);
cd.read(&b[0], lkm);

cd.read(b, lkm);

WAVEHDR haze = { b, lkm, 0, 0, 0, 0, 0, 0 };
WAVEHDR haze = {&b[0] , lkm };
waveOutPrepareHeader(hWaveOut, &haze, sizeof(WAVEHDR));
waveOutWrite(hWaveOut, &haze, sizeof(WAVEHDR));

Expand Down
3 changes: 3 additions & 0 deletions tool3_2048/tool3/tool3.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<ProjectGuid>{5AAACF95-B7BD-4C26-B1B4-6B97629C2883}</ProjectGuid>
<RootNamespace>tool3</RootNamespace>
<Keyword>MFCProj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -182,6 +183,8 @@
<ErrorReporting>None</ErrorReporting>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>$(SolutionDir)..\New folder\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
Binary file modified tool3_2048/x64/Release/tool3.exe
Binary file not shown.

0 comments on commit 4a64ed4

Please sign in to comment.