aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstonedDiscord <stoned@derpymail.org>2019-03-13 13:05:10 +0100
committerstonedDiscord <stoned@derpymail.org>2019-03-13 13:05:10 +0100
commit1504aaf6b2df422405b2cc6bd6e4f79de36e53c4 (patch)
treedf86862baef8e46a75031620f71b4a08ccd64c71
parent1514ffea6ad747fc93f98752abb8f82acc9dc9bd (diff)
saves space i guess
-rw-r--r--include/aoblipplayer.h40
-rw-r--r--include/aosfxplayer.h38
2 files changed, 7 insertions, 71 deletions
diff --git a/include/aoblipplayer.h b/include/aoblipplayer.h
index 2bbe7187..102a0408 100644
--- a/include/aoblipplayer.h
+++ b/include/aoblipplayer.h
@@ -13,7 +13,7 @@
#include <string.h>
#include <QDebug>
-#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 5b82534c..4b976852 100644
--- a/include/aosfxplayer.h
+++ b/include/aosfxplayer.h
@@ -13,7 +13,6 @@
#include <string.h>
#include <QDebug>
-#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