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,60 +13,28 @@
#include <string.h> #include <string.h>
#include <QDebug> #include <QDebug>
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:
QWidget *m_parent;
AOApplication *ao_app;
int m_volume;
#if defined(BASSAUDIO) #if defined(BASSAUDIO)
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:
QWidget *m_parent;
AOApplication *ao_app;
int m_volume;
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;
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
};
#endif // AOBLIPPLAYER_H #endif // AOBLIPPLAYER_H

View File

@ -13,56 +13,24 @@
#include <string.h> #include <string.h>
#include <QDebug> #include <QDebug>
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;
#if defined(BASSAUDIO) #if defined(BASSAUDIO)
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;
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;
AOApplication *ao_app;
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
int m_volume = 0;
};
#endif // AOSFXPLAYER_H #endif // AOSFXPLAYER_H