2023-08-22 Fred Gleason <fredg@paravelsystems.com>

* Added a 'RDPlayDeck::dumpCutPoints()' method.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-08-22 13:27:11 -04:00
parent cb64fccbbe
commit cf9242a503
3 changed files with 56 additions and 0 deletions

View File

@ -24356,3 +24356,5 @@
Codes selected. Codes selected.
2023-08-21 Fred Gleason <fredg@paravelsystems.com> 2023-08-21 Fred Gleason <fredg@paravelsystems.com>
* Removed dead code from the 'RDPlayDeck' class. * Removed dead code from the 'RDPlayDeck' class.
2023-08-22 Fred Gleason <fredg@paravelsystems.com>
* Added a 'RDPlayDeck::dumpCutPoints()' method.

View File

@ -158,11 +158,13 @@ bool RDPlayDeck::setCart(RDLogLine *logline,bool rotate)
} }
} }
if(logline->startPoint(RDLogLine::LogPointer)<0) { if(logline->startPoint(RDLogLine::LogPointer)<0) {
// Use values from the library
play_forced_length=logline->forcedLength(); play_forced_length=logline->forcedLength();
play_audio_point[0]=play_cut->startPoint(RDLogLine::CartPointer); play_audio_point[0]=play_cut->startPoint(RDLogLine::CartPointer);
play_audio_point[1]=play_cut->endPoint(); play_audio_point[1]=play_cut->endPoint();
} }
else { else {
// Use values from the log
play_forced_length=logline->effectiveLength(); play_forced_length=logline->effectiveLength();
play_audio_point[0]=logline->startPoint(RDLogLine::LogPointer); play_audio_point[0]=logline->startPoint(RDLogLine::LogPointer);
play_audio_point[1]=logline->endPoint(); 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, void RDPlayDeck::play(unsigned pos,int segue_start,int segue_end,
int duck_up_end) int duck_up_end)
{ {

View File

@ -64,6 +64,7 @@ class RDPlayDeck : public QObject
int lastStartPosition() const; int lastStartPosition() const;
void clear(); void clear();
void reset(); void reset();
QString dumpCutPoints() const;
public slots: public slots:
void play(unsigned pos,int segue_start=-1,int segue_end=-1,int duck_up_end=0); void play(unsigned pos,int segue_start=-1,int segue_end=-1,int duck_up_end=0);