aboutsummaryrefslogtreecommitdiffhomepage
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
parent378296f1b49c64f20c61966d2dcc8c8143181a07 (diff)
downloadmidimonster-4b120a64f68fd7f36e8080981d68d0830d113205.tar.gz
midimonster-4b120a64f68fd7f36e8080981d68d0830d113205.tar.bz2
midimonster-4b120a64f68fd7f36e8080981d68d0830d113205.zip
Fix rate-limited frame synthesis
-rw-r--r--.travis.yml2
-rw-r--r--backends/artnet.c4
-rw-r--r--backends/sacn.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
index b9c2b9d..d7c25b6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -160,7 +160,7 @@ notifications:
- "irc.hackint.org#midimonster"
on_success: change # default: always
on_failure: always # default: always
- nick: MIDIMonster CI
+ nick: mm_ci
use_notice: true
deploy:
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;
}