PDA

View Full Version : How to play .wav file by QProcess



Krishnacins
1st June 2006, 17:08
Hi,
i want to play .wav sound file on linux & Qt4.1.2.....
i used QSound but its not working coz of NAS....

plz tell me How can i play .wav file using QProcess.........


i used belove code too its nt working


StartAlarm()
{
Q3Process *AlarmProcess;
AlarmProcess = new Q3Process (this);
AlarmProcess->setArguments(QStringList() << "playwave");// the player
if(rcCheckSound->isChecked() == 1)
AlarmProcess->addArgument(leFile->text() );
else
AlarmProcess->addArgument("1.wav");
AlarmProcess->start();
}

Thanks
Krishna

jacek
1st June 2006, 17:25
How does your code is "nt working"? What does start() method return? Why do you use Q3Process instead of QProcess?

AlexKiriukha
2nd June 2006, 08:44
When I was in need to play MP3 files, I used QProcess with madplay (madplay is a console mp3 player). It can be overkill for you but this way works.