mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 11:33:55 -07:00
Avoid multiple sounds playing at the same time
This commit is contained in:
parent
85aa866e02
commit
f78c01fa88
2 changed files with 28 additions and 3 deletions
|
|
@ -6,16 +6,20 @@
|
|||
#include <QDir>
|
||||
#include <QString>
|
||||
|
||||
class QSound;
|
||||
|
||||
typedef QMap<QString, QString> QStringMap;
|
||||
|
||||
class SoundEngine : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
SoundEngine(QObject *parent = 0);
|
||||
~SoundEngine();
|
||||
void playSound(QString fileName);
|
||||
QStringMap &getAvailableThemes();
|
||||
private:
|
||||
bool enabled;
|
||||
QSound * engine;
|
||||
QStringMap availableThemes;
|
||||
protected:
|
||||
void ensureThemeDirectoryExists();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue