mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
Added sound settings page
+ added sound setting page + added sound setting icon + moved sound settings from interface settings Added master volume + added master volume slider. + volume can be changed by sliding bar or by using the spin box + Preview of volume will be played when dragging and releasing bar. Added checks for qt4 Qt4 does not have support for setting the volume without some lengthy work around, I have disabled volume control for qt4 users and have mentioned that "Master volume requires qt5". Updated sfx + removed all old sfx + added new end step and tap sound + tap/endstep sound has a timer on it to prevent spamming + test sound engine will now use endstep sound Made end step sfx softer end step felt too harsh Added player joined sound + added a sound for when a new player joins a room Updated Was missing a sound when a player joins Made end step softer Made end step even softer updated sound again
This commit is contained in:
parent
cf24f4aa04
commit
c64eeb4ebe
19 changed files with 454 additions and 96 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
#include <QDateTime>
|
||||
|
||||
class QAudioOutput;
|
||||
class QBuffer;
|
||||
|
|
@ -14,19 +15,17 @@ private:
|
|||
QMap<QString, QByteArray> audioData;
|
||||
QBuffer *inputBuffer;
|
||||
QAudioOutput *audio;
|
||||
QDateTime lastTapPlayed;
|
||||
QDateTime lastEndStepPlayed;
|
||||
private slots:
|
||||
void cacheData();
|
||||
void soundEnabledChanged();
|
||||
public:
|
||||
SoundEngine(QObject *parent = 0);
|
||||
public slots:
|
||||
void notification();
|
||||
void draw();
|
||||
void playCard();
|
||||
void shuffle();
|
||||
void endStep();
|
||||
void tap();
|
||||
void untap();
|
||||
void cuckoo();
|
||||
void playerJoined();
|
||||
};
|
||||
|
||||
extern SoundEngine *soundEngine;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue