mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
WebSockets: add some TO DO comments
This commit is contained in:
parent
8b65b0a961
commit
c362605b49
3 changed files with 8 additions and 1 deletions
|
|
@ -27,6 +27,9 @@
|
||||||
#include "state.h"
|
#include "state.h"
|
||||||
#include "strips.h"
|
#include "strips.h"
|
||||||
|
|
||||||
|
// TO DO: make this configurable
|
||||||
|
#define POLL_INTERVAL_MS 100
|
||||||
|
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
|
|
||||||
struct TransportObserver {
|
struct TransportObserver {
|
||||||
|
|
@ -100,7 +103,7 @@ ArdourFeedback::start ()
|
||||||
observe_strips ();
|
observe_strips ();
|
||||||
|
|
||||||
// some things need polling like the strip meters
|
// 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,
|
_periodic_connection = periodic_timeout->connect (sigc::mem_fun (*this,
|
||||||
&ArdourFeedback::poll));
|
&ArdourFeedback::poll));
|
||||||
periodic_timeout->attach (main_loop ()->get_context ());
|
periodic_timeout->attach (main_loop ()->get_context ());
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,9 @@ WebsocketsServer::WebsocketsServer (ArdourSurface::ArdourWebsockets& surface)
|
||||||
_lws_mnt_root.origin = _resources.index_dir ().c_str ();
|
_lws_mnt_root.origin = _resources.index_dir ().c_str ();
|
||||||
_lws_mnt_root.origin_protocol = LWSMPRO_FILE;
|
_lws_mnt_root.origin_protocol = LWSMPRO_FILE;
|
||||||
_lws_mnt_root.def = "index.html";
|
_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
|
#ifdef NDEBUG
|
||||||
_lws_mnt_root.cache_max_age = 3600;
|
_lws_mnt_root.cache_max_age = 3600;
|
||||||
_lws_mnt_root.cache_reusable = 1;
|
_lws_mnt_root.cache_reusable = 1;
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
#include "state.h"
|
#include "state.h"
|
||||||
#include "resources.h"
|
#include "resources.h"
|
||||||
|
|
||||||
|
// TO DO: make this configurable
|
||||||
#define WEBSOCKET_LISTEN_PORT 3818
|
#define WEBSOCKET_LISTEN_PORT 3818
|
||||||
|
|
||||||
struct LwsPollFdGlibSource {
|
struct LwsPollFdGlibSource {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue