diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-09 16:31:02 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-09 16:31:02 +1000 |
| commit | 6ae1a8e811f72bda251f8718fb148fcb6853bcc4 (patch) | |
| tree | 4b4018628c9cc32a7f43a4a0d17b091eb852db2c /plugin/src/Caelestia/beattracker.hpp | |
| parent | nix: fix build error with libcava (#585) (diff) | |
| download | caelestia-shell-6ae1a8e811f72bda251f8718fb148fcb6853bcc4.tar.gz caelestia-shell-6ae1a8e811f72bda251f8718fb148fcb6853bcc4.tar.bz2 caelestia-shell-6ae1a8e811f72bda251f8718fb148fcb6853bcc4.zip | |
plugin/ac: not singleton
Also add nodeId prop
BeatTracker not singleton
Move BeatTracker and Cava to Audio service
Diffstat (limited to 'plugin/src/Caelestia/beattracker.hpp')
| -rw-r--r-- | plugin/src/Caelestia/beattracker.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugin/src/Caelestia/beattracker.hpp b/plugin/src/Caelestia/beattracker.hpp index c7737e1..ab18373 100644 --- a/plugin/src/Caelestia/beattracker.hpp +++ b/plugin/src/Caelestia/beattracker.hpp @@ -1,5 +1,6 @@ #pragma once +#include "audiocollector.hpp" #include "audioprovider.hpp" #include <aubio/aubio.h> #include <qqmlintegration.h> @@ -10,12 +11,15 @@ class BeatProcessor : public AudioProcessor { Q_OBJECT public: - explicit BeatProcessor(QObject* parent = nullptr); + explicit BeatProcessor(AudioCollector* collector, QObject* parent = nullptr); ~BeatProcessor(); signals: void beat(smpl_t bpm); +protected: + void setCollector(AudioCollector* collector) override; + private: aubio_tempo_t* m_tempo; fvec_t* m_in; @@ -27,7 +31,6 @@ private: class BeatTracker : public AudioProvider { Q_OBJECT QML_ELEMENT - QML_SINGLETON Q_PROPERTY(smpl_t bpm READ bpm NOTIFY bpmChanged) |