diff --git a/ChangeLog b/ChangeLog index 807cb87e..1c0eeb1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24375,3 +24375,5 @@ stream volume controls for the specified stream to be muted. 2023-08-25 Fred Gleason * Added profiling code (disabled by default) to the 'RDCae' class. +2023-08-25 Fred Gleason + * Added a 'PadSegueOverlap=' directive to rd.conf(5). diff --git a/conf/rd.conf-sample b/conf/rd.conf-sample index 748e039e..d2c9ef52 100644 --- a/conf/rd.conf-sample +++ b/conf/rd.conf-sample @@ -189,6 +189,10 @@ TranscodingDelay=0 ;ServiceStartupDelay=5 [Hacks] +; As implied by the name, directives in this section are generally for use +; in troubleshooting or maintenance situations. Do *NOT* change these on +; production systems unless you understand exactly what you are doing! + ; Completely disable maintenance checks on this host. ; DisableMaintChecks=Yes @@ -225,6 +229,11 @@ TranscodingDelay=0 ; ;SuppressRdcatchMeterUpdates=No +; Pad the duration of segue overlaps. Takes milliseconds as value. +; +; PadSegueOverlaps=0; + + [Caed] ; When set to 'Yes', log all CAE mixer operations to syslog. ;EnableMixerLogging=No diff --git a/lib/rdconfig.cpp b/lib/rdconfig.cpp index 6c79cc44..4a4cc54f 100644 --- a/lib/rdconfig.cpp +++ b/lib/rdconfig.cpp @@ -2,7 +2,7 @@ // // A container class for a Rivendell Base Configuration // -// (C) Copyright 2002-2021 Fred Gleason +// (C) Copyright 2002-2023 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -399,6 +399,12 @@ bool RDConfig::suppressRdcatchMeterUpdates() const } +int RDConfig::padSegueOverlaps() const +{ + return conf_pad_segue_overlaps; +} + + bool RDConfig::logSearchStrings() const { return conf_log_search_strings; @@ -674,6 +680,7 @@ bool RDConfig::load() profile->boolValue("Hacks","DisableMaintChecks",false); conf_suppress_rdcatch_meter_updates= profile->boolValue("Hacks","SuppressRdcatchMeterUpdates",false); + conf_pad_segue_overlaps=profile->intValue("Hacks","PadSegueOverlaps"); conf_log_search_strings_level= SyslogPriorityLevel(profile->stringValue("Debugging","LogSearchStrings",""), &conf_log_search_strings); @@ -815,6 +822,7 @@ void RDConfig::clear() conf_disable_maint_checks=false; conf_save_webget_files_directory=""; conf_suppress_rdcatch_meter_updates=false; + conf_pad_segue_overlaps=0; conf_log_search_strings=false; conf_log_search_strings_level=LOG_DEBUG; conf_log_log_refresh=false; diff --git a/lib/rdconfig.h b/lib/rdconfig.h index 98aa3fa0..2f1d1fc0 100644 --- a/lib/rdconfig.h +++ b/lib/rdconfig.h @@ -2,7 +2,7 @@ // // A container class for a Rivendell Base Configuration // -// (C) Copyright 2002-2021 Fred Gleason +// (C) Copyright 2002-2023 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -105,6 +105,7 @@ class RDConfig int meterPortRange() const; QString saveWebgetFilesDirectory() const; bool suppressRdcatchMeterUpdates() const; + int padSegueOverlaps() const; bool logSearchStrings() const; int logSearchStringsLevel() const; bool logLogRefresh() const; @@ -195,6 +196,7 @@ class RDConfig bool conf_lock_rdairplay_memory; QString conf_save_webget_files_directory; bool conf_suppress_rdcatch_meter_updates; + int conf_pad_segue_overlaps; int conf_meter_base_port; int conf_meter_port_range; std::vector conf_jack_ports[2]; diff --git a/lib/rdplay_deck.cpp b/lib/rdplay_deck.cpp index 8ec19381..27755fdd 100644 --- a/lib/rdplay_deck.cpp +++ b/lib/rdplay_deck.cpp @@ -20,6 +20,7 @@ #include +#include "rdapplication.h" #include "rdplay_deck.h" RDPlayDeck::RDPlayDeck(RDCae *cae,int id,QObject *parent) @@ -781,6 +782,11 @@ void RDPlayDeck::StartTimers(int offset) start(play_point_value[i][1]-audio_point-offset); } } + if((i==0)&&(rda->config()->padSegueOverlaps()>0)) { + play_point_timer[0]->stop(); + play_point_timer[0]->start(play_point_timer[0]->interval()+ + rda->config()->padSegueOverlaps());; + } } } if((play_fade_point[1]!=-1)&&(offset