From 0d445a4d71398873488dd35b87a57365ee6016ed Mon Sep 17 00:00:00 2001 From: Thomas Gubler Date: Tue, 26 Nov 2013 16:32:07 +0100 Subject: [PATCH] re-enable linux text to speech and fix use of deprecated function --- src/GAudioOutput.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GAudioOutput.cc b/src/GAudioOutput.cc index b9d451929..b3eb0e533 100644 --- a/src/GAudioOutput.cc +++ b/src/GAudioOutput.cc @@ -131,9 +131,9 @@ GAudioOutput::GAudioOutput(QObject *parent) : QObject(parent), #endif // Initialize audio output - //m_media = new Phonon::MediaObject(this); - //Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this); - //createPath(m_media, audioOutput); + m_media = new Phonon::MediaObject(this); + Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this); + createPath(m_media, audioOutput); // Prepare regular emergency signal, will be fired off on calling startEmergency() emergencyTimer = new QTimer(); @@ -223,8 +223,8 @@ bool GAudioOutput::say(QString text, int severity) cst_wave *wav = flite_text_to_wave(text.toStdString().c_str(), v); // file.fileName() returns the unique file name cst_wave_save(wav, file.fileName().toStdString().c_str(), "riff"); - //m_media->setCurrentSource(Phonon::MediaSource(file.fileName().toStdString().c_str())); - //m_media->play(); + m_media->setCurrentSource(Phonon::MediaSource(QUrl::fromLocalFile(file.fileName().toStdString().c_str()))); + m_media->play(); res = true; } -- 2.22.0