summaryrefslogtreecommitdiffstats
path: root/src/JackDbusDriver.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/JackDbusDriver.hpp')
-rw-r--r--src/JackDbusDriver.hpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/JackDbusDriver.hpp b/src/JackDbusDriver.hpp
index 42c70ef..068c7cc 100644
--- a/src/JackDbusDriver.hpp
+++ b/src/JackDbusDriver.hpp
@@ -18,7 +18,7 @@
#ifndef PATCHAGE_JACKDBUSDRIVER_HPP
#define PATCHAGE_JACKDBUSDRIVER_HPP
-#include "Driver.hpp"
+#include "AudioDriver.hpp"
#include <dbus/dbus.h>
@@ -28,7 +28,7 @@
class ILog;
/// Driver for JACK audio and midi ports that uses D-Bus
-class JackDriver : public Driver
+class JackDriver : public AudioDriver
{
public:
explicit JackDriver(ILog& log, EventSink emit_event);
@@ -41,23 +41,20 @@ public:
~JackDriver() override;
+ // Driver interface
void attach(bool launch_daemon) override;
void detach() override;
-
bool is_attached() const override;
-
void refresh(const EventSink& sink) override;
-
bool connect(const PortID& tail_id, const PortID& head_id) override;
-
bool disconnect(const PortID& tail_id, const PortID& head_id) override;
- uint32_t get_xruns();
- void reset_xruns();
-
- float sample_rate();
- uint32_t buffer_size();
- bool set_buffer_size(uint32_t size);
+ // AudioDriver interface
+ uint32_t xruns() override;
+ void reset_xruns() override;
+ uint32_t buffer_size() override;
+ bool set_buffer_size(uint32_t frames) override;
+ uint32_t sample_rate() override;
private:
PortType patchage_port_type(dbus_uint32_t dbus_port_type) const;
@@ -96,8 +93,8 @@ private:
DBusError _dbus_error;
DBusConnection* _dbus_connection;
- bool _server_responding;
- bool _server_started;
+ mutable bool _server_responding;
+ bool _server_started;
dbus_uint64_t _graph_version;
};