2023-10-27 Fred Gleason <fredg@paravelsystems.com>

* Fixed a regression in rdcartslots(1) that caused the color of
	the start buttons to fail to update correctly when in
	'Restart Playout (Loop)' mode.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-10-27 14:12:08 -04:00
parent d434fad6f8
commit b8f4f95fcd
3 changed files with 15 additions and 8 deletions

View File

@ -24464,3 +24464,7 @@
2023-10-17 Fred Gleason <fredg@paravelsystems.com>
* Modified rdcatchd(8) to use the new-style CAE commands for play-out
events.
2023-10-27 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdcartslots(1) that caused the color of
the start buttons to fail to update correctly when in
'Restart Playout (Loop)' mode.

View File

@ -92,8 +92,6 @@ RDCartSlot::RDCartSlot(int slotnum,RDRipc *ripc,RDCae *cae,RDStation *station,
slot_start_button->setGeometry(0,0,sizeHint().height(),sizeHint().height());
slot_start_button->setFont(hugeButtonFont());
slot_start_button->setDisabled(true);
connect(slot_deck,SIGNAL(stateChanged(int,RDPlayDeck::State)),
slot_start_button,SLOT(setState(int,RDPlayDeck::State)));
connect(slot_start_button,SIGNAL(clicked()),this,SLOT(startData()));
//
@ -475,6 +473,7 @@ void RDCartSlot::stateChangedData(int id,RDPlayDeck::State state)
switch(state) {
case RDPlayDeck::Playing:
LogPlayout(state);
slot_start_button->setState(RDPlayDeck::Playing);
slot_start_button->
setEnabled(slot_options->mode()==RDSlotOptions::CartDeckMode);
slot_load_button->setDisabled(true);
@ -484,6 +483,7 @@ void RDCartSlot::stateChangedData(int id,RDPlayDeck::State state)
case RDPlayDeck::Stopped:
case RDPlayDeck::Finished:
LogPlayout(state);
slot_start_button->setState(RDPlayDeck::Stopped);
slot_start_button->
setEnabled(slot_options->mode()==RDSlotOptions::CartDeckMode);
slot_load_button->setEnabled(true);

View File

@ -376,6 +376,7 @@ void RDPlayDeck::reset()
case RDPlayDeck::Playing:
case RDPlayDeck::Stopping:
play_cae->stopPlayback(play_serial);
playbackStoppedData(play_serial);
case RDPlayDeck::Paused:
// play_cae->unloadPlay(play_handle);
@ -542,10 +543,10 @@ void RDPlayDeck::play(unsigned pos,int segue_start,int segue_end,
(double)play_timescale_speed),
play_timescale_speed,false);
*/
printf("startPlayback(\"%s\",%d,%d,%d,%d,%d)\n",
play_cut->cutName().toUtf8().constData(),play_card,play_port,
play_audio_point[0]+pos,
play_audio_point[1],play_timescale_speed);
// printf("startPlayback(\"%s\",%d,%d,%d,%d,%d)\n",
// play_cut->cutName().toUtf8().constData(),play_card,play_port,
// play_audio_point[0]+pos,
// play_audio_point[1],play_timescale_speed);
play_serial=play_cae->startPlayback(play_cut->cutName(),play_card,play_port,
play_audio_point[0]+pos,
play_timescale_speed,
@ -586,6 +587,7 @@ void RDPlayDeck::stop()
play_state=RDPlayDeck::Stopping;
// play_cae->stopPlay(play_handle);
play_cae->stopPlayback(play_serial);
playbackStoppedData(play_serial);
}
}
@ -683,7 +685,9 @@ void RDPlayDeck::playStartedData(int serial)
void RDPlayDeck::playbackStoppedData(int serial)
{
if(serial!=play_serial) {
// printf("%p - playbackStoppedData(%d)\n",this,serial);
if((serial<0)||(serial!=play_serial)) {
return;
}
play_position_timer->stop();
@ -695,7 +699,6 @@ void RDPlayDeck::playbackStoppedData(int serial)
}
else {
// play_cae->unloadPlay(play_handle);
play_serial=-1;
play_state=RDPlayDeck::Stopped;
play_current_position=0;