mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-17 08:01:13 +02:00
2023-10-09 Fred Gleason <fredg@paravelsystems.com>
* Fixed regressions in rdlibrary(1)'s 'Cut Info/Record' and 'Edit Audio' dialogs that broke audio stoppage and looping. * Fixed a regression in caed(1) that caused play-out streams to be leaked when a play-out hit EOF. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -61,11 +61,9 @@ RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,QWidget *parent)
|
||||
//
|
||||
// CAE Connection
|
||||
//
|
||||
connect(rda->cae(),SIGNAL(isConnected(bool)),this,SLOT(initData(bool)));
|
||||
connect(rda->cae(),SIGNAL(playStarted(int)),this,SLOT(playStartedData(int)));
|
||||
connect(rda->cae(),SIGNAL(playStopped(int)),this,SLOT(playStoppedData(int)));
|
||||
// connect(rda->cae(),SIGNAL(playing(int)),this,SLOT(playedData(int)));
|
||||
// connect(rda->cae(),SIGNAL(playStopped(int)),this,SLOT(playStoppedData(int)));
|
||||
connect(rda->cae(),SIGNAL(playbackStopped(int)),
|
||||
this,SLOT(playStoppedData(int)));
|
||||
connect(rda->cae(),SIGNAL(recordLoaded(int,int)),
|
||||
this,SLOT(recordLoadedData(int,int)));
|
||||
connect(rda->cae(),SIGNAL(recordUnloaded(int,int,unsigned)),
|
||||
@@ -584,8 +582,6 @@ void RecordCut::channelsData(int id)
|
||||
|
||||
void RecordCut::recordData()
|
||||
{
|
||||
// QString filename;
|
||||
|
||||
if((!is_ready)&&(!is_recording)&&(!is_playing)) {
|
||||
if(rec_cut->length()>0) {
|
||||
if(QMessageBox::warning(this,tr("Audio Exists"),
|
||||
@@ -655,19 +651,11 @@ void RecordCut::playData()
|
||||
int end=rec_cut->endPoint(true);
|
||||
|
||||
if((!is_recording)&&(!is_playing)&&(!is_ready)) { // Start Play
|
||||
// rda->cae()->loadPlay(rec_card_no[1],rec_cut->cutName(),
|
||||
// &rec_stream_no[1],&rec_play_handle);
|
||||
// rda->cae()->setOutputPort(rec_card_no[1],rec_stream_no[1],rec_port_no[1]);
|
||||
// rda->cae()->positionPlay(rec_play_handle,start);
|
||||
// rda->cae()->setPlayPortActive(rec_card_no[1],rec_port_no[1],rec_stream_no[1]);
|
||||
// rda->cae()->setOutputVolume(rec_card_no[1],rec_stream_no[1],rec_port_no[1],
|
||||
// 0+rec_cut->playGain());
|
||||
|
||||
rec_play_serial=
|
||||
rda->cae()->startPlayback(rec_cut->cutName(),
|
||||
rec_card_no[1],rec_port_no[1],
|
||||
start,end,RD_TIMESCALE_DIVISOR);
|
||||
// rda->cae()->play(rec_play_handle,end-start,RD_TIMESCALE_DIVISOR,false);
|
||||
// rda->cae()->setPlayPortActive(rec_card_no[1],rec_port_no[1],rec_stream_no[1]);
|
||||
}
|
||||
if(is_ready&&(!is_recording)) {
|
||||
if(rec_mode_box->currentIndex()==1) {
|
||||
@@ -752,36 +740,6 @@ void RecordCut::playStoppedData(int serial)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void RecordCut::playedData(int handle)
|
||||
{
|
||||
rec_play_button->on();
|
||||
rec_stop_button->off();
|
||||
rec_timer_value=-1;
|
||||
recTimerData();
|
||||
rec_timer->start(RECORD_CUT_TIMER_INTERVAL);
|
||||
is_playing=true;
|
||||
is_recording=false;
|
||||
}
|
||||
|
||||
|
||||
void RecordCut::playStoppedData(int handle)
|
||||
{
|
||||
// rda->cae()->unloadPlay(rec_play_handle);
|
||||
rec_timer->stop();
|
||||
rec_play_button->off();
|
||||
rec_stop_button->on();
|
||||
rec_meter->resetClipLight();
|
||||
is_playing=false;
|
||||
is_recording=false;
|
||||
rec_meter->setLeftSolidBar(-10000);
|
||||
rec_meter->setRightSolidBar(-10000);
|
||||
if(is_closing) {
|
||||
is_closing=false;
|
||||
closeData();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void RecordCut::recordStoppedData(int card,int stream)
|
||||
{
|
||||
@@ -942,16 +900,6 @@ void RecordCut::closeData()
|
||||
}
|
||||
|
||||
|
||||
void RecordCut::initData(bool state)
|
||||
{
|
||||
if(!state) {
|
||||
QMessageBox::warning(this,tr("Can't Connect"),
|
||||
tr("Unable to connect to Core AudioEngine"));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RecordCut::recTimerData()
|
||||
{
|
||||
rec_timer_value+=RECORD_CUT_TIMER_INTERVAL;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Record a Rivendell cut.
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2023 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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
|
||||
@@ -64,10 +64,7 @@ class RecordCut : public RDDialog
|
||||
void recordUnloadedData(int,int,unsigned);
|
||||
void playStartedData(int serial);
|
||||
void playStoppedData(int serial);
|
||||
// void playedData(int);
|
||||
// void playStoppedData(int);
|
||||
void closeData();
|
||||
void initData(bool);
|
||||
void recTimerData();
|
||||
void aesAlarmData(int,int,bool);
|
||||
void meterData();
|
||||
@@ -108,12 +105,8 @@ class RecordCut : public RDDialog
|
||||
QLabel *cut_startdatetime_label;
|
||||
QGroupBox *cut_startdatetime_groupbox;
|
||||
RDDateTimeEdit *cut_startdatetime_edit;
|
||||
// RDDateEdit *cut_startdate_edit;
|
||||
// RDTimeEdit *cut_starttime_edit;
|
||||
QLabel *cut_enddatetime_label;
|
||||
RDDateTimeEdit *cut_enddatetime_edit;
|
||||
// RDDateEdit *cut_enddate_edit;
|
||||
// RDTimeEdit *cut_endtime_edit;
|
||||
QGroupBox *cut_daypart_groupbox;
|
||||
QButtonGroup *cut_daypart_group;
|
||||
QRadioButton *cut_startdaypart_enable_button;
|
||||
@@ -147,7 +140,6 @@ class RecordCut : public RDDialog
|
||||
int rec_card_no[2];
|
||||
int rec_stream_no[2];
|
||||
int rec_port_no[2];
|
||||
// int rec_play_handle;
|
||||
int rec_play_serial;
|
||||
RDCae::AudioCoding rec_format;
|
||||
unsigned rec_channels;
|
||||
@@ -163,5 +155,4 @@ class RecordCut : public RDDialog
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif // RECORD_CUT_H
|
||||
|
Reference in New Issue
Block a user