2021-07-02 Fred Gleason <fredg@paravelsystems.com>

* Added an 'AUDIO_INPUTS.LABEL' field to the database.
	* Added an 'AUDIO_OUTPUTS.LABEL' field to the database.
	* Incremented the database version to 350.
	* Added 'RDAudioPort::inputPortLabel()',
	'RDAudioPort::setInputPortLabel()' 'RDAudioPort::outputPortLabel()'
	and 'RDAudioPort::setOutputPortLabel()' methods.
	* Added 'Label' fields to the 'Input Port' and 'Output Port'
	sections of the 'Edit Audio Ports' dialog in rdadmin(1).
	* Added code to rdairplay(1) to use port labels on audio meters.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-07-02 20:00:39 -04:00
parent bff832664d
commit 21d35faa50
16 changed files with 280 additions and 70 deletions

View File

@@ -26,30 +26,36 @@
class RDAudioPort
{
public:
enum PortType {Analog=0,AesEbu=1,SpDiff=2};
RDAudioPort(QString station,int card);
QString station() const;
int card() const;
RDCae::ClockSource clockSource();
void setClockSource(RDCae::ClockSource src);
RDAudioPort::PortType inputPortType(int port);
void setInputPortType(int port,RDAudioPort::PortType type);
RDCae::ChannelMode inputPortMode(int port);
void setInputPortMode(int port,RDCae::ChannelMode mode);
int inputPortLevel(int port);
void setInputPortLevel(int port,int level);
int outputPortLevel(int port);
void setOutputPortLevel(int port,int level);
public:
enum PortType {Analog=0,AesEbu=1,SpDiff=2};
RDAudioPort(QString station,int card);
QString station() const;
int card() const;
RDCae::ClockSource clockSource();
void setClockSource(RDCae::ClockSource src);
QString inputPortLabel(int port) const;
void setInputPortLabel(int port,const QString &str);
RDAudioPort::PortType inputPortType(int port);
void setInputPortType(int port,RDAudioPort::PortType type);
RDCae::ChannelMode inputPortMode(int port);
void setInputPortMode(int port,RDCae::ChannelMode mode);
int inputPortLevel(int port);
void setInputPortLevel(int port,int level);
QString outputPortLabel(int port) const;
void setOutputPortLabel(int port,const QString &str);
int outputPortLevel(int port);
void setOutputPortLevel(int port,int level);
private:
QString port_station;
int port_card;
int audio_input_port_level[RD_MAX_PORTS];
int audio_output_port_level[RD_MAX_PORTS];
RDAudioPort::PortType audio_input_port_type[RD_MAX_PORTS];
RDCae::ChannelMode audio_input_port_mode[RD_MAX_PORTS];
private:
QString port_station;
int port_card;
QString audio_input_port_labels[RD_MAX_PORTS];
int audio_input_port_level[RD_MAX_PORTS];
RDAudioPort::PortType audio_input_port_type[RD_MAX_PORTS];
RDCae::ChannelMode audio_input_port_mode[RD_MAX_PORTS];
int audio_output_port_level[RD_MAX_PORTS];
QString audio_output_port_labels[RD_MAX_PORTS];
};
#endif
#endif // RDAUDIO_PORT_H