This repository has been archived on 2024-06-03. You can view files and clone it, but cannot push or open issues or pull requests.
shared-libraries/ScStwLibraries/headers/scstwstartsoundplayer.h

35 lines
646 B
C
Raw Normal View History

#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