summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorLuciano Iam <lucianito@gmail.com>2020-04-22 11:26:51 +0200
committerRobin Gareus <robin@gareus.org>2020-04-22 21:59:35 +0200
commitc362605b49491eb98e0758eebd2f35c6a1f1271c (patch)
tree30a0c17e4dd8a776541e71a9b27a11fcf914331d /libs
parent8b65b0a9613a7a25e415c2a9d402c602735cc221 (diff)
WebSockets: add some TO DO comments
Diffstat (limited to 'libs')
-rw-r--r--libs/surfaces/websockets/feedback.cc5
-rw-r--r--libs/surfaces/websockets/server.cc3
-rw-r--r--libs/surfaces/websockets/server.h1
3 files changed, 8 insertions, 1 deletions
diff --git a/libs/surfaces/websockets/feedback.cc b/libs/surfaces/websockets/feedback.cc
index 8441a785d2..ef3f485c2d 100644
--- a/libs/surfaces/websockets/feedback.cc
+++ b/libs/surfaces/websockets/feedback.cc
@@ -27,6 +27,9 @@
#include "state.h"
#include "strips.h"
+// TO DO: make this configurable
+#define POLL_INTERVAL_MS 100
+
using namespace ARDOUR;
struct TransportObserver {
@@ -100,7 +103,7 @@ ArdourFeedback::start ()
observe_strips ();
// some things need polling like the strip meters
- Glib::RefPtr<Glib::TimeoutSource> periodic_timeout = Glib::TimeoutSource::create (100); // ms
+ Glib::RefPtr<Glib::TimeoutSource> periodic_timeout = Glib::TimeoutSource::create (POLL_INTERVAL_MS);
_periodic_connection = periodic_timeout->connect (sigc::mem_fun (*this,
&ArdourFeedback::poll));
periodic_timeout->attach (main_loop ()->get_context ());
diff --git a/libs/surfaces/websockets/server.cc b/libs/surfaces/websockets/server.cc
index 7613d85e38..72edffd8cf 100644
--- a/libs/surfaces/websockets/server.cc
+++ b/libs/surfaces/websockets/server.cc
@@ -72,6 +72,9 @@ WebsocketsServer::WebsocketsServer (ArdourSurface::ArdourWebsockets& surface)
_lws_mnt_root.origin = _resources.index_dir ().c_str ();
_lws_mnt_root.origin_protocol = LWSMPRO_FILE;
_lws_mnt_root.def = "index.html";
+ /* do not send caching headers if NDEBUG is set, this is useful while
+ * developing web surfaces. Ideally this would exist as a configurable
+ * option in the TO DO surface settings UI */
#ifdef NDEBUG
_lws_mnt_root.cache_max_age = 3600;
_lws_mnt_root.cache_reusable = 1;
diff --git a/libs/surfaces/websockets/server.h b/libs/surfaces/websockets/server.h
index f3dde841c1..f1147b24c3 100644
--- a/libs/surfaces/websockets/server.h
+++ b/libs/surfaces/websockets/server.h
@@ -40,6 +40,7 @@
#include "state.h"
#include "resources.h"
+// TO DO: make this configurable
#define WEBSOCKET_LISTEN_PORT 3818
struct LwsPollFdGlibSource {