aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/aoapplication.h6
-rw-r--r--include/aoblipplayer.h10
-rw-r--r--include/aomusicplayer.h37
-rw-r--r--include/aosfxplayer.h12
4 files changed, 60 insertions, 5 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h
index 2eed7f2..f7103b8 100644
--- a/include/aoapplication.h
+++ b/include/aoapplication.h
@@ -95,9 +95,9 @@ public:
//////////////////versioning///////////////
- int get_release() const { return RELEASE; }
- int get_major_version() const { return MAJOR_VERSION; }
- int get_minor_version() const { return MINOR_VERSION; }
+ const int get_release() const { return RELEASE; }
+ const int get_major_version() const { return MAJOR_VERSION; }
+ const int get_minor_version() const { return MINOR_VERSION; }
QString get_version_string();
///////////////////////////////////////////
diff --git a/include/aoblipplayer.h b/include/aoblipplayer.h
index aebba77..102a040 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>
+
class AOBlipPlayer
{
public:
@@ -24,7 +30,11 @@ private:
AOApplication *ao_app;
int m_volume;
+ #if defined(BASSAUDIO)
HSTREAM m_stream_list[5];
+ #elif defined(QTAUDIO)
+ QSoundEffect m_blips;
+ #endif
};
#endif // AOBLIPPLAYER_H
diff --git a/include/aomusicplayer.h b/include/aomusicplayer.h
index 560a7f9..b34267c 100644
--- a/include/aomusicplayer.h
+++ b/include/aomusicplayer.h
@@ -1,13 +1,18 @@
#ifndef AOMUSICPLAYER_H
#define AOMUSICPLAYER_H
+#if defined(BASSAUDIO)
#include "bass.h"
+#elif defined(QTAUDIO)
+#include <QMediaPlayer>
+#endif
#include "aoapplication.h"
#include <QWidget>
#include <string.h>
#include <QDebug>
+#if defined(BASSAUDIO)
class AOMusicPlayer
{
public:
@@ -24,5 +29,37 @@ private:
int m_volume = 0;
HSTREAM m_stream;
};
+#elif defined(QTAUDIO)
+class AOMusicPlayer
+{
+public:
+ AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app);
+ ~AOMusicPlayer();
+
+ void play(QString p_song);
+ void set_volume(int p_value);
+
+private:
+ QMediaPlayer m_player;
+ QWidget *m_parent;
+ AOApplication *ao_app;
+
+ int m_volume = 0;
+};
+#else
+class AOMusicPlayer
+{
+public:
+ AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app);
+ ~AOMusicPlayer();
+
+ void play(QString p_song);
+ void set_volume(int p_value);
+
+private:
+ QWidget *m_parent;
+ AOApplication *ao_app;
+};
+#endif
#endif // AOMUSICPLAYER_H
diff --git a/include/aosfxplayer.h b/include/aosfxplayer.h
index 30cbe9d..4b97685 100644
--- a/include/aosfxplayer.h
+++ b/include/aosfxplayer.h
@@ -1,7 +1,12 @@
#ifndef AOSFXPLAYER_H
#define AOSFXPLAYER_H
+#if defined(BASSAUDIO)
#include "bass.h"
+#elif defined(QTAUDIO)
+#include <QSoundEffect>
+#endif
+
#include "aoapplication.h"
#include <QWidget>
@@ -20,9 +25,12 @@ public:
private:
QWidget *m_parent;
AOApplication *ao_app;
-
- int m_volume = 0;
+ #if defined(BASSAUDIO)
HSTREAM m_stream;
+ #elif defined(QTAUDIO)
+ QSoundEffect m_sfx;
+ #endif
+ int m_volume = 0;
};
#endif // AOSFXPLAYER_H