mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-09 14:33:28 +02:00
2020-02-19 Fred Gleason <fredg@paravelsystems.com>
* Added a 'Disconnect All Jack Ports' ['JZ'] RML.
This commit is contained in:
parent
919141c27c
commit
4ccf01f029
@ -19651,3 +19651,5 @@
|
||||
when updating the Label Widget.
|
||||
2020-02-18 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Removed the 'RDLabel' widget.
|
||||
2020-02-19 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'Disconnect All Jack Ports' ['JZ'] RML.
|
||||
|
@ -514,6 +514,31 @@
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="sect.rml.disconnect_all_jack_ports__jz_">
|
||||
<title>Disconnect All Jack Ports [JZ]</title>
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>Module</term>
|
||||
<listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Mnemonic</term>
|
||||
<listitem><userinput>JZ</userinput></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
Disconnect all JACK input port connections.
|
||||
</para>
|
||||
<para>
|
||||
<userinput>JZ!</userinput>
|
||||
</para>
|
||||
<para>
|
||||
Attempt to disconnect all JACK port connections.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="sect.rml.duck_panel_button__pd_">
|
||||
<title>Duck Panel Button [PD]</title>
|
||||
<para>
|
||||
|
@ -76,6 +76,7 @@ void RDMacro::setCommand(const QString &str)
|
||||
case RDMacro::GO:
|
||||
case RDMacro::JC:
|
||||
case RDMacro::JD:
|
||||
case RDMacro::JZ:
|
||||
case RDMacro::LB:
|
||||
case RDMacro::LC:
|
||||
case RDMacro::LL:
|
||||
@ -315,6 +316,7 @@ RDMacro RDMacro::fromString(const QString &str,RDMacro::Role role)
|
||||
case RDMacro::GO:
|
||||
case RDMacro::JC:
|
||||
case RDMacro::JD:
|
||||
case RDMacro::JZ:
|
||||
case RDMacro::LB:
|
||||
case RDMacro::LC:
|
||||
case RDMacro::LL:
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A container class for a Rivendell Macro Language Command
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2020 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
|
||||
@ -36,13 +36,14 @@ class RDMacro
|
||||
enum Command {AG=0x4147,AL=0x414C,BO=0x424F,CC=0x4343,CE=0x4345,CL=0x434C,
|
||||
CP=0x4350,DL=0x444C,DP=0x4450,DS=0x4453,DX=0x4458,EX=0x4558,
|
||||
FS=0x4653,GE=0x4745,GI=0x4749,GO=0x474F,JC=0x4A43,JD=0x4A44,
|
||||
LB=0x4C42,LC=0x4C43,LL=0x4C4C,LO=0x4C4F,MB=0x4D42,MD=0x4D44,
|
||||
MN=0x4D4E,MT=0x4D54,NN=0x4E4E,PB=0x5042,PC=0x5043,PD=0x5044,
|
||||
PE=0x5045,PL=0x504C,PM=0x504D,PN=0x504E,PP=0x5050,PS=0x5053,
|
||||
PT=0x5054,PU=0x5055,PW=0x5057,PX=0x5058,RL=0x524C,RN=0x524E,
|
||||
RS=0x5253,RR=0x5252,SA=0x5341,SC=0x5343,SD=0x5344,SG=0x5347,
|
||||
SI=0x5349,SL=0x534C,SN=0x534e,SO=0x534F,SP=0x5350,SR=0x5352,
|
||||
ST=0x5354,SX=0x5358,SY=0x5359,SZ=0x535A,TA=0x5441,UO=0x554F};
|
||||
JZ=0x4A5A,LB=0x4C42,LC=0x4C43,LL=0x4C4C,LO=0x4C4F,MB=0x4D42,
|
||||
MD=0x4D44,MN=0x4D4E,MT=0x4D54,NN=0x4E4E,PB=0x5042,PC=0x5043,
|
||||
PD=0x5044,PE=0x5045,PL=0x504C,PM=0x504D,PN=0x504E,PP=0x5050,
|
||||
PS=0x5053,PT=0x5054,PU=0x5055,PW=0x5057,PX=0x5058,RL=0x524C,
|
||||
RN=0x524E,RS=0x5253,RR=0x5252,SA=0x5341,SC=0x5343,SD=0x5344,
|
||||
SG=0x5347,SI=0x5349,SL=0x534C,SN=0x534e,SO=0x534F,SP=0x5350,
|
||||
SR=0x5352,ST=0x5354,SX=0x5358,SY=0x5359,SZ=0x535A,TA=0x5441,
|
||||
UO=0x554F};
|
||||
enum Role {Invalid=0,Cmd=1,Reply=2};
|
||||
RDMacro();
|
||||
RDMacro::Role role() const;
|
||||
|
@ -493,6 +493,57 @@ void MainObject::RunLocalMacros(RDMacro *rml_in)
|
||||
#endif // JACK
|
||||
break;
|
||||
|
||||
case RDMacro::JZ:
|
||||
#ifdef JACK
|
||||
if(rml->argQuantity()!=0) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(ripcd_jack_client!=NULL) {
|
||||
const char **outputs=jack_get_ports(ripcd_jack_client,NULL,
|
||||
JACK_DEFAULT_AUDIO_TYPE,
|
||||
JackPortIsOutput);
|
||||
if(outputs) {
|
||||
int i=0;
|
||||
while(outputs[i]!=0) {
|
||||
jack_port_t *oport=jack_port_by_name(ripcd_jack_client,outputs[i]);
|
||||
const char **inputs=
|
||||
jack_port_get_all_connections(ripcd_jack_client,oport);
|
||||
if(inputs) {
|
||||
int j=0;
|
||||
while(inputs[j]!=0) {
|
||||
if((err=jack_disconnect(ripcd_jack_client,outputs[i],inputs[j]))==0) {
|
||||
rda->syslog(LOG_DEBUG,
|
||||
"executed JACK port disconnection \"%s %s\"",
|
||||
inputs[j],outputs[i]);
|
||||
}
|
||||
else {
|
||||
rda->syslog(LOG_WARNING,
|
||||
"JACK port disconnection \"%s %s\" failed, err: %d",
|
||||
inputs[j],outputs[i],err);
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
sendRml(rml);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
sendRml(rml);
|
||||
}
|
||||
#endif // JACK
|
||||
break;
|
||||
|
||||
case RDMacro::LO:
|
||||
if(rml->argQuantity()>2) {
|
||||
if(rml->echoRequested()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user