From 3640860046edc82b9123f247695a778672940acb Mon Sep 17 00:00:00 2001 From: 0TheSpy <5511c282@opayq.com> Date: Fri, 25 Nov 2022 01:24:21 +0300 Subject: [PATCH] Update Interfaces.cpp --- SpyCustom/Interfaces.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SpyCustom/Interfaces.cpp b/SpyCustom/Interfaces.cpp index 11aa6b9..abbe355 100644 --- a/SpyCustom/Interfaces.cpp +++ b/SpyCustom/Interfaces.cpp @@ -278,3 +278,15 @@ void ShowMenu(std::string text) } +//if sv_voicecodec = vaudio_celt +bool VoiceRecordStart(const char* pUncompressedFile) +{ + typedef bool(__cdecl* Voice_RecordStartFn)(const char*, const char*, const char*); + static Voice_RecordStartFn Voice_RecordStart = Voice_RecordStartFn(FindPatternV2("engine.dll", "55 8B EC 83 EC 0C 83 3D ?? ?? ?? ?? ?? 56 57")); + + //m_FileDuration = GetWavFileDuration(WavSound); + //m_FilePlayEndTime = iff.g_pGlobals->curtime + m_FileDuration; + + iff.g_pEngineClient->ExecuteClientCmd("voice_loopback 1"); + return Voice_RecordStart(pUncompressedFile, nullptr, nullptr); +}