aboutsummaryrefslogtreecommitdiff
path: root/src/aoblipplayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/aoblipplayer.h')
-rw-r--r--src/aoblipplayer.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/aoblipplayer.h b/src/aoblipplayer.h
new file mode 100644
index 00000000..c33e08b3
--- /dev/null
+++ b/src/aoblipplayer.h
@@ -0,0 +1,36 @@
+#pragma once
+
+#include "bass.h"
+#include "bassopus.h"
+
+#include "aoapplication.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();
+};