discussions/756

This commit is contained in:
恍兮惚兮 2024-05-19 16:54:50 +08:00
parent 16ea48eb7f
commit f315dac34c
10 changed files with 29 additions and 8 deletions

View File

@ -48,7 +48,7 @@ class loopbackrecorder:
try:
self.waitsignal = str(time.time())
self.engine = subproc_w(
'./files/plugins/shareddllproxy32.exe recordaudio "{}" "{}"'.format(
'./files/plugins/loopbackaudio.exe "{}" "{}"'.format(
self.file, self.waitsignal
),
)

View File

@ -39,4 +39,5 @@ add_subdirectory(exec)
add_subdirectory(winrtutils)
add_subdirectory(winsharedutils)
add_subdirectory(hookmagpie)
add_subdirectory(shareddllproxy)
add_subdirectory(shareddllproxy)
add_subdirectory(applicationloopbackaudio)

View File

@ -0,0 +1,22 @@
project(loopbackaudio)
generate_product_version(
versioninfo
NAME "LunaTranslator loopbackaudio"
COMPANY_COPYRIGHT "HIllya51 (C) 2024"
VERSION_MAJOR ${VERSION_MAJOR}
VERSION_MINOR ${VERSION_MINOR}
VERSION_PATCH ${VERSION_PATCH}
)
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
else()
add_executable(loopbackaudio runer.cpp LoopbackCapture.cpp ${versioninfo})
target_precompile_headers(loopbackaudio REUSE_FROM pch)
target_link_libraries(loopbackaudio Mfplat mfuuid )
endif()

View File

@ -422,4 +422,4 @@ HRESULT CLoopbackCapture::OnAudioSampleRequested()
}
return S_OK;
}
}

View File

@ -1,6 +1,6 @@
#include "LoopbackCapture.h"
int recordaudio(int argc, wchar_t *argv[])
int wmain(int argc, wchar_t *argv[])
{
CLoopbackCapture loopbackCapture;
loopbackCapture.StartCaptureAsync(GetCurrentProcessId(), false, argv[1]);

View File

@ -2,6 +2,7 @@ import shutil,sys
x86=int(sys.argv[1])
if x86:
shutil.copy('../builds/_x86/shareddllproxy32.exe','../../LunaTranslator/files/plugins')
shutil.copy('../builds/_x86/loopbackaudio.exe','../../LunaTranslator/files/plugins')
shutil.copy('../builds/_x86/winrtutils32.dll','../../LunaTranslator/files/plugins/DLL32')
shutil.copy('../builds/_x86/winsharedutils32.dll','../../LunaTranslator/files/plugins/DLL32')
else:

View File

@ -21,7 +21,7 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
else()
add_library(tinymp3 ../libs/tinymp3/shine_mp3.c)
add_subdirectory(voiceroid2)
add_library(x86lib dreye.cpp jbj7.cpp kingsoft.cpp le.cpp neospeech.cpp ../implsapi.cpp LR.cpp applicationloopbackaudio/runer.cpp applicationloopbackaudio/LoopbackCapture.cpp mp3.cpp)
add_library(x86lib dreye.cpp jbj7.cpp kingsoft.cpp le.cpp neospeech.cpp ../implsapi.cpp LR.cpp mp3.cpp)
target_precompile_headers(voiceroid2 REUSE_FROM pch)
target_precompile_headers(x86lib REUSE_FROM pch)
target_link_libraries(shareddllproxy Mfplat mfuuid x86lib tinymp3 voiceroid2 ${Detours})

View File

@ -5,7 +5,6 @@ int ntleaswmain(int argc, wchar_t *wargv[]);
int updatewmain(int argc, wchar_t *wargv[]);
bool checkisapatch();
#ifndef _WIN64
int recordaudio(int argc, wchar_t *argv[]);
int mainmp3(int argc, wchar_t *argv[]);
int LRwmain(int argc, wchar_t *argv[]);
int jbjwmain(int argc, wchar_t *argv[]);
@ -67,8 +66,6 @@ int wmain(int argc, wchar_t *argv[])
if (argv0 == L"update")
return updatewmain(argc - 1, argv + 1);
#ifndef _WIN64
else if (argv0 == L"recordaudio")
return recordaudio(argc - 1, argv + 1);
else if (argv0 == L"mainmp3")
return mainmp3(argc - 1, argv + 1);
else if (argv0 == L"LR")