mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 07:35:55 +01:00
Initial import of CVS-v2_8_branch
This commit is contained in:
58
lib/rdmixer.cpp
Normal file
58
lib/rdmixer.cpp
Normal file
@@ -0,0 +1,58 @@
|
||||
// rdmixer.cpp
|
||||
//
|
||||
// Mixer Functions for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// $Id: rdmixer.cpp,v 1.13.8.2 2012/08/03 16:52:39 cvs Exp $
|
||||
//
|
||||
// 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);
|
||||
}
|
||||
Reference in New Issue
Block a user