Commit b55a8300 authored by jcacerec's avatar jcacerec
Browse files

Automatically connect ports to physical capture and playbacks

parent 7933aa1b
---
1.0 Alpha 2
1.0.1 Alpha
- (added) jamlink mode to connect with jamlink boxes
- (fixed) thread priority in both Linux and Mac OS X (still need some work on the Mac OS X version)
- (fixed) Bug that was causing plug-ins not to behave correctly
- (added) Loopback mode
- (added) Underrun Modes: Wavetable (default) and set to zeros
- (added) Check for peer audio settings, program exists if they don't match
- (added) Automatically connect ports to available physical audio interface.
---
1.0 Alpha 1 - initial release
1.0 Alpha - initial release
......@@ -46,14 +46,79 @@
JackTrip: A System for High-Quality Audio Network Performance
over the Internet.
JackTrip is a Linux and Mac OS X-based system used for multi-machine network
performance over the Internet. It supports any number of channels
(as many as the computer/network can handle) of bidirectional, high quality,
uncompressed audio signal steaming.
You can use it between any combination of Linux and Mac OS X
(i.e., one end using Linux can connect to the other using Mac OS X).
It is currently being developed and actively tested at CCRMA by the SoundWIRE group.
\section install_sec Installation
Download the latest release:
<a href="https://sourceforge.net/project/showfiles.php?group_id=236811">Download</a>
\subsection Linux
Please read the documentation inside the packet to install.
\subsection install_subsec_osx Mac OS X Requirements
You'll need: <a href="http://www.jackosx.com/">Jack OS X</a>.
The documentation explains how to install it and set it up, and it's highly recommended.
Jack OS X comes with JackPilot to do the audio routing.
An alternative is <a href="http://qjackctl.sourceforge.net/">qjackctl</a>,
which I find easier to use. You can find the binary here:
<a href="http://www.ardour.org/osx_system_requirements">qjackctl mac binary</a>
If you use Leopard, you won't need to configure the UDP ports manually.
\subsubsection install_linux Linux Requirements
Please read the documentation inside the packet to compile and install in linux.\n
The older version of JackTrip is documented
<a href="http://ccrma.stanford.edu/groups/soundwire/software/jacktrip/">here</a>.
Please follow those instructions to configure the firewall under
\subsection Mac OS X
\section using Using JackTrip
Type jacktrip in a terminal window to display a help list with all the options.
JackTrip uses Jack as its audio server. You have to make sure that the settings in
Jack are the same in the local and remote machine.
There are two parameters that you want to tweak: Frames/Period and Sample Rate.
The Lower the Frames/Period, the lower the latency.
The higher the Sampling Rate, the higher the bandwidth requirements.
You have to make sure these settings match in both machines.
\image html jack_main_settings.jpg
You also may want to look at the internal buffering
<tt>-q, --queue</tt> parameter in JackTrip. If your connection is very unstable, with a lot of jitter,
you should increase this number at the expense of a higher latency.
The audio bit resolution parameter, <tt>-b, --bitres</tt>, can be use to decrease (or increase)
the bandwidth requirements, at the expense of a lower audio quality.
A basic connection will have one of the nodes as a server:
<tt>jacktrip -s</tt>
And the other as a client
<tt>jacktrip -c [SERVER-IP-NUMBER]</tt>
You'll see a JackTrip client in Jack. Everything you connect into the send ports
will be transmitted to your peer. You'll receive what your peer sends you on the receive ports.
\image html jack_routing.png
*/
......@@ -611,7 +611,7 @@ EXAMPLE_RECURSIVE = NO
# directories that contain image that are included in the documentation (see
# the \image command).
IMAGE_PATH =
IMAGE_PATH = ./documentation/img
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
......
......@@ -45,7 +45,7 @@
#include <QTextStream>
using std::cout; using std::cout;
using std::cout; using std::endl;
//*******************************************************************************
......@@ -575,3 +575,50 @@ void JackAudioInterface::appendProcessPlugin(const std::tr1::shared_ptr<ProcessP
}
mProcessPlugins.append(plugin);
}
//*******************************************************************************
void JackAudioInterface::connectDefaultPorts()
{
const char** physical_ouput_ports;
const char** physical_input_ports;
// Get physical output (capture) ports
if ( (physical_ouput_ports =
jack_get_ports (mClient, NULL, NULL,
JackPortIsPhysical | JackPortIsOutput)) == NULL)
{
cout << "WARING: Cannot find any physical capture ports" << endl;
}
// Connect capure ports to jacktrip send
for (int i = 0; i < mNumInChans; i++)
{
// Check that we don't run out of capture ports
if ( physical_ouput_ports[i] != NULL ) {
jack_connect(mClient, physical_ouput_ports[i], jack_port_name(mInPorts[i]));
}
}
free(physical_ouput_ports);
// Get physical input (playback) ports
if ( (physical_input_ports =
jack_get_ports (mClient, NULL, NULL,
JackPortIsPhysical | JackPortIsInput)) == NULL)
{
cout << "WARING: Cannot find any physical playback ports" << endl;
}
// Connect playback ports to jacktrip receive
for (int i = 0; i < mNumOutChans; i++)
{
// Check that we don't run out of capture ports
if ( physical_input_ports[i] != NULL ) {
jack_connect(mClient, jack_port_name(mOutPorts[i]), physical_input_ports[i]);
}
}
free(physical_input_ports);
}
......@@ -195,6 +195,8 @@ public:
sample_t* output,
const audioBitResolutionT sourceBitResolution);
/// \brief Connect the default ports, capture to sends, and receives to playback
void connectDefaultPorts();
private:
......
......@@ -225,6 +225,7 @@ void JackTrip::start()
}
// Start Threads
mJackAudio->startProcess();
mJackAudio->connectDefaultPorts();
/*
#if defined ( __LINUX__ )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment