summaryrefslogtreecommitdiff
path: root/drumgizmo/input/ossmidi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drumgizmo/input/ossmidi.h')
-rw-r--r--drumgizmo/input/ossmidi.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/drumgizmo/input/ossmidi.h b/drumgizmo/input/ossmidi.h
index a5f64b6..41cfb2b 100644
--- a/drumgizmo/input/ossmidi.h
+++ b/drumgizmo/input/ossmidi.h
@@ -25,3 +25,28 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
+#include <audioinputengine.h>
+
+class OSSInputEngine
+ : public AudioInputEngine
+{
+public:
+ OSSInputEngine();
+ ~OSSInputEngine();
+
+ // based on AudioInputEngine
+ bool init(const Instruments& instruments) override;
+ void setParm(const std::string& parm, const std::string& value) override;
+ bool start() override;
+ void stop() override;
+ void pre() override;
+ void run(size_t pos, size_t len, std::vector<event_t>& events) override;
+ void post() override;
+ bool isFreewheeling() const override;
+
+private:
+ std::string dev;
+ int fd;
+ std::size_t pos;
+ std::vector<event_t> events;
+};