From 702a9df7cb49876a469ccc0e954d2bb47effe8dd Mon Sep 17 00:00:00 2001 From: Jakub Melka Date: Tue, 6 Jul 2021 15:19:47 +0200 Subject: [PATCH] Audiobook fix --- PdfTool/pdftoolaudiobook.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PdfTool/pdftoolaudiobook.cpp b/PdfTool/pdftoolaudiobook.cpp index 7bc1ba2..ae94250 100644 --- a/PdfTool/pdftoolaudiobook.cpp +++ b/PdfTool/pdftoolaudiobook.cpp @@ -289,7 +289,7 @@ QString PDFToolAudioBookVoices::getStandardString(PDFToolAbstractApplication::St int PDFToolAudioBookVoices::execute(const PDFToolOptions& options) { - if (!SUCCEEDED(::CoInitializeEx(nullptr, COINIT_MULTITHREADED | COINIT_SPEED_OVER_MEMORY))) + if (!SUCCEEDED(::CoInitialize(nullptr))) { return ErrorCOM; } @@ -457,7 +457,8 @@ int PDFToolAudioBook::execute(const PDFToolOptions& options) return ErrorNoText; } - if (!SUCCEEDED(::CoInitializeEx(nullptr, COINIT_MULTITHREADED | COINIT_SPEED_OVER_MEMORY))) + auto comResult = ::CoInitialize(nullptr); + if (!SUCCEEDED(comResult)) { return ErrorCOM; }