From 1504aaf6b2df422405b2cc6bd6e4f79de36e53c4 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Wed, 13 Mar 2019 13:05:10 +0100 Subject: [PATCH] saves space i guess --- include/aoblipplayer.h | 40 ++++------------------------------------ include/aosfxplayer.h | 38 +++----------------------------------- 2 files changed, 7 insertions(+), 71 deletions(-) diff --git a/include/aoblipplayer.h b/include/aoblipplayer.h index 2bbe718..102a040 100644 --- a/include/aoblipplayer.h +++ b/include/aoblipplayer.h @@ -13,7 +13,7 @@ #include #include -#if defined(BASSAUDIO) + class AOBlipPlayer { public: @@ -30,43 +30,11 @@ private: AOApplication *ao_app; int m_volume; + #if defined(BASSAUDIO) 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: + #elif defined(QTAUDIO) QSoundEffect m_blips; - QWidget *m_parent; - AOApplication *ao_app; - - int m_volume; - //HSTREAM m_stream_list[5]; + #endif }; -#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 diff --git a/include/aosfxplayer.h b/include/aosfxplayer.h index 5b82534..4b97685 100644 --- a/include/aosfxplayer.h +++ b/include/aosfxplayer.h @@ -13,7 +13,6 @@ #include #include -#if defined(BASSAUDIO) class AOSfxPlayer { public: @@ -26,43 +25,12 @@ public: private: QWidget *m_parent; AOApplication *ao_app; - - int m_volume = 0; + #if defined(BASSAUDIO) HSTREAM m_stream; -}; -#elif defined(QTAUDIO) -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(int p_volume); - -private: + #elif defined(QTAUDIO) QSoundEffect m_sfx; - QWidget *m_parent; - AOApplication *ao_app; - + #endif int m_volume = 0; }; -#else -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(int p_volume); - -private: - QWidget *m_parent; - AOApplication *ao_app; - - int m_volume = 0; -}; -#endif #endif // AOSFXPLAYER_H