Ardour  9.0-pre0-384-ga76afae0e9
feedback.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020-2021 Luciano Iam <oss@lucianoiam.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef _ardour_surface_websockets_feedback_h_
20 #define _ardour_surface_websockets_feedback_h_
21 
22 #include <memory>
23 
24 #include <glibmm/threads.h>
25 
26 #include "pbd/abstract_ui.h"
27 
28 #include "component.h"
29 #include "typed_value.h"
30 #include "mixer.h"
31 
32 namespace ArdourSurface {
33 
34 class FeedbackHelperUI : public AbstractUI<BaseUI::BaseRequestObject>
35 {
36 public:
39 
40 protected:
41  virtual void do_request (BaseUI::BaseRequestObject*);
42 };
43 
45 {
46 public:
48  : SurfaceComponent (surface){};
49  virtual ~ArdourFeedback (){};
50 
51  int start ();
52  int stop ();
53 
54  void update_all (std::string, TypedValue) const;
55  void update_all (std::string, uint32_t, TypedValue) const;
56  void update_all (std::string, uint32_t, uint32_t, TypedValue) const;
57  void update_all (std::string, uint32_t, uint32_t, uint32_t, TypedValue) const;
58 
59 private:
60  Glib::Threads::Mutex _client_state_lock;
62  sigc::connection _periodic_connection;
63 
64  // Only needed for server event loop integration method #3
66 
68 
69  bool poll () const;
70 
72  void observe_mixer ();
74 };
75 
76 } // namespace ArdourSurface
77 
78 #endif // _ardour_surface_websockets_feedback_h_
void update_all(std::string, uint32_t, TypedValue) const
FeedbackHelperUI _helper
Definition: feedback.h:65
void update_all(std::string, uint32_t, uint32_t, uint32_t, TypedValue) const
PBD::ScopedConnectionList _transport_connections
Definition: feedback.h:61
sigc::connection _periodic_connection
Definition: feedback.h:62
void observe_strip_plugins(uint32_t, ArdourMixerStrip::PluginMap &)
ArdourFeedback(ArdourSurface::ArdourWebsockets &surface)
Definition: feedback.h:47
Glib::Threads::Mutex _client_state_lock
Definition: feedback.h:60
void update_all(std::string, uint32_t, uint32_t, TypedValue) const
PBD::EventLoop * event_loop() const
void update_all(std::string, TypedValue) const
std::map< uint32_t, std::shared_ptr< ArdourMixerPlugin > > PluginMap
Definition: mixer.h:76
virtual void do_request(BaseUI::BaseRequestObject *)