diff --git a/ChangeLog b/ChangeLog index a7e2c45d..b19467f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24356,3 +24356,5 @@ Codes selected. 2023-08-21 Fred Gleason * Removed dead code from the 'RDPlayDeck' class. +2023-08-22 Fred Gleason + * Added a 'RDPlayDeck::dumpCutPoints()' method. diff --git a/lib/rdplay_deck.cpp b/lib/rdplay_deck.cpp index bcd40423..eec90cb3 100644 --- a/lib/rdplay_deck.cpp +++ b/lib/rdplay_deck.cpp @@ -158,11 +158,13 @@ bool RDPlayDeck::setCart(RDLogLine *logline,bool rotate) } } if(logline->startPoint(RDLogLine::LogPointer)<0) { + // Use values from the library play_forced_length=logline->forcedLength(); play_audio_point[0]=play_cut->startPoint(RDLogLine::CartPointer); play_audio_point[1]=play_cut->endPoint(); } else { + // Use values from the log play_forced_length=logline->effectiveLength(); play_audio_point[0]=logline->startPoint(RDLogLine::LogPointer); play_audio_point[1]=logline->endPoint(); @@ -377,6 +379,57 @@ void RDPlayDeck::reset() } +QString RDPlayDeck::dumpCutPoints() const +{ + QString ret; + + ret=QString::asprintf("play_audio_point: start: %d end: %d ", + play_audio_point[0],play_audio_point[1]); + if(play_stop_timer->isActive()) { + ret+=QString::asprintf("play_stop_timer: %d",play_stop_timer->interval()); + } + else { + ret+="play_stop_timer: inactive"; + } + ret+="\n"; + + ret+=QString::asprintf("play_point_value[SEGUE]: start: %d end: %d ", + play_point_value[0][0],play_point_value[0][1]); + if(play_point_timer[0]->isActive()) { + ret+=QString::asprintf("play_point_timer[SEGUE]: %d", + play_point_timer[0]->interval()); + } + else { + ret+="play_point_timer[SEGUE]: inactive"; + } + ret+="\n"; + + ret+=QString::asprintf("play_point_value[TALK]: start: %d end: %d ", + play_point_value[1][0],play_point_value[1][1]); + if(play_point_timer[1]->isActive()) { + ret+=QString::asprintf("play_point_timer[TALK]: %d", + play_point_timer[1]->interval()); + } + else { + ret+="play_point_timer[TALK]: inactive"; + } + ret+="\n"; + + ret+=QString::asprintf("play_point_value[HOOK]: start: %d end: %d ", + play_point_value[2][0],play_point_value[2][1]); + if(play_point_timer[2]->isActive()) { + ret+=QString::asprintf("play_point_timer[HOOK]: %d", + play_point_timer[2]->interval()); + } + else { + ret+="play_point_timer[HOOK]: inactive"; + } + ret+="\n"; + + return ret; +} + + void RDPlayDeck::play(unsigned pos,int segue_start,int segue_end, int duck_up_end) { diff --git a/lib/rdplay_deck.h b/lib/rdplay_deck.h index 7cee7315..054e0794 100644 --- a/lib/rdplay_deck.h +++ b/lib/rdplay_deck.h @@ -64,6 +64,7 @@ class RDPlayDeck : public QObject int lastStartPosition() const; void clear(); void reset(); + QString dumpCutPoints() const; public slots: void play(unsigned pos,int segue_start=-1,int segue_end=-1,int duck_up_end=0);