1
0
Fork 0
forked from len0rd/rockbox

rbutil: Always use Qt Multimedia to play TTS preview.

We're using it on Windows and macOS, there's no reason to not do so on
Linux.

Change-Id: I6e4d9006eff22fd4bf6b882407a5497b2f8cdd2f
This commit is contained in:
Dominik Riebeling 2020-07-26 14:44:52 +02:00
parent 5640d0d3c7
commit b820c648c8
2 changed files with 1 additions and 18 deletions

View file

@ -20,9 +20,7 @@
#include <QProgressDialog>
#include <QFileDialog>
#include <QUrl>
#if !defined(Q_OS_LINUX)
#include <QSound>
#endif
#include "version.h"
#include "configure.h"
@ -951,16 +949,7 @@ void Config::testTts()
}
tts->stop();
if(!filename.isEmpty()) {
#if defined(Q_OS_LINUX)
QString exe = Utils::findExecutable("aplay");
if(exe == "") exe = Utils::findExecutable("play");
if(exe != "")
{
QProcess::execute(exe+" "+filename);
}
#else
QSound::play(filename);
#endif
}
ui.testTTS->setEnabled(true);
delete tts; /* Config objects are never deleted (in fact, they are

View file

@ -157,13 +157,7 @@ QT += network
contains(QT_MAJOR_VERSION, 5) {
message("Qt5 found")
QT += widgets
win32 {
QT += multimedia
}
macx {
QT += multimedia
}
QT += widgets multimedia
}
CONFIG += c++11