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

* Removed 'RDSetMixerPorts()' from 'lib/rdmixer.[cpp|h]'.
	* Removed 'RDSetMixerOutputPort()' from 'lib/rdmixer.[cpp|h]'.
	* Added a 'RDCae::setOutputPort()' method.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-08-22 15:04:43 -04:00
parent cf9242a503
commit 0f9cd5c116
14 changed files with 33 additions and 111 deletions

View File

@ -24358,3 +24358,7 @@
* Removed dead code from the 'RDPlayDeck' class.
2023-08-22 Fred Gleason <fredg@paravelsystems.com>
* Added a 'RDPlayDeck::dumpCutPoints()' method.
2023-08-22 Fred Gleason <fredg@paravelsystems.com>
* Removed 'RDSetMixerPorts()' from 'lib/rdmixer.[cpp|h]'.
* Removed 'RDSetMixerOutputPort()' from 'lib/rdmixer.[cpp|h]'.
* Added a 'RDCae::setOutputPort()' method.

View File

@ -197,7 +197,6 @@ dist_librd_la_SOURCES = dbversion.h\
rdmblookup.cpp rdmblookup.h\
rdmeteraverage.cpp rdmeteraverage.h\
rdmeterstrip.cpp rdmeterstrip.h\
rdmixer.cpp rdmixer.h\
rdmonitor_config.cpp rdmonitor_config.h\
rdmp4.cpp rdmp4.h\
rdmulticaster.cpp rdmulticaster.h\

View File

