From 378dc97a36caaa1ac91a6797154825af2e6f0fb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Tue, 21 Apr 2020 20:13:53 +0200 Subject: Add powermap filter and settings. --- src/powermapfilter.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/powermapfilter.h (limited to 'src/powermapfilter.h') diff --git a/src/powermapfilter.h b/src/powermapfilter.h new file mode 100644 index 0000000..263f809 --- /dev/null +++ b/src/powermapfilter.h @@ -0,0 +1,47 @@ +/* -*- Mode: c++ -*- */ +/*************************************************************************** + * powermapfilter.h + * + * Mon Apr 20 23:28:12 CEST 2020 + * Copyright 2020 André Nusser + * andre.nusser@googlemail.com + ****************************************************************************/ + +/* + * This file is part of DrumGizmo. + * + * DrumGizmo is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DrumGizmo is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with DrumGizmo; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ +#pragma once + +#include "inputfilter.h" +#include "powermap.h" + +struct Settings; + +class PowermapFilter + : public InputFilter +{ +public: + PowermapFilter(Settings& settings); + + bool filter(event_t& event, std::size_t pos) override; + + // Note getLatency not overloaded because this filter doesn't add latency. + +private: + Settings& settings; + Powermap powermap; +}; -- cgit v1.2.3