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
Dorian Zedler 1570bd86c9
- some changes to file structure
- started to implement timer, race and sound management
2020-04-13 23:59:36 +02:00

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