diff options
Diffstat (limited to 'include/aosfxplayer.h')
| -rw-r--r-- | include/aosfxplayer.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/include/aosfxplayer.h b/include/aosfxplayer.h index af3aef6d..4b976852 100644 --- a/include/aosfxplayer.h +++ b/include/aosfxplayer.h @@ -9,34 +9,28 @@ #include "aoapplication.h" -#include <QDebug> -#include <QTimer> #include <QWidget> #include <string.h> +#include <QDebug> -class AOSfxPlayer : public QObject { - Q_OBJECT +class AOSfxPlayer +{ public: AOSfxPlayer(QWidget *parent, AOApplication *p_ao_app); void play(QString p_sfx, QString p_char = "", QString shout = ""); void stop(); - void set_volume(qreal p_volume); - void setLooping(bool is_looping); + void set_volume(int p_volume); private: QWidget *m_parent; AOApplication *ao_app; - qreal m_volume = 0; - bool looping_sfx = false; - - void set_volume_internal(qreal p_volume); - -#if defined(BASSAUDIO) + #if defined(BASSAUDIO) HSTREAM m_stream; -#elif defined(QTAUDIO) + #elif defined(QTAUDIO) QSoundEffect m_sfx; -#endif + #endif + int m_volume = 0; }; #endif // AOSFXPLAYER_H |
