mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 20:13:56 -07:00
added sound engine files
This commit is contained in:
parent
a4097659d3
commit
0c1c0fcb56
2 changed files with 109 additions and 0 deletions
32
cockatrice/src/soundengine.h
Normal file
32
cockatrice/src/soundengine.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#ifndef SOUNDENGINE_H
|
||||
#define SOUNDENGINE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
|
||||
class QAudioOutput;
|
||||
class QBuffer;
|
||||
|
||||
class SoundEngine : public QObject {
|
||||
Q_OBJECT
|
||||
private:
|
||||
void playSound(const QString &fileName);
|
||||
QMap<QString, QByteArray> audioData;
|
||||
QBuffer *inputBuffer;
|
||||
QAudioOutput *audio;
|
||||
private slots:
|
||||
void cacheData();
|
||||
public:
|
||||
SoundEngine(QObject *parent = 0);
|
||||
public slots:
|
||||
void notification();
|
||||
void draw();
|
||||
void playCard();
|
||||
void shuffle();
|
||||
void tap();
|
||||
void untap();
|
||||
};
|
||||
|
||||
extern SoundEngine *soundEngine;
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue