34 lines
646 B
C++
34 lines
646 B
C++
#ifndef SCSTWSTARTSOUNDPLAYER_H
|
|
#define SCSTWSTARTSOUNDPLAYER_H
|
|
|
|
#include <QObject>
|
|
#include <QFile>
|
|
#include <QAudioOutput>
|
|
#include <QDebug>
|
|
#include <QEventLoop>
|
|
#include <QTimer>
|
|
#include <QDateTime>
|
|
|
|
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
|