summaryrefslogtreecommitdiffstats
path: root/src/Patchage.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-05-11 12:04:36 -0400
committerDavid Robillard <d@drobilla.net>2021-05-11 13:35:16 -0400
commit75ee1ed27d5d2c60e867abef09ee920446ac13de (patch)
tree7c711813cf6282de24f08c96fd6e5465ea7414e5 /src/Patchage.hpp
parent37ede19b4d1e924f954d8b16d3e071a4768ce278 (diff)
downloadpatchage-75ee1ed27d5d2c60e867abef09ee920446ac13de.tar.gz
patchage-75ee1ed27d5d2c60e867abef09ee920446ac13de.tar.bz2
patchage-75ee1ed27d5d2c60e867abef09ee920446ac13de.zip
Move drivers to a separate object
Towards eliminating dependencies on the Patchage "god object".
Diffstat (limited to 'src/Patchage.hpp')
-rw-r--r--src/Patchage.hpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/Patchage.hpp b/src/Patchage.hpp
index 38917cf..4dc2ecf 100644
--- a/src/Patchage.hpp
+++ b/src/Patchage.hpp
@@ -27,6 +27,7 @@
#include "ActionSink.hpp"
#include "ClientType.hpp"
#include "Configuration.hpp"
+#include "Drivers.hpp"
#include "Event.hpp"
#include "Metadata.hpp"
#include "Options.hpp"
@@ -66,9 +67,7 @@ class Window;
namespace patchage {
-class AudioDriver;
class Canvas;
-class Driver;
class ILog;
class Legend;
@@ -102,6 +101,7 @@ public:
bool sort_ports() const { return _menu_view_sort_ports->get_active(); }
+ Drivers& drivers() { return _drivers; }
Gtk::Window* window() { return _main_win.get(); }
ILog& log() { return _log; }
Metadata& metadata() { return _metadata; }
@@ -155,15 +155,11 @@ protected:
Glib::RefPtr<Gtk::Builder> _xml;
- std::mutex _events_mutex;
- std::queue<Event> _driver_events;
-
- std::unique_ptr<Driver> _alsa_driver;
-
+ std::mutex _events_mutex;
+ std::queue<Event> _driver_events;
std::unique_ptr<Canvas> _canvas;
- std::unique_ptr<AudioDriver> _jack_driver;
- Configuration _conf;
+ Configuration _conf;
BufferSizeColumns _buf_size_columns;
@@ -205,6 +201,7 @@ protected:
Legend* _legend;
TextViewLog _log;
Metadata _metadata;
+ Drivers _drivers;
Reactor _reactor;
ActionSink _action_sink;