Fred Gleason ac45e60949 2023-08-29 Fred Gleason <fredg@paravelsystems.com>
* Removed support for the 'Set Input Volume' ['IV'] CAE command.
	* Removed support for the 'Set Input Level' ['IL'] CAE command.
	* Removed support for the 'Set Output Level' ['OL'] CAE command.
	* Removed support for the 'Set Input Mode' ['IM'] CAE command.
	* Removed support for the 'Set Output Mode' ['OM'] CAE command.
	* Removed support for the 'Set Input Vox Level' ['IX'] CAE command.
	* Removed support for the 'Set Input Type' ['IT'] CAE command.
	* Removed support for the 'Set Clock Source' ['CS'] CAE command.
	* Removed the 'RDCae::setClockSource()' method.
	* Removed the 'RDCae::setInputVolume()' method.
	* Removed the 'RDCae::setInputLevel()' method.
	* Removed the 'RDCae::setOutputLevel()' method.
	* Removed the 'RDCae::setInputMode()' method.
	* Removed the 'RDCae::setOutputMode()' method.
	* Removed the 'RDCae::setInputVOXLevel()' method.
	* Removed the 'RDCae::setInputType()' method.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
2023-08-29 17:39:19 -04:00

1658 lines
41 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<article xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink">
<info>
<title>Rivendell Core Audio Control Protocol</title>
<author>
<personname>
<firstname>Fred</firstname>
<surname>Gleason</surname>
<email>fredg@paravelsystems.com</email>
</personname>
</author>
</info>
<sect1 xml:id="sect.overview">
<title>Overview</title>
<para>
Rivendell's core audio engine [CAE] component runs continuously in
the background, handling all realtime audio tasks for Rivendell, including
audio file capture, play-out and manipulation of the relevant audio mixer
controls. It is implemented as the
<command>caed</command><manvolnum>8</manvolnum> program, which is started
and stopped automatically as needed by the
<command>rivendell</command> Systemd service.
</para>
<para>
This document describes the IPC mechanisms by which other components
of Rivendell can interact with CAE.
</para>
<sect2 xml:id="sect.overview.the_audio_store">
<title>The Audio Store</title>
<para>
After importation, all audio referenced by Rivendell is saved in the
<emphasis>audio store</emphasis>, located at
<computeroutput>/var/snd/</computeroutput>. Audio corresponding to
Rivendell audio cuts as well as Rivendell hosted podcast feeds is kept
in the audio store, organized as follows:
</para>
<sect4 xml:id="sect.overview.the_audio_store.cut_audio">
<title>Cut Audio</title>
<para>
Files are named according to the scheme:
<replaceable>cartnum</replaceable>_<replaceable>cutnum</replaceable>.wav
where <replaceable>cartnum</replaceable> is the containing cart
number, zero padded to be six digits long and
<replaceable>cutnum</replaceable> is the cut number, zero padded
to be three digits long. For example, a file containing audio for cut
<userinput>93</userinput> within cart number
<userinput>1234</userinput> would be contained in a file named
<userinput>001234_093.wav</userinput>.
</para>
<note>
A cut that has been created in the database but has not been populated
with audio (either by importation or realtime capture) will not have
a corresponding file in the audio store.
</note>
<para>
Formats used for cut audio storage are Broadcast Wave Format (BWF), as
specified in
<link xlink:href="https://tech.ebu.ch/publications/tech3285">EBU Tech Pub 3285
</link> with annexes.
</para>
<caution>
It is not correct to assume that files ending with a "wav" extension
in their filename necessarily contain PCM16 audio; other audio formats
are possible, including MPEG 1 Layer II. See
<link xlink:href="https://tech.ebu.ch/publications/tech3285s1">
EBU Tech Pub 3285 Supplement 1
</link> for details.
</caution>
</sect4>
<sect4 xml:id="sect.overview.rss_item_audio">
<title>RSS Item Audio</title>
<para>
Backup copies of the audio for all posted items generated by
Rivendell's podcasting system are named according to the scheme:
<replaceable>feed-id</replaceable>_<replaceable>cast-id</replaceable>.mp3, where <replaceable>feed-id</replaceable> is the integer ID of the RSS feed
to which the item belongs, zero-padded to be six digits long,
and <replaceable>cast-id</replaceable> is the integer ID of the item
itself, padded to be six digits long. For example, a file containing
audio for an item with an feed ID of <userinput>1234</userinput> and
an item ID of <userinput>5678</userinput> would be contained in a file
named <userinput>001234_005678.mp3</userinput>
</para>
All item files contain raw MPEG 1 Layer III frames, optionally
preceded by an ID tag (v2.4).
</sect4>
</sect2>
<sect2 xml:id="sect.communicating_with_the_core_audio_engine">
<title>
Communicating with the Core Audio Engine
</title>
<para>
Commands to the Core Audio Engine are passed by means of packets sent via
a SOCK_DGRAM socket to UDP port 5005 on the recipient system.
</para>
<sect3 xml:id="sect.communicating_with_the_core_audio_engine.command_format">
<title>
Command Format
</title>
<para>
Commands are textual, with fields delimited by the ASCII
<userinput>SPACE</userinput> character (decimal 32), with each
command encapsulated within its own UDP data packet. They have the
following general syntax:
</para>
<para>
<replaceable>cmd-code</replaceable>
[<replaceable>opt0</replaceable> .. <replaceable>optN</replaceable>]
</para>
<para>
All commands sent to and received from CAE must contain the following
session information:
</para>
<para>
<variablelist>
<varlistentry>
<term><replaceable>cmd-code</replaceable></term>
<listitem>
<para>
An ASCII string containing two characters in the range
<code>[A-Z]</code>,
indicating the type of operation to perform.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>opt0</replaceable> .. <replaceable>optN</replaceable>
</term>
<listitem>
<para>
Zero or more command-specific options.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</sect3>
</sect2>
</sect1>
<sect1 xml:id="sect.playback_operations">
<title>Playback Operations</title>
<sect2 xml:id="sect.playback_operations.commands">
<title>Commands</title>
<sect3 xml:id="sect.playback_operations.commands.start_playback">
<title><command>Start Playback</command></title>
<para>
Start play-back of a specified audio file, while also creating an
ongoing session that can be operated upon with the remainder of the
commands documented in this section.
</para>
<para>
<userinput>
PY
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
<replaceable>cut-name</replaceable>
<replaceable>card-num</replaceable>
<replaceable>port-num</replaceable>
<replaceable>start-pos</replaceable>
<replaceable>end-pos</replaceable>
<replaceable>speed</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
An integer value, giving the process ID of the process
originating the command.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
An integer value, giving the serial number of the command.
This can be any 32 bit positive integer value, but
<emphasis>must</emphasis> be unique within the scope of the
process originating the command!
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>cut-name</replaceable>
</term>
<listitem>
The cut name of the target cut.
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>card-num</replaceable>
</term>
<listitem>
The number of the audio card to use.
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>port-num</replaceable>
</term>
<listitem>
The number of the port on the audio card to use.
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>start-pos</replaceable>
</term>
<listitem>
The start position, in milliseconds from absolute start of the
audio PCM data.
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>end-pos</replaceable>
</term>
<listitem>
The position at which to end play-out, in milliseconds from
absolute start of the audio PCM data.
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>speed</replaceable>
</term>
<listitem>
The speed of the play-out, with <userinput>100000</userinput>
indicating 100%.
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.playback_operations.commands.play_position">
<title><command>Play Position</command></title>
<para>
Position the playback cursor of a currently active audio play-out.
</para>
<para>
<userinput>
PP
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
<replaceable>position</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
Integer value. Should be the same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
Integer value. Should be the same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>position</replaceable>
</term>
<listitem>
<para>
Position in file to play from, in milliseconds from absolute
start pf the audio PCM data.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.playback_operations.commands.pause_playback">
<title><command>Pause Playback</command></title>
<para>
Pause playback of the specified play session, while maintaining
the specified session.
</para>
<para>
<userinput>
PE
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
Integer value. Should be the same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
Integer value. Should be the same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.playback_operations.commands.resume_playback">
<title><command>Resume Playback</command></title>
<para>
Resume playback of the specified play session from the current
playback cursor position.
</para>
<para>
<userinput>
PR
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
Integer value. Should be the same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
Integer value. Should be the same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.playback_operations.commands.stop_playback">
<title><command>Stop Playback</command></title>
<para>
Stop playback of the specified play session, closing the associated
audio file and destroying the specified session.
</para>
<para>
<userinput>
SP
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
Integer value. Should be the same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
Integer value. Should be the same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.playback_operations.commands.set_output_volume">
<title><command>Set Output Volume</command></title>
<para>
Set the volume of an active play-out.
</para>
<para>
<userinput>
OV
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
<replaceable>level</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
Integer value. Should be the same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
Integer value. Should be the same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>level</replaceable>
</term>
<listitem>
<para>
The level, in hundreths of a dB.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.playback_operations.commands.fade_output_volume">
<title><command>Fade Output Volume</command></title>
<para>
Transition the volume of an active audio play-out over time.
</para>
<para>
<userinput>
FV
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
<replaceable>level</replaceable>
<replaceable>length</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
Integer value. Should be the same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
Integer value. Should be the same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>level</replaceable>
</term>
<listitem>
<para>
The level, in hundreths of a dB.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>length</replaceable>
</term>
<listitem>
<para>
The length of the transition, in milliseconds.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
</sect2>
<sect2 xml:id="sect.playback_operations.responses">
<title>Responses</title>
<sect3 xml:id="sect.playback_operations.responses.playback_stopped">
<title><command>Playback Stopped</command></title>
<para>
Indicates that the specified play-back session has terminated.
</para>
<para>
<userinput>
SP
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
Integer value. The same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
Integer value. The same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.playback_operations.responses.play_position">
<title><command>Play Position</command></title>
<para>
Indicates the current location of the play cursor.
</para>
<para>
<userinput>
PP
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
<replaceable>position</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
Integer value. The same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
Integer value. The same value as that used in the prior
<link linkend="sect.playback_operations.commands.start_playback">
<command>Start Playback</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>position</replaceable>
</term>
<listitem>
<para>
Current position in file of the play cursor,in milliseconds
from absolute start pf the audio PCM data.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
</sect2>
</sect1>
<sect1 xml:id="sect.record_operations">
<title>Record Operations</title>
<sect2 xml:id="sect.record_operations.commands">
<title>Commands</title>
<sect3 xml:id="sect.record_operations.commands.cue_recording">
<title><command>Cue Recording</command></title>
<para>
Cue recording to an audio file, while also creating an
ongoing session that can be operated upon with the remainder of the
commands documented in this section.
</para>
<para>
<userinput>
LR
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
<replaceable>cut-name</replaceable>
<replaceable>card-num</replaceable>
<replaceable>port-num</replaceable>
<replaceable>coding</replaceable>
<replaceable>channels</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
An integer value, giving the process ID of the process
originating the command.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
An integer value, giving the serial number of the command.
This can be any 32 bit positive integer value, but
<emphasis>must</emphasis> be unique within the scope of the
process originating the command!
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>cut-name</replaceable>
</term>
<listitem>
<para>
The cut name of the target cut. If the cut audio already exists,
it will be overwritten with a new file containing a WAV header,
but no PCM data.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>card-num</replaceable>
</term>
<listitem>
<para>
The number of the audio card.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>port-num</replaceable>
</term>
<listitem>
<para>
The port number to use. This is relative to the audio adapter
selected.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>coding</replaceable>
</term>
<listitem>
<para>
0 = PCM16, 1 = MPEG Layer I, 2 = MPEG Layer II, 4 = PCM24
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>channels</replaceable>
</term>
<listitem>
<para>
1 = Mono, 2 = Stereo
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>samp-rate</replaceable>
</term>
<listitem>
<para>
Sample Rate in samples/sec. 32000, 44100 or 48000 supported.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>bit-rate</replaceable>
</term>
<listitem>
<para>
MPEG Bit Rate. For PCM, this should be zero.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.record_operations.commands.start_recording">
<title><command>Start Recording</command></title>
<para>
Start recording --i.e. sending PCM data to a file. The recording must
be in a cued state (see
<xref linkend="sect.record_operations.commands.cue_recording" />).
To cue and start a recording in a single operation, see
<xref linkend="sect.record_operations.commands.cue_and_start_recording" />.
</para>
<para>
<userinput>
RD
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
<replaceable>length</replaceable>
<replaceable>threshold</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
Integer value. The same value as that used in the prior
<link linkend="sect.record_operations.commands.cue_recording">
<command>Cue Recording</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
Integer value. The same value as that used in the prior
<link linkend="sect.record_operations.commands.cue_recording">
<command>Cue Recording</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>length</replaceable>
</term>
<listitem>
<para>
Length of time to record in milliseconds. If zero, record until
told to stop.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>threshold</replaceable>
</term>
<listitem>
<para>
Threshold of audio detected at which to start recording, in
1/100 dBFs. If '0', start immediately.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.record_operations.commands.cue_and_start_recording">
<title><command>Cue and Start Recording</command></title>
<para>
Cue and Start recording to a file in a single operation.
</para>
<para>
<userinput>
RC
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
<replaceable>cut-name</replaceable>
<replaceable>card-num</replaceable>
<replaceable>port-num</replaceable>
<replaceable>coding</replaceable>
<replaceable>channels</replaceable>
<replaceable>length</replaceable>
<replaceable>threshold</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
An integer value, giving the process ID of the process
originating the command.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
An integer value, giving the serial number of the command.
This can be any 32 bit positive integer value, but
<emphasis>must</emphasis> be unique within the scope of the
process originating the command!
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>cut-name</replaceable>
</term>
<listitem>
<para>
The cut name of the target cut. If the cut audio already exists,
it will be overwritten.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>card-num</replaceable>
</term>
<listitem>
<para>
The number of the audio card.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>port-num</replaceable>
</term>
<listitem>
<para>
The port number to use. This is relative to the audio adapter
selected.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>coding</replaceable>
</term>
<listitem>
<para>
0 = PCM16, 1 = MPEG Layer I, 2 = MPEG Layer II, 4 = PCM24
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>channels</replaceable>
</term>
<listitem>
<para>
1 = Mono, 2 = Stereo
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>samp-rate</replaceable>
</term>
<listitem>
<para>
Sample Rate in samples/sec. 32000, 44100 or 48000 supported.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>bit-rate</replaceable>
</term>
<listitem>
<para>
MPEG Bit Rate. For PCM, this should be zero.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>length</replaceable>
</term>
<listitem>
<para>
Length of time to record in milliseconds. If zero, record until
told to stop.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>threshold</replaceable>
</term>
<listitem>
<para>
Threshold of audio detected at which to start recording, in
1/100 dBFs. If '0', start immediately.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.record_operations.commands.stop_recording">
<title><command>Stop Recording</command></title>
<para>
Stop recording of the specified record interface.
</para>
<para>
<userinput>
SR
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
Integer value. The same value as that used in the prior
<link linkend="sect.record_operations.commands.cue_recording">
<command>Cue Recording</command>
</link>
or
<link linkend="sect.record_operations.commands.cue_and_start_recording">
<command>Cue and Start Recording</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
Integer value. The same value as that used in the prior
<link linkend="sect.record_operations.commands.cue_recording">
<command>Cue Recording</command>
</link>
or
<link linkend="sect.record_operations.commands.cue_and_start_recording">
<command>Cue and Start Recording</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
</sect2>
<sect2 xml:id="sect.record_operations.responses">
<title>Responses</title>
<sect3 xml:id="sect.record_operations.responses.record_state_changed">
<title><command>Record State Changed</command></title>
<para>
Indicate start or stop of specified recording.
(With a VOX event, the actual recording may begin some
time after the interface is placed into record).
</para>
<para>
<computeroutput>
RS
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
<replaceable>state</replaceable>
</computeroutput>
</para>
<variablelist>
<varlistentry>
<term><replaceable>pid</replaceable></term>
<listitem>
<para>
Integer value. The same value as that used in the prior
<link linkend="sect.record_operations.commands.cue_recording">
<command>Cue Recording</command>
</link>
or
<link linkend="sect.record_operations.commands.cue_and_start_recording">
<command>Cue and Start Recording</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>serial</replaceable></term>
<listitem>
<para>
Integer value. The same value as that used in the prior
<link linkend="sect.record_operations.commands.cue_recording">
<command>Cue Recording</command>
</link>
or
<link linkend="sect.record_operations.commands.cue_and_start_recording">
<command>Cue and Start Recording</command>
</link>
operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>state</replaceable>
</term>
<listitem>
<para>
1 = Record has started, 0 = Record has stopped.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
</sect2>
</sect1>
<sect1 xml:id="sect.mixer_operations">
<title>Mixer Operations</title>
<sect2 xml:id="sect.mixer_operations.commands">
<title>Commands</title>
<sect3 xml:id="sect.mixer_operations.commands.get_input_status">
<title><command>Get Input Status</command></title>
<para>
Request the status of an input port.
</para>
<para>
<userinput>
IS
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
<replaceable>card-num</replaceable>
<replaceable>port-num</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term>
<replaceable>card-num</replaceable>
</term>
<listitem>
<para>
The number of the audio adapter to use.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>port-num</replaceable>
</term>
<listitem>
<para>
The port number to use. This is relative to the audio adapter
selected.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.mixer_operations.commands.set_audio_passthrough_level">
<title><command>Set Audio Passthrough Level</command></title>
<para>
Set the gain of an audio passthrough path.
</para>
<para>
<userinput>
AL
<replaceable>pid</replaceable>
<replaceable>serial</replaceable>
<replaceable>card-num</replaceable>
<replaceable>input-num</replaceable>
<replaceable>output-num</replaceable>
<replaceable>level</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term>
<replaceable>card-num</replaceable>
</term>
<listitem>
<para>
The number of the audio adapter to use.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>input-num</replaceable>
</term>
<listitem>
<para>
The input number to use. This is relative to the audio adapter
selected.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>output-num</replaceable>
</term>
<listitem>
<para>
The output number to use. This is relative to the audio adapter
selected.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>level</replaceable>
</term>
<listitem>
<para>
The level, in hundreths of a dB.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.mixer_operations.commands.update_audio_ports">
<title><command>Update Audio Ports</command></title>
<para>
Update all audio ports to match current database settings.
</para>
<para>
<userinput>
AP
</userinput>
</para>
</sect3>
</sect2>
<sect2 xml:id="sect.mixer_operations.responses">
<title>Responses</title>
<sect3 xml:id="sect.mixer_operations.responses.input_status">
<title><command>Input Status</command></title>
<para>
Report the status of an input port.
</para>
<para>
<userinput>
IS
<replaceable>card-num</replaceable>
<replaceable>port-num</replaceable>
</userinput>
</para>
<variablelist>
<varlistentry>
<term>
<replaceable>card-num</replaceable>
</term>
<listitem>
<para>
Audio card number.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>port-num</replaceable>
</term>
<listitem>
<para>
Audio port number.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>status</replaceable>
</term>
<listitem>
<para>
The status, as follows:
<variablelist>
<varlistentry>
<term>
<computeroutput>0</computeroutput>
</term>
<listitem>
<para>
OK
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<computeroutput>1</computeroutput>
</term>
<listitem>
<para>
No Sync
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
</sect2>
</sect1>
<sect1 xml:id="sect.external_operations">
<title>External Operations</title>
<sect2>
<title><command>Open RTP Capture Channel</command></title>
<para>
Open an RTP channel for audio capture.
</para>
<para>
<userinput>CO <replaceable>card-num</replaceable>
<replaceable>port-num</replaceable>
<replaceable>udp-port</replaceable>
<replaceable>samp-rate</replaceable>
<replaceable>channels</replaceable>!</userinput>
</para>
<variablelist>
<varlistentry>
<term>
<replaceable>card-num</replaceable>
</term>
<listitem>
<para>
The number of the audio adapter to use.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>udp-port</replaceable>
</term>
<listitem>
<para>
The port number on the remote system to which to send RTP packets.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>samp-rate</replaceable>
</term>
<listitem>
<para>
The requested sample rate.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>channels</replaceable>
</term>
<listitem>
<para>
The requested number of channels.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
Returns: <computeroutput>CO
<replaceable>card-num</replaceable>
<replaceable>port-num</replaceable>
<replaceable>udp-port</replaceable>
<replaceable>samp-rate</replaceable>
<replaceable>chans</replaceable>
<replaceable>pkt-size</replaceable>!</computeroutput>
</para>
<variablelist>
<varlistentry>
<term>
<replaceable>pkt-size</replaceable>
</term>
<listitem>
<para>
The number of bytes to send per UDP packet.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
The actual sample rate and number of channels may be different from
those requested; clients must be prepared to detect and deal with this
possibility!
</para>
</sect2>
</sect1>
<sect1>
<title>Meter Commands</title>
<sect2>
<title><command>Meter Enable</command></title>
<para>
Set UDP port to which to send meter update messages for the specified
card(s).
</para>
<para>
<userinput>ME
<replaceable>udp-port</replaceable>
<replaceable>card0</replaceable>
<replaceable>..</replaceable>!</userinput>
</para>
<variablelist>
<varlistentry>
<term>
<replaceable>udp-port</replaceable>
</term>
<listitem>
<para>
UDP port number.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>card0</replaceable>
</term>
<listitem>
<para>
Audio card number for which to send updates.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>
<sect1>
<title>Meter Status Updates</title>
<para>
The following messages are sent by CAE to indicate current status and
audio levels. They are sent to the UDP port requested by the Meter
Enable ['ME'] command.
</para>
<sect2>
<title><command>Port Meter Levels</command></title>
<para>
Send current meter level of output stream
</para>
<para>
<computeroutput>ML
<replaceable>type</replaceable>
<replaceable>card-num</replaceable>
<replaceable>port-num</replaceable>
<replaceable>left-lvl</replaceable>
<replaceable>right-lvl</replaceable>!</computeroutput>
</para>
<variablelist>
<varlistentry>
<term>
<replaceable>type</replaceable>
</term>
<listitem>
<para>
Type of meter.
</para>
<variablelist>
<varlistentry>
<term>
<computeroutput>I</computeroutput>
</term>
<listitem>
<para>
Input
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<computeroutput>O</computeroutput>
</term>
<listitem>
<para>
Output
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>card-num</replaceable>
</term>
<listitem>
<para>
The number of the audio adapter to use.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>port-num</replaceable>
</term>
<listitem>
<para>
The port number on the audio adapter.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>left-lvl</replaceable>
</term>
<listitem>
<para>
Left channel level, in 100ths of dBFS.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>right-lvl</replaceable>
</term>
<listitem>
<para>
Right channel level, in 100ths of dBFS.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2>
<title><command>Output Stream Meter Levels</command></title>
<para>
Send current meter level of output stream
</para>
<para>
<computeroutput>MO
<replaceable>card-num</replaceable>
<replaceable>port-num</replaceable>
<replaceable>left-lvl</replaceable>
<replaceable>right-lvl</replaceable>!</computeroutput>
</para>
<variablelist>
<varlistentry>
<term>
<replaceable>card-num</replaceable>
</term>
<listitem>
<para>
The number of the audio adapter to use.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>port-num</replaceable>
</term>
<listitem>
<para>
The port number on the audio adapter.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>left-lvl</replaceable>
</term>
<listitem>
<para>
Left channel level, in 100ths of dBFS.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>right-lvl</replaceable>
</term>
<listitem>
<para>
Right channel level, in 100ths of dBFS.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2>
<title><command>Output Stream Position</command></title>
<para>
Output play position.
</para>
<para>
<computeroutput>MP
<replaceable>card-num</replaceable>
<replaceable>stream-num</replaceable>
<replaceable>pos</replaceable>!</computeroutput>
</para>
<variablelist>
<varlistentry>
<term>
<replaceable>card-num</replaceable>
</term>
<listitem>
<para>
The number of the audio adapter to use.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>stream-num</replaceable>
</term>
<listitem>
<para>
The stream number on the audio adapter.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>pos</replaceable>
</term>
<listitem>
<para>
The play position in mS.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2>
<title><command>Output Stream Status</command></title>
<para>
The current output stream transport status.
</para>
<para>
<computeroutput>MS
<replaceable>card-num</replaceable>
<replaceable>port-num</replaceable>
<replaceable>stream-num</replaceable>
<replaceable>status</replaceable>!</computeroutput>
</para>
<variablelist>
<varlistentry>
<term>
<replaceable>card-num</replaceable>
</term>
<listitem>
<para>
The number of the audio adapter to use.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>port-num</replaceable>
</term>
<listitem>
<para>
The port number on the audio adapter.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>stream-num</replaceable>
</term>
<listitem>
<para>
The stream number on the audio adapter.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>status</replaceable>
</term>
<listitem>
<para>
Current transport status.
<variablelist>
<varlistentry>
<term>
<computeroutput>0</computeroutput>
</term>
<listitem>
Stopped
</listitem>
</varlistentry>
<varlistentry>
<term>
<computeroutput>1</computeroutput>
</term>
<listitem>
Playing
</listitem>
</varlistentry>
</variablelist>
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>
</article>