@ -276,6 +276,17 @@ void RDCae::setOutputVolume(int card,int stream,int port,int level)
}
void RDCae::setOutputPort(int card,int stream,int port)
{
for(int i=0;i<RD_MAX_PORTS;i++) {
if(i!=port) {
setOutputVolume(card,stream,i,-10000);
}
}
setOutputVolume(card,stream,port,0);
}
void RDCae::fadeOutputVolume(int card,int stream,int port,int level,int length)
{
SendCommand(QString::asprintf("FV %d %d %d %d %d!",

View File

@ -55,6 +55,9 @@ class RDCae : public QObject
void setClockSource(int card,RDCae::ClockSource src);
void setInputVolume(int card,int stream,int level);
void setOutputVolume(int card,int stream,int port,int level);
void setOutputPort(int card,int stream,int port);
void fadeOutputVolume(int card,int stream,int port,int level,int length);
void setInputLevel(int card,int port,int level);
void setOutputLevel(int card,int port,int level);

View File

@ -25,7 +25,6 @@
#include "rdescape_string.h"
#include "rdlog.h"
#include "rdlogplay.h"
#include "rdmixer.h"
#include "rdsvc.h"
#include "rdweb.h"
@ -2058,9 +2057,8 @@ bool RDLogPlay::StartEvent(int line,RDLogLine::TransType trans_type,
if(play_timescaling_available&&logline->enforceLength()) {
logline->setTimescalingActive(true);
}
RDSetMixerOutputPort(play_cae,playdeck->card(),
playdeck->stream(),
playdeck->port());
play_cae->
setOutputPort(playdeck->card(),playdeck->stream(),playdeck->port());
if((int)logline->playPosition()>logline->effectiveLength()) {
rda->syslog(LOG_DEBUG,"log engine: *** position out of bounds: Line: %d Cart: %d Pos: %d ***",line,logline->cartNumber(),logline->playPosition());
logline->setPlayPosition(0);

View File

@ -2,7 +2,7 @@
//
// Rivendell Audio Marker Editor
//
// (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2021-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
@ -22,7 +22,6 @@
#include "rdaudioinfo.h"
#include "rdmarkerdialog.h"
#include "rdmixer.h"
RDMarkerDialog::RDMarkerDialog(const QString &caption,int card,int port,
QWidget *parent)

View File

@ -2,7 +2,7 @@
//
// Audio player for RDMarkerDialog
//
// (C) Copyright 2021-2022 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2021-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
@ -20,7 +20,6 @@
#include "rdconf.h"
#include "rdescape_string.h"
#include "rdmixer.h"
#include "rdmarkerplayer.h"
RDMarkerPlayer::RDMarkerPlayer(int card,int port,QWidget *parent)
@ -237,7 +236,7 @@ bool RDMarkerPlayer::setCut(unsigned cartnum,int cutnum)
return false;
}
rda->cae()->positionPlay(d_cae_handle,0);
RDSetMixerOutputPort(rda->cae(),d_cards.first(),d_cae_stream,d_port);
rda->cae()->setOutputPort(d_cards.first(),d_cae_stream,d_port);
QString sql=QString("select ")+
"`START_POINT`,"+ // 00

View File

@ -1,55 +0,0 @@
// rdmixer.cpp
//
// Mixer Functions for Rivendell.
//
// (C) Copyright 2002-2004,2016 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
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#include <rdaudio_port.h>
#include <rd.h>
#include <rdmixer.h>
void RDSetMixerPorts(QString station,RDCae *cae)
{
for(int i=0;i<RD_MAX_CARDS;i++) {
RDAudioPort *port=new RDAudioPort(station,i);
cae->setClockSource(i,port->clockSource());
for(int j=0;j<RD_MAX_PORTS;j++) {
if(port->inputPortType(j)==RDAudioPort::Analog) {
cae->setInputType(i,j,RDCae::Analog);
}
else {
cae->setInputType(i,j,RDCae::AesEbu);
}
cae->setInputLevel(i,j,RD_BASE_ANALOG+port->inputPortLevel(j));
cae->setOutputLevel(i,j,RD_BASE_ANALOG+port->outputPortLevel(j));
cae->setInputMode(i,j,port->inputPortMode(j));
}
delete port;
}
}
void RDSetMixerOutputPort(RDCae *cae,int card,int stream,int port)
{
for(int i=0;i<RD_MAX_PORTS;i++) {
if(i!=port) {
cae->setOutputVolume(card,stream,i,-10000);
}
}
cae->setOutputVolume(card,stream,port,0);
}

View File

@ -1,31 +0,0 @@
// rdmixer.h
//
// Mixer Functions for Rivendell.
//
// (C) Copyright 2002-2003,2016 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
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#ifndef RDMIXER_H
#define RDMIXER_H
#include <qsqldatabase.h>
#include <rdcae.h>
void RDSetMixerPorts(QString station,RDCae *cae);
void RDSetMixerOutputPort(RDCae *cae,int card,int stream,int port);
#endif // RDMIXER_H

View File

@ -20,7 +20,6 @@
#include <QSignalMapper>
#include "rdmixer.h"
#include "rdplay_deck.h"
RDPlayDeck::RDPlayDeck(RDCae *cae,int id,QObject *parent)

View File

@ -28,7 +28,6 @@
#include <rdprofile.h>
#include <rdconf.h>
#include <rdescape_string.h>
#include <rdmixer.h>
#include "add_recording.h"
#include "colors.h"
@ -711,8 +710,8 @@ void MainWidget::headButtonData()
if(catch_audition_stream<0) {
return;
}
RDSetMixerOutputPort(rda->cae(),catch_audition_card,catch_audition_stream,
catch_audition_port);
rda->cae()->setOutputPort(catch_audition_card,catch_audition_stream,
catch_audition_port);
rda->cae()->positionPlay(catch_play_handle,cut->startPoint());
rda->cae()->setPlayPortActive(catch_audition_card,catch_audition_port,
catch_audition_stream);
@ -742,8 +741,8 @@ void MainWidget::tailButtonData()
if(catch_audition_stream<0) {
return;
}
RDSetMixerOutputPort(rda->cae(),catch_audition_card,catch_audition_stream,
catch_audition_port);
rda->cae()->setOutputPort(catch_audition_card,catch_audition_stream,
catch_audition_port);
if((cut->endPoint()-cut->startPoint()-RDCATCH_AUDITION_LENGTH)>0) {
rda->cae()->positionPlay(catch_play_handle,
cut->endPoint()-RDCATCH_AUDITION_LENGTH);

View File

@ -2,7 +2,7 @@
//
// The Rivendell Netcatcher Daemon
//
// (C) Copyright 2002-2022 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
@ -44,7 +44,6 @@
#include <rdescape_string.h>
#include <rdhash.h>
#include <rdlibrary_conf.h>
#include <rdmixer.h>
#include <rdpaths.h>
#include <rdpodcast.h>
#include <rdrecording.h>
@ -1336,9 +1335,9 @@ void MainObject::StartPlayout(int event)
catch_events[event].cutName(),
&catch_playout_stream[deck-129],
&catch_playout_handle[deck-129]);
RDSetMixerOutputPort(rda->cae(),catch_playout_card[deck-129],
catch_playout_stream[deck-129],
catch_playout_port[deck-129]);
rda->cae()->setOutputPort(catch_playout_card[deck-129],
catch_playout_stream[deck-129],
catch_playout_port[deck-129]);
rda->cae()->positionPlay(catch_playout_handle[deck-129],start);
catch_playout_event_player[deck-129]->start(start);
rda->cae()->

View File

@ -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
@ -21,7 +21,6 @@
#include <QMessageBox>
#include <rdconf.h>
#include <rdmixer.h>
#include <rdrehash.h>
#include "globals.h"
@ -656,7 +655,7 @@ void RecordCut::playData()
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);
RDSetMixerOutputPort(rda->cae(),rec_card_no[1],rec_stream_no[1],rec_port_no[1]);
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],

View File

@ -32,7 +32,6 @@
#include <rddatedecode.h>
#include <rddbheartbeat.h>
#include <rdescape_string.h>
#include <rdmixer.h>
#include <rdweb.h>
#include "rdvairplayd.h"