remove dll files

(unused)
This commit is contained in:
Lily Tsuru 2024-07-19 22:06:13 -04:00
parent 326d3e5161
commit b4a6860e75
2 changed files with 0 additions and 81 deletions

View file

@ -1,56 +0,0 @@
#include <windows.h>
#include "speechapi.hpp"
#define SPEECH2_API __declspec(dllexport) WINAPI
// Engine type. Sync with C#
enum class EngineType : int { ET_SAPI4, ET_SAPI5, ET_DECTALK };
extern "C" {
SPEECH2_API void* speech2_create_api(EngineType type) {
ISpeechAPI* api = nullptr;
//printf("speech2_create_api(%d)\n", type);
switch(type) {
case EngineType::ET_SAPI4:
api = ISpeechAPI::CreateSapi4();
break;
default: return nullptr;
}
printf("api is %p\n", api);
if(auto hr = api->Initialize(); FAILED(hr)) {
delete api;
return nullptr;
}
return static_cast<void*>(api);
}
SPEECH2_API void speech2_destroy_api(void* engine) {
if(engine)
delete static_cast<ISpeechAPI*>(engine);
}
// API bindings TODO
SPEECH2_API int speech2_api_get_voiceinfo_count(void* engine) {
if(engine) {
auto* api = static_cast<ISpeechAPI*>(engine);
return api->GetVoices().size();
}
return -1;
}
SPEECH2_API const ISpeechAPI::VoiceInfo* speech2_api_get_voiceinfo_index(void* engine, int index) {
if(engine) {
auto* api = static_cast<ISpeechAPI*>(engine);
return &api->GetVoices()[index];
}
return nullptr;
}
}

View file

@ -1,25 +0,0 @@
#include <windows.h>
#include <winscard.h>
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
// N.B: Should initalize COM if it's not initalized.
// Note that with .NET Framework, *all* managed threads (incl. ThreadPool threads)
// have COM initalized by default, so we don't need to do so there.
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
//CoInitialize(nullptr);
break;
case DLL_THREAD_ATTACH: break;
case DLL_THREAD_DETACH: break;
case DLL_PROCESS_DETACH:
if(lpvReserved != nullptr) {
break; // do not do cleanup if process termination scenario
}
//CoUninitialize();
break;
}
return TRUE;
}