summaryrefslogtreecommitdiff
path: root/drumgizmo/jackclient.h
diff options
context:
space:
mode:
authorChristian Glöckner <cgloeckner@freenet.de>2016-01-25 12:32:09 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-02-09 09:03:16 +0100
commit41b6ef4642b25c22e47e5f89f113b502d3a4321c (patch)
tree2aac4d7d2fe822506d7ce902f81d3c7dc52e0171 /drumgizmo/jackclient.h
parent7236fee052f52667f116ed83cacb21ed587d0d65 (diff)
added JackMidiInputEngine + additional minor changes
Diffstat (limited to 'drumgizmo/jackclient.h')
-rw-r--r--drumgizmo/jackclient.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/drumgizmo/jackclient.h b/drumgizmo/jackclient.h
index ef7abf1..2574f18 100644
--- a/drumgizmo/jackclient.h
+++ b/drumgizmo/jackclient.h
@@ -43,21 +43,23 @@ class JackProcess {
// --------------------------------------------------------------------
-struct JackChannel {
- std::vector<sample_t> samples;
- jack_client_t* const client;
- jack_port_t* const port;
-
- JackChannel();
- JackChannel(JackClient& client, std::size_t buffer_size,
- std::string const & name);
- ~JackChannel();
+// RAII-wrapper for jack_port_t
+class JackPort {
+ public:
+ JackPort(JackClient& client, std::string const & name, const char * type, JackPortFlags flags);
+ ~JackPort();
+
+ void* getBuffer(jack_nframes_t num_frames);
+
+ private:
+ jack_client_t* const client;
+ jack_port_t* const port;
};
// --------------------------------------------------------------------
class JackClient {
- friend struct JackChannel;
+ friend struct JackPort;
public:
JackClient();