Home > other >  Urgent!!!!!!!!!! Under Linux using Qsound couldn't play sounds
Urgent!!!!!!!!!! Under Linux using Qsound couldn't play sounds

Time:10-06

Under Linux using Qsound couldn't play sound, Qsound: : isAvailable () returns is false, my Linux system specific to install anything? For big shrimp: tell me something about!!!!!!!!!!!! #include #include #include Int main (int arg c, char * argv []) {QApplication app (arg c, argv); If (QSound: : isAvailable ()==true) {QSound bells (" mysounds/apple. Mp3 "); Bells. The play (); } else {printf (" not available \ n "); }/* Imagewindow window; Window. The show (); */return app. The exec (); }

CodePudding user response:

Use QSound requires the following steps:
1.. add multimedia pro: QT +=core GUI multimedia
2.. CPP include # include & lt; QSound>
3. Direct call, such as: QSound: : play (" :/sound/sound/tip1 wav ");
  • Related