Ardour  9.2-79-gba93f2fe52
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 "pbd/abstract_ui.h"
25 #include "pbd/mutex.h"
26 
27 #include "component.h"
28 #include "typed_value.h"
29 #include "mixer.h"
30 
31 namespace ArdourSurface {
32 
33 class FeedbackHelperUI : public AbstractUI<BaseUI::BaseRequestObject>
34 {
35 public:
38 
39 protected:
40  virtual void do_request (BaseUI::BaseRequestObject*);
41 };
42 
44 {
45 public:
47  : SurfaceComponent (surface){};
48  virtual ~ArdourFeedback (){};
49 
50  int start ();
51  int stop ();
52 
53  void update_all (std::string, TypedValue) const;
54  void update_all (std::string, uint32_t, TypedValue) const;
55  void update_all (std::string, uint32_t, uint32_t, TypedValue) const;
56  void update_all (std::string, uint32_t, uint32_t, uint32_t, TypedValue) const;
57 
58 private:
61  sigc::connection _periodic_connection;
62 
63  // Only needed for server event loop integration method #3
65 
67 
68  bool poll () const;
69 
71  void observe_mixer ();
73 };
74 
75 } // namespace ArdourSurface
76 
77 #endif // _ardour_surface_websockets_feedback_h_
void update_all(std::string, uint32_t, TypedValue) const
FeedbackHelperUI _helper
Definition: feedback.h:64
void update_all(std::string, uint32_t, uint32_t, uint32_t, TypedValue) const
PBD::ScopedConnectionList _transport_connections
Definition: feedback.h:60
sigc::connection _periodic_connection
Definition: feedback.h:61
void observe_strip_plugins(uint32_t, ArdourMixerStrip::PluginMap &)
ArdourFeedback(ArdourSurface::ArdourWebsockets &surface)
Definition: feedback.h:46
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 *)