aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-03-12 21:51:43 +0100
committercbdev <cb@cbcdn.com>2020-03-12 21:51:43 +0100
commit4b120a64f68fd7f36e8080981d68d0830d113205 (patch)
treedeeda9c403dedda6eaf37a9c185f68f96ad0de7a /backends
parent378296f1b49c64f20c61966d2dcc8c8143181a07 (diff)
downloadmidimonster-4b120a64f68fd7f36e8080981d68d0830d113205.tar.gz
midimonster-4b120a64f68fd7f36e8080981d68d0830d113205.tar.bz2
midimonster-4b120a64f68fd7f36e8080981d68d0830d113205.zip
Fix rate-limited frame synthesis
Diffstat (limited to 'backends')
-rw-r--r--backends/artnet.c4
-rw-r--r--backends/sacn.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/backends/artnet.c b/backends/artnet.c
index 7d5d9ee..34fc82d 100644
--- a/backends/artnet.c
+++ b/backends/artnet.c
@@ -280,8 +280,8 @@ static int artnet_set(instance* inst, size_t num, channel** c, channel_value* v)
//check output rate limit, request next frame
if(frame_delta < ARTNET_FRAME_TIMEOUT){
artnet_fd[data->fd_index].output_instance[u].mark = 1;
- if(!next_frame || next_frame > (ARTNET_KEEPALIVE_INTERVAL - frame_delta)){
- next_frame = (ARTNET_KEEPALIVE_INTERVAL - frame_delta);
+ if(!next_frame || next_frame > (ARTNET_FRAME_TIMEOUT - frame_delta)){
+ next_frame = (ARTNET_FRAME_TIMEOUT - frame_delta);
}
return 0;
}
diff --git a/backends/sacn.c b/backends/sacn.c
index c9be8ff..495bdf3 100644
--- a/backends/sacn.c
+++ b/backends/sacn.c
@@ -374,8 +374,8 @@ static int sacn_set(instance* inst, size_t num, channel** c, channel_value* v){
//check if ratelimiting engaged
if(frame_delta < SACN_FRAME_TIMEOUT){
global_cfg.fd[data->fd_index].universe[u].mark = 1;
- if(!global_cfg.next_frame || global_cfg.next_frame > (SACN_KEEPALIVE_INTERVAL - frame_delta)){
- global_cfg.next_frame = (SACN_KEEPALIVE_INTERVAL - frame_delta);
+ if(!global_cfg.next_frame || global_cfg.next_frame > (SACN_FRAME_TIMEOUT - frame_delta)){
+ global_cfg.next_frame = (SACN_FRAME_TIMEOUT - frame_delta);
}
return 0;
}