Results 1 to 3 of 3

Thread: How to play .wav file by QProcess

  1. #1
    Join Date
    Mar 2006
    Posts
    20
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default How to play .wav file by QProcess

    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

    Qt Code:
    1. StartAlarm()
    2. {
    3. Q3Process *AlarmProcess;
    4. AlarmProcess = new Q3Process (this);
    5. AlarmProcess->setArguments(QStringList() << "playwave");// the player
    6. if(rcCheckSound->isChecked() == 1)
    7. AlarmProcess->addArgument(leFile->text() );
    8. else
    9. AlarmProcess->addArgument("1.wav");
    10. AlarmProcess->start();
    11. }
    To copy to clipboard, switch view to plain text mode 

    Thanks
    Krishna
    Last edited by wysota; 1st June 2006 at 16:26.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to play .wav file by QProcess

    How does your code is "nt working"? What does start() method return? Why do you use Q3Process instead of QProcess?

  3. #3
    Join Date
    Jan 2006
    Posts
    21
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to play .wav file by QProcess

    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.

Similar Threads

  1. read file from end to beginning..
    By soul_rebel in forum Qt Programming
    Replies: 11
    Last Post: 4th June 2012, 01:20
  2. Draging a non-existing file to the Windows Desktop
    By klaus1111 in forum Qt Programming
    Replies: 13
    Last Post: 20th September 2007, 11:47
  3. QProcess / system call not working under linux. Why?
    By johnny_sparx in forum Qt Programming
    Replies: 12
    Last Post: 11th March 2006, 00:32
  4. QProcess in a QThread
    By chombium in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2006, 15:52
  5. QProcess problem with windows batch file
    By bood in forum Qt Programming
    Replies: 11
    Last Post: 6th January 2006, 08:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.