saves space i guess

This commit is contained in:
stonedDiscord 2019-03-13 13:05:10 +01:00
parent 1514ffea6a
commit 1504aaf6b2
2 changed files with 7 additions and 71 deletions

View File

@ -13,7 +13,7 @@
#include <string.h> #include <string.h>
#include <QDebug> #include <QDebug>
#if defined(BASSAUDIO)
class AOBlipPlayer class AOBlipPlayer
{ {
public: public:
@ -30,43 +30,11 @@ private:
AOApplication *ao_app; AOApplication *ao_app;
int m_volume; int m_volume;
#if defined(BASSAUDIO)
HSTREAM m_stream_list[5]; HSTREAM m_stream_list[5];
}; #elif defined(QTAUDIO)
#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; QSoundEffect m_blips;
QWidget *m_parent; #endif
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 #endif // AOBLIPPLAYER_H

View File

@ -13,7 +13,6 @@
#include <string.h> #include <string.h>
#include <QDebug> #include <QDebug>
#if defined(BASSAUDIO)
class AOSfxPlayer class AOSfxPlayer
{ {
public: public:
@ -26,43 +25,12 @@ public:
private: private:
QWidget *m_parent; QWidget *m_parent;
AOApplication *ao_app; AOApplication *ao_app;
#if defined(BASSAUDIO)
int m_volume = 0;
HSTREAM m_stream; HSTREAM m_stream;
}; #elif defined(QTAUDIO)
#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:
QSoundEffect m_sfx; QSoundEffect m_sfx;
QWidget *m_parent; #endif
AOApplication *ao_app;
int m_volume = 0; 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 #endif // AOSFXPLAYER_H