diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-06 16:57:40 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-06 16:57:40 +1000 |
| commit | af43c1166e8ace50954dd1c6ac86769810104b53 (patch) | |
| tree | f028c1984d66d0a4ac77d6856e6731fee4152b96 /plugin/src/Caelestia/beattracker.hpp | |
| parent | plugin: abstract service + ref (diff) | |
| download | caelestia-shell-af43c1166e8ace50954dd1c6ac86769810104b53.tar.gz caelestia-shell-af43c1166e8ace50954dd1c6ac86769810104b53.tar.bz2 caelestia-shell-af43c1166e8ace50954dd1c6ac86769810104b53.zip | |
plugin: abstract audioprovider
Diffstat (limited to 'plugin/src/Caelestia/beattracker.hpp')
| -rw-r--r-- | plugin/src/Caelestia/beattracker.hpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/plugin/src/Caelestia/beattracker.hpp b/plugin/src/Caelestia/beattracker.hpp index 7c7fada..b4cb559 100644 --- a/plugin/src/Caelestia/beattracker.hpp +++ b/plugin/src/Caelestia/beattracker.hpp @@ -1,15 +1,13 @@ #pragma once -#include "service.hpp" -#include <QAudioSource> -#include <QIODevice> +#include "audioprovider.hpp" #include <QObject> #include <aubio/aubio.h> #include <qqmlintegration.h> namespace caelestia { -class BeatTracker : public Service { +class BeatTracker : public AudioProvider { Q_OBJECT QML_ELEMENT QML_SINGLETON @@ -27,20 +25,14 @@ signals: void beat(smpl_t bpm); private: - QAudioSource* m_source; - QIODevice* m_device; - aubio_tempo_t* m_tempo; fvec_t* m_in; fvec_t* m_out; - uint_t m_hopSize; smpl_t m_bpm; - void start() override; - void stop() override; - void process(); - void handleStateChanged(QtAudio::State state) const; + void processData() override; + void consumeData() override; }; } // namespace caelestia |