diff options
| author | stonedDiscord <stoned@derpymail.org> | 2020-02-21 16:39:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-21 16:39:32 +0100 |
| commit | 7d55ff01f5f139aaa4a343e93429997418cfd8bb (patch) | |
| tree | 21950571b4e933583101db6c7b2405f55c48c03e /include/aoblipplayer.h | |
| parent | abbbb43c985271c6d66b94ee384c6a401e43de8d (diff) | |
| parent | 6ccabdd568075dfcecc6190d8d41a50b8bd99b84 (diff) | |
Merge branch 'master' into 2.7
Diffstat (limited to 'include/aoblipplayer.h')
| -rw-r--r-- | include/aoblipplayer.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/aoblipplayer.h b/include/aoblipplayer.h index aebba77d..44ca48bb 100644 --- a/include/aoblipplayer.h +++ b/include/aoblipplayer.h @@ -1,13 +1,19 @@ #ifndef AOBLIPPLAYER_H #define AOBLIPPLAYER_H +#if defined(BASSAUDIO) #include "bass.h" +#elif defined(QTAUDIO) +#include <QSoundEffect> +#endif + #include "aoapplication.h" #include <QWidget> #include <string.h> #include <QDebug> + class AOBlipPlayer { public: @@ -15,16 +21,22 @@ public: void set_blips(QString p_sfx); void blip_tick(); - void set_volume(int p_volume); + void set_volume(qreal p_volume); int m_cycle = 0; private: QWidget *m_parent; AOApplication *ao_app; + qreal m_volume; + + void set_volume_internal(qreal p_volume); - int m_volume; + #if defined(BASSAUDIO) HSTREAM m_stream_list[5]; + #elif defined(QTAUDIO) + QSoundEffect m_blips; + #endif }; #endif // AOBLIPPLAYER_H |
