--- /dev/null
+#ifndef _DELAY_ANALYZER_H
+#define _DELAY_ANALYZER_H 1
+
+#include <QMainWindow>
+
+#include <atomic>
+#include <string>
+
+#include "audio_clip.h"
+#include "delay_analyzer_interface.h"
+#include "input_mapping.h"
+
+namespace bmusb {
+struct AudioFormat;
+} // namespace bmusb
+
+namespace Ui {
+class DelayAnalyzer;
+} // namespace Ui
+
+class QComboBox;
+
+class DelayAnalyzer : public QMainWindow, public DelayAnalyzerInterface
+{
+ Q_OBJECT
+
+public:
+ DelayAnalyzer();
+ ~DelayAnalyzer();
+
+ bool is_grabbing() const override { return grabbing; }
+ void add_audio(DeviceSpec device_spec, const uint8_t *data, unsigned num_samples, bmusb::AudioFormat audio_format, std::chrono::steady_clock::time_point frame_time) override;
+
+private:
+ Ui::DelayAnalyzer *ui;
+ AudioClip clip1, clip2;
+
+ void grab_clicked();
+ void card_selected(QComboBox *card_combo, int selected_index);
+ void channel_selected(QComboBox *channel_combo);
+ DeviceSpec get_selected_device(QComboBox *card_combo);
+
+ std::atomic<bool> grabbing{false};
+ std::map<DeviceSpec, DeviceInfo> devices;
+};
+
+#endif // !defined(_DELAY_ANALYZER_H)