aboutsummaryrefslogtreecommitdiff
path: root/src/aoblipplayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/aoblipplayer.h')
-rw-r--r--src/aoblipplayer.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/aoblipplayer.h b/src/aoblipplayer.h
new file mode 100644
index 00000000..92b43d29
--- /dev/null
+++ b/src/aoblipplayer.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include "aoapplication.h"
+
+#include <bass.h>
+#include <bassopus.h>
+
+#include <QDebug>
+#include <QElapsedTimer>
+#include <QWidget>
+
+#include <string.h>
+
+class AOBlipPlayer
+{
+public:
+ static constexpr int STREAM_COUNT = 5;
+
+ AOBlipPlayer(AOApplication *ao_app);
+
+ void setVolume(int value);
+ void setMuted(bool enabled);
+
+ void setBlip(QString blip);
+
+ void playBlip();
+
+private:
+ AOApplication *ao_app;
+
+ int m_volume = 0;
+ bool m_muted = false;
+ HSTREAM m_stream[STREAM_COUNT]{};
+ int m_cycle = 0;
+
+ void updateInternalVolume();
+};