blob: 232a27b15a34aeb89876ed53adf8f3f30d96885e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#pragma once
#include <QObject>
#include <QMutex>
#include "util/duration.h"
#include "util/movinginterquartilemean.h"
#include "util/performancetimer.h"
#include "util/types.h"
class TapFilter : public QObject {
Q_OBJECT
public:
TapFilter(QObject *pParent, int filterLength, mixxx::Duration maxInterval);
virtual ~TapFilter();
public slots:
void tap();
signals:
void tapped(double averageLength, int numSamples);
private:
PerformanceTimer m_timer;
MovingInterquartileMean m_mean;
mixxx::Duration m_maxInterval;
QMutex m_mutex;
};
|