diff options
| author | stonedDiscord <stoned@derpymail.org> | 2019-03-12 19:53:06 +0100 |
|---|---|---|
| committer | stonedDiscord <stoned@derpymail.org> | 2019-03-12 19:53:06 +0100 |
| commit | 0b6f376f8f635bfcfd72f621a1077a35efc72342 (patch) | |
| tree | debbf65a980916c531d8bf3b6ef32d29aeaf5ce8 /include | |
| parent | 6e93d6e1bea8fd539499625f2a980acd83ef424e (diff) | |
qt can play the blips just fine
Diffstat (limited to 'include')
| -rw-r--r-- | include/aoblipplayer.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/aoblipplayer.h b/include/aoblipplayer.h index aebba77d..2bbe7187 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> +#if defined(BASSAUDIO) class AOBlipPlayer { public: @@ -26,5 +32,41 @@ private: int m_volume; HSTREAM m_stream_list[5]; }; +#elif defined(QTAUDIO) +class AOBlipPlayer +{ +public: + AOBlipPlayer(QWidget *parent, AOApplication *p_ao_app); + + void set_blips(QString p_sfx); + void blip_tick(); + void set_volume(int p_volume); + + int m_cycle = 0; + +private: + QSoundEffect m_blips; + QWidget *m_parent; + AOApplication *ao_app; + + int m_volume; + //HSTREAM m_stream_list[5]; +}; +#else +class AOBlipPlayer +{ +public: + AOBlipPlayer(QWidget *parent, AOApplication *p_ao_app); + + void set_blips(QString p_sfx); + void blip_tick(); + void set_volume(int p_volume); + +private: + QWidget *m_parent; + AOApplication *ao_app; +}; +#endif + #endif // AOBLIPPLAYER_H |
