diff options
| author | Salanto <62221668+Salanto@users.noreply.github.com> | 2024-05-18 03:33:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-18 03:33:43 +0200 |
| commit | 51338e30e046f1a62c84049b34577f0f3b5db6e3 (patch) | |
| tree | 283c95f8f776ed852d03a816388695afd65c0f73 /src/aoblipplayer.h | |
| parent | 469e293a1885e49f1d5994d41ac7cfc9f4666952 (diff) | |
| parent | f9c7205210fb9f768f583065971ece09e6b5eb03 (diff) | |
Merge pull request #957 from AttorneyOnline/kaleidoscope
The Kaleidoscope - Hell, it's about time.
Diffstat (limited to 'src/aoblipplayer.h')
| -rw-r--r-- | src/aoblipplayer.h | 37 |
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(); +}; |
