diff --git a/ChangeLog b/ChangeLog index f43d59c3..5e392f72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24464,3 +24464,7 @@ 2023-10-17 Fred Gleason * Modified rdcatchd(8) to use the new-style CAE commands for play-out events. +2023-10-27 Fred Gleason + * 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. diff --git a/lib/rdcartslot.cpp b/lib/rdcartslot.cpp index 4cf3fddc..865409e0 100644 --- a/lib/rdcartslot.cpp +++ b/lib/rdcartslot.cpp @@ -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); diff --git a/lib/rdplay_deck.cpp b/lib/rdplay_deck.cpp index 26bb824b..f8db5305 100644 --- a/lib/rdplay_deck.cpp +++ b/lib/rdplay_deck.cpp @@ -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;