|
|
|
@ -131,9 +131,9 @@ GAudioOutput::GAudioOutput(QObject *parent) : QObject(parent),
@@ -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)
@@ -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; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|