#ifndef SCSTWSTARTSOUNDPLAYER_H #define SCSTWSTARTSOUNDPLAYER_H #include #include #include #include #include #include #include class ScStwStartSoundPlayer : public QObject { Q_OBJECT public: explicit ScStwStartSoundPlayer(QObject *parent = nullptr); private: QFile *startSoundFile; QAudioOutput *audioOutput; QEventLoop *waitLoop; public slots: bool play(double volume, double *timeOfStop = nullptr); //int interrupt(); private slots: void handleStateChanged(QAudio::State newState); signals: }; #endif // SCSTWSTARTSOUNDPLAYER_H