mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-18 19:36:00 +01:00
code cleanup, fix process group bug, move to more advanced topology, avoid bug with multi-assignment, tweaks for new SG SDK
git-svn-id: svn://localhost/ardour2/branches/3.0-SG@13383 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4fd63d89ce
commit
7b995e773e
7 changed files with 95 additions and 281 deletions
|
|
@ -724,7 +724,8 @@ EngineControl::enumerate_devices (const string& driver)
|
|||
|
||||
soundgrid_init (inputs_adjustment.get_value(), outputs_adjustment.get_value(),
|
||||
16, /* max tracks */
|
||||
16 /* max busses */
|
||||
16, /* max busses */
|
||||
8 /* max plugins per track */
|
||||
);
|
||||
devices[driver] = SoundGrid::lan_port_names();
|
||||
|
||||
|
|
@ -948,7 +949,6 @@ EngineControl::interface_changed ()
|
|||
}
|
||||
|
||||
set_soundgrid_parameters ();
|
||||
refill_soundgrid_inventory ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1454,181 +1454,6 @@ EngineControl::set_state (const XMLNode& root)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
EngineControl::create_soundgrid_inventory ()
|
||||
{
|
||||
vector<uint32_t> latencies = SoundGrid::possible_network_buffer_sizes ();
|
||||
vector<string> latency_strings;
|
||||
stringstream s;
|
||||
|
||||
for (vector<uint32_t>::iterator i = latencies.begin(); i != latencies.end(); ++i) {
|
||||
s.str (std::string());
|
||||
s << *i;
|
||||
latency_strings.push_back (s.str());
|
||||
}
|
||||
|
||||
Gtk::ComboBoxText* latency_combo;
|
||||
latency_combo = manage (new Gtk::ComboBoxText);
|
||||
set_popdown_strings (*latency_combo, latency_strings);
|
||||
s.str (std::string());
|
||||
s << SoundGrid::current_network_buffer_size();
|
||||
latency_combo->set_active_text (s.str());
|
||||
|
||||
Gtk::HBox* hb = manage (new HBox);
|
||||
Label* l;
|
||||
l = manage (new Label (_("AUDIO PARAMETERS")));
|
||||
l->set_alignment (0, 0.5);
|
||||
hb->pack_start (*l, false, false, 10);
|
||||
hb->pack_end (*latency_combo, false, true);
|
||||
|
||||
soundgrid_vbox.set_spacing (10);
|
||||
soundgrid_vbox.set_border_width (6);
|
||||
soundgrid_vbox.pack_start (*hb, false, false);
|
||||
|
||||
soundgrid_iobox_model = TreeStore::create (sg_iobox_columns);
|
||||
soundgrid_iobox_display.set_model (soundgrid_iobox_model);
|
||||
|
||||
soundgrid_server_model = TreeStore::create (sg_server_columns);
|
||||
soundgrid_server_display.set_model (soundgrid_server_model);
|
||||
|
||||
/* IO Boxes etc. */
|
||||
|
||||
l = manage (new Label (_("Input/Output Devices")));
|
||||
l->set_alignment (0.0, 0.5);
|
||||
soundgrid_vbox.pack_start (*l, false, false);
|
||||
|
||||
sg_assignment_model = TreeStore::create (sg_assignment_columns);
|
||||
TreeModel::Row r;
|
||||
for (uint32_t i = 0; i < 5; ++i) {
|
||||
r = *(sg_assignment_model->append());
|
||||
r[sg_assignment_columns.number] = i;
|
||||
}
|
||||
|
||||
CellRendererCombo* assign_renderer = manage (new CellRendererCombo);
|
||||
assign_renderer->property_model() = sg_assignment_model;
|
||||
assign_renderer->property_editable() = true;
|
||||
assign_renderer->property_text_column() = 0;
|
||||
TreeViewColumn* cc = manage (new TreeViewColumn (_("Assign"), *assign_renderer));
|
||||
cc->add_attribute (assign_renderer->property_text(), sg_iobox_columns.assign);
|
||||
soundgrid_iobox_display.append_column (*cc);
|
||||
|
||||
soundgrid_iobox_display.append_column (_("Device"), sg_iobox_columns.device);
|
||||
|
||||
CellRendererSpin* channel_renderer = manage (new CellRendererSpin);
|
||||
Gtk::Adjustment* adj = manage (new Adjustment (0, 0, 512, 1, 1));
|
||||
channel_renderer->property_adjustment() = adj;
|
||||
channel_renderer->property_editable() = true;
|
||||
cc = manage (new TreeViewColumn (_("Channels"), *channel_renderer));
|
||||
cc->add_attribute (channel_renderer->property_text(), sg_iobox_columns.channels);
|
||||
soundgrid_iobox_display.append_column (*cc);
|
||||
|
||||
soundgrid_iobox_display.append_column (_("Name"), sg_iobox_columns.name);
|
||||
soundgrid_iobox_display.append_column (_("MAC Address/\nComputer Name"), sg_iobox_columns.mac);
|
||||
soundgrid_iobox_display.append_column (_("Status"), sg_iobox_columns.status);
|
||||
|
||||
l = manage (new Label (_("ID")));
|
||||
Gtkmm2ext::UI::instance()->set_tip (*l, _("Click to identify physical I/O box"));
|
||||
|
||||
soundgrid_iobox_display.append_column ("", sg_iobox_columns.id);
|
||||
TreeViewColumn* col = soundgrid_iobox_display.get_column (6);
|
||||
col->set_widget (*l);
|
||||
l->show ();
|
||||
|
||||
soundgrid_iobox_display.set_rules_hint (true);
|
||||
|
||||
soundgrid_vbox.pack_start (soundgrid_iobox_display);
|
||||
|
||||
/* Server Display */
|
||||
|
||||
l = manage (new Label (_("SoundGrid Servers")));
|
||||
l->set_alignment (0.0, 0.5);
|
||||
soundgrid_vbox.pack_start (*l, false, false);
|
||||
|
||||
assign_renderer = manage (new CellRendererCombo);
|
||||
assign_renderer->property_model() = sg_assignment_model;
|
||||
assign_renderer->property_editable() = true;
|
||||
assign_renderer->property_text_column() = 0;
|
||||
cc = manage (new TreeViewColumn (_("Assign"), *assign_renderer));
|
||||
cc->add_attribute (assign_renderer->property_text(), sg_server_columns.assign);
|
||||
soundgrid_server_display.append_column (*cc);
|
||||
soundgrid_server_display.append_column (_("Name"), sg_server_columns.name);
|
||||
|
||||
channel_renderer = manage (new CellRendererSpin);
|
||||
adj = manage (new Adjustment (0, 0, 512, 1, 1));
|
||||
channel_renderer->property_adjustment() = adj;
|
||||
channel_renderer->property_editable() = true;
|
||||
cc = manage (new TreeViewColumn (_("Channels"), *channel_renderer));
|
||||
cc->add_attribute (channel_renderer->property_text(), sg_server_columns.channels);
|
||||
soundgrid_server_display.append_column (*cc);
|
||||
|
||||
soundgrid_server_display.append_column (_("MAC Address/\nComputer Name"), sg_server_columns.mac);
|
||||
|
||||
soundgrid_vbox.pack_start (soundgrid_server_display);
|
||||
soundgrid_vbox.show_all ();
|
||||
}
|
||||
|
||||
void
|
||||
EngineControl::refill_soundgrid_inventory ()
|
||||
{
|
||||
if (soundgrid_vbox.children().empty()) {
|
||||
create_soundgrid_inventory ();
|
||||
}
|
||||
|
||||
SoundGrid::Inventory inventory;
|
||||
SoundGrid::update_inventory (inventory);
|
||||
|
||||
soundgrid_iobox_display.set_model (Glib::RefPtr<TreeModel>(0));
|
||||
soundgrid_iobox_model->clear ();
|
||||
|
||||
soundgrid_server_display.set_model (Glib::RefPtr<TreeModel>(0));
|
||||
soundgrid_server_model->clear ();
|
||||
|
||||
for (SoundGrid::Inventory::iterator i = inventory.begin(); i != inventory.end(); ++i) {
|
||||
TreeModel::Row row;
|
||||
SoundGrid::IOInventoryItem* ii = dynamic_cast<SoundGrid::IOInventoryItem*> (*i);
|
||||
SoundGrid::SGSInventoryItem* is = dynamic_cast<SoundGrid::SGSInventoryItem*> (*i);
|
||||
|
||||
if (ii) {
|
||||
row = *(soundgrid_iobox_model->append());
|
||||
|
||||
stringstream s;
|
||||
s << ii->assign;
|
||||
row[sg_iobox_columns.assign] = s.str();
|
||||
|
||||
row[sg_iobox_columns.device] = ii->device;
|
||||
|
||||
s.str (std::string());
|
||||
s << ii->channels;
|
||||
row[sg_iobox_columns.channels] = s.str();
|
||||
|
||||
row[sg_iobox_columns.name] = ii->name;
|
||||
row[sg_iobox_columns.mac] = ii->mac;
|
||||
row[sg_iobox_columns.status] = ii->status;
|
||||
row[sg_iobox_columns.id] = "?";
|
||||
|
||||
} else if (is) {
|
||||
|
||||
row = *(soundgrid_server_model->append());
|
||||
|
||||
stringstream s;
|
||||
s << is->assign;
|
||||
row[sg_server_columns.assign] = s.str();
|
||||
|
||||
s.str (std::string());
|
||||
s << is->channels;
|
||||
row[sg_server_columns.channels] = s.str();
|
||||
|
||||
row[sg_server_columns.name] = is->name;
|
||||
row[sg_server_columns.mac] = is->mac;
|
||||
}
|
||||
}
|
||||
|
||||
soundgrid_iobox_display.set_model (soundgrid_iobox_model);
|
||||
soundgrid_server_display.set_model (soundgrid_server_model);
|
||||
|
||||
SoundGrid::clear_inventory (inventory);
|
||||
}
|
||||
|
||||
void
|
||||
EngineControl::set_soundgrid_parameters ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -152,8 +152,7 @@ class EngineControl : public Gtk::VBox {
|
|||
Gtk::TreeView soundgrid_iobox_display;
|
||||
Gtk::TreeView soundgrid_server_display;
|
||||
Gtk::VBox soundgrid_vbox;
|
||||
void create_soundgrid_inventory ();
|
||||
void refill_soundgrid_inventory ();
|
||||
|
||||
void set_soundgrid_parameters ();
|
||||
void soundgrid_configure ();
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,9 @@ soundgrid_driver_init (uint32_t max_phys_inputs, uint32_t max_phys_outputs, uint
|
|||
}
|
||||
|
||||
int
|
||||
soundgrid_init (uint32_t max_phys_inputs, uint32_t max_phys_outputs, uint32_t max_tracks, uint32_t max_busses)
|
||||
soundgrid_init (uint32_t max_phys_inputs, uint32_t max_phys_outputs,
|
||||
uint32_t max_tracks, uint32_t max_busses,
|
||||
uint32_t max_plugins)
|
||||
{
|
||||
/* create a new window that we don't display (at least not as
|
||||
of August 2012, but we can give it to the SoundGrid library
|
||||
|
|
@ -100,8 +102,10 @@ soundgrid_init (uint32_t max_phys_inputs, uint32_t max_phys_outputs, uint32_t ma
|
|||
|
||||
if (ARDOUR::SoundGrid::instance().initialize ([sg_window contentView],
|
||||
max_tracks, max_busses,
|
||||
max_phys_inputs, max_phys_inputs)) {
|
||||
|
||||
max_phys_inputs,
|
||||
max_phys_inputs,
|
||||
max_plugins)) {
|
||||
|
||||
[sg_window release];
|
||||
sg_window = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ class SoundGrid : public boost::noncopyable
|
|||
public:
|
||||
~SoundGrid ();
|
||||
|
||||
int initialize (void* window_handle, uint32_t max_tracks, uint32_t max_busses, uint32_t physical_inputs, uint32_t physical_outputs);
|
||||
int initialize (void* window_handle, uint32_t max_tracks, uint32_t max_busses,
|
||||
uint32_t physical_inputs, uint32_t physical_outputs, uint32_t max_plugins_per_rack);
|
||||
int teardown ();
|
||||
|
||||
static SoundGrid& instance();
|
||||
|
|
@ -87,10 +88,9 @@ class SoundGrid : public boost::noncopyable
|
|||
|
||||
static PBD::Signal0<void> Shutdown;
|
||||
|
||||
bool add_rack_synchronous (uint32_t clusterType, int32_t process_group, uint32_t channels, uint32_t& trackHandle);
|
||||
bool add_rack_asynchronous (uint32_t clusterType, int32_t process_group, uint32_t channels);
|
||||
bool remove_rack_synchronous (uint32_t clusterType, uint32_t trackHandle);
|
||||
bool remove_all_racks_synchronous ();
|
||||
bool add_rack (uint32_t clusterType, int32_t process_group, uint32_t channels, uint32_t& trackHandle);
|
||||
bool remove_rack (uint32_t clusterType, uint32_t trackHandle);
|
||||
bool remove_all_racks ();
|
||||
|
||||
int set_gain (uint32_t clusterType, uint32_t trackHandle, double in_gainValue);
|
||||
bool get_gain (uint32_t clusterType, uint32_t trackHandle, double &out_gainValue);
|
||||
|
|
@ -278,6 +278,8 @@ class SoundGrid : public boost::noncopyable
|
|||
WSCoreCallbackTable _callback_table;
|
||||
WSMixerConfig _mixer_config;
|
||||
|
||||
uint32_t _max_plugins;
|
||||
|
||||
void display_update ();
|
||||
static void _display_update ();
|
||||
|
||||
|
|
|
|||
|
|
@ -44,13 +44,16 @@ SoundGridRack::SoundGridRack (Session& s, Route& r, const std::string& name)
|
|||
DEBUG_TRACE (DEBUG::SoundGrid, string_compose ("Creating SG Chainer for %1\n", r.name()));
|
||||
|
||||
if (dynamic_cast<Track*> (&r) != 0 && !_route.is_hidden()) {
|
||||
/* only real tracks use an InputTrack. the auditioner is a track, but
|
||||
it doesn't need any input
|
||||
*/
|
||||
_cluster_type = eClusterType_InputTrack;
|
||||
} else {
|
||||
/* bus */
|
||||
_cluster_type = eClusterType_GroupTrack;
|
||||
}
|
||||
|
||||
int32_t process_group;
|
||||
int32_t process_group = 0;
|
||||
|
||||
/* XXX eventually these need to be discovered from the route which sets them during a graph sort
|
||||
*/
|
||||
|
|
@ -58,18 +61,15 @@ SoundGridRack::SoundGridRack (Session& s, Route& r, const std::string& name)
|
|||
if (_route.is_monitor()) {
|
||||
/* monitor runs last */
|
||||
process_group = 6;
|
||||
} else if (_route.is_monitor()) {
|
||||
} else if (_route.is_master()) {
|
||||
/* master runs before monitor */
|
||||
process_group = 5;
|
||||
} else if (dynamic_cast<Track*>(&_route)) {
|
||||
/* tracks run before busses */
|
||||
} else if (dynamic_cast<Track*>(&_route) == 0) {
|
||||
/* busses run before tracks */
|
||||
process_group = 1;
|
||||
} else {
|
||||
/* busses run after tracks */
|
||||
process_group = 2;
|
||||
}
|
||||
|
||||
if (SoundGrid::instance().add_rack_synchronous (_cluster_type, process_group, r.n_outputs().n_audio(), _rack_id)) {
|
||||
if (SoundGrid::instance().add_rack (_cluster_type, process_group, r.n_outputs().n_audio(), _rack_id)) {
|
||||
throw failed_constructor();
|
||||
}
|
||||
|
||||
|
|
@ -82,10 +82,12 @@ SoundGridRack::SoundGridRack (Session& s, Route& r, const std::string& name)
|
|||
|
||||
SoundGridRack::~SoundGridRack ()
|
||||
{
|
||||
if (_rack_id != UINT32_MAX) {
|
||||
DEBUG_TRACE (DEBUG::SoundGrid, string_compose ("Destroying SG Chainer for %1\n", _route.name()));
|
||||
(void) SoundGrid::instance().remove_rack_synchronous (_cluster_type, _rack_id);
|
||||
if (_rack_id == UINT32_MAX) {
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_TRACE (DEBUG::SoundGrid, string_compose ("Destroying SG Chainer for %1\n", _route.name()));
|
||||
(void) SoundGrid::instance().remove_rack (_cluster_type, _rack_id);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
@ -188,6 +190,7 @@ SoundGridRack::make_connections ()
|
|||
/* wire normal tracks and busses to the master bus */
|
||||
|
||||
SoundGrid::instance().connect (SoundGrid::TrackOutputPort (_rack_id, channel),
|
||||
//SoundGrid::PseudoPhysicalOutputPort (channel)
|
||||
SoundGrid::BusInputPort (master_out->rack_id(), channel));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,13 @@
|
|||
#include <dlfcn.h>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <unistd.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <mach-o/dyld.h>
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#include <WavesMixerCore/API/WCMixerCore_API.h>
|
||||
|
||||
|
|
@ -29,6 +36,7 @@
|
|||
#include "pbd/stacktrace.h"
|
||||
|
||||
#include "ardour/debug.h"
|
||||
#include "ardour/filesystem_paths.h"
|
||||
#include "ardour/soundgrid.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
|
@ -59,42 +67,14 @@ SoundGrid::SoundGrid ()
|
|||
: dl_handle (0)
|
||||
, _sg (0)
|
||||
, _host_handle (0)
|
||||
, _max_plugins (8)
|
||||
{
|
||||
#if 0
|
||||
/* we link against the framework now */
|
||||
|
||||
const char *s;
|
||||
string path;
|
||||
|
||||
s = getenv ("SOUNDGRID_PATH");
|
||||
|
||||
/* Load from some defined location */
|
||||
|
||||
if (!s) {
|
||||
cerr << "SOUNDGRID_PATH not defined - exiting\n";
|
||||
::exit (1);
|
||||
}
|
||||
|
||||
vector<string> p;
|
||||
p.push_back (s);
|
||||
p.push_back (sndgrid_dll_name);
|
||||
|
||||
path = Glib::build_filename (p);
|
||||
|
||||
DEBUG_TRACE (DEBUG::SoundGrid, string_compose ("Loading dylib %1\n", path));
|
||||
|
||||
if ((dl_handle = dlopen (path.c_str(), RTLD_NOW)) == 0) {
|
||||
DEBUG_TRACE (DEBUG::SoundGrid, "\tfailed\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
SoundGrid::~SoundGrid()
|
||||
{
|
||||
if (_sg) {
|
||||
remove_all_racks_synchronous ();
|
||||
remove_all_racks ();
|
||||
UnInitializeMixerCoreDLL (_sg);
|
||||
}
|
||||
|
||||
|
|
@ -105,7 +85,8 @@ SoundGrid::~SoundGrid()
|
|||
|
||||
int
|
||||
SoundGrid::initialize (void* window_handle, uint32_t max_tracks, uint32_t max_busses,
|
||||
uint32_t /*physical_inputs*/, uint32_t physical_outputs)
|
||||
uint32_t /*physical_inputs*/, uint32_t physical_outputs,
|
||||
uint32_t max_plugins_per_rack)
|
||||
{
|
||||
if (!_sg) {
|
||||
WTErr ret;
|
||||
|
|
@ -113,36 +94,46 @@ SoundGrid::initialize (void* window_handle, uint32_t max_tracks, uint32_t max_bu
|
|||
|
||||
WSMixerConfig mixer_limits;
|
||||
Init_WSMixerConfig (&mixer_limits);
|
||||
//the following two are for physical input and output representations
|
||||
mixer_limits.m_clusterConfigs[eClusterType_Inputs].m_uiIndexNum = 2; // 1 for Ardour stuff, 1 for the coreaudio driver/JACK
|
||||
mixer_limits.m_clusterConfigs[eClusterType_Outputs].m_uiIndexNum = 2; // 1 for Ardour stuff, 1 for the coreaudio driver/JACK
|
||||
|
||||
|
||||
max_tracks = 64;
|
||||
|
||||
//the following is for the tracks that this app will create.
|
||||
//This will probably be changed to eClusterType_GroupTrack in future.
|
||||
mixer_limits.m_clusterConfigs[eClusterType_Inputs].m_uiIndexNum = 2; // Physical IO + Device Driver
|
||||
mixer_limits.m_clusterConfigs[eClusterType_Outputs].m_uiIndexNum = 2; // Physical IO + Device Driver
|
||||
mixer_limits.m_clusterConfigs[eClusterType_InputTrack].m_uiIndexNum = max_tracks;
|
||||
|
||||
// number of group (mixing) tracks needs to match the number of physical outputs, plus
|
||||
// the number of busses we expect
|
||||
|
||||
mixer_limits.m_clusterConfigs[eClusterType_GroupTrack].m_uiIndexNum = max_busses + physical_outputs;
|
||||
|
||||
DEBUG_TRACE (DEBUG::SoundGrid, string_compose ("Initializing SG Core with %1 tracks\n", max_tracks));
|
||||
|
||||
// XXX use portable, installable technique for this
|
||||
char execpath[MAXPATHLEN+1];
|
||||
uint32_t pathsz = sizeof (execpath);
|
||||
string driver_path;
|
||||
|
||||
if (getenv ("ARDOUR_BUNDLED") == 0) {
|
||||
#ifdef __APPLE__
|
||||
_NSGetExecutablePath (execpath, &pathsz);
|
||||
#else
|
||||
readlink ("/proc/self/exe", execpath, sizeof(execpath));
|
||||
#endif
|
||||
vector<string> s;
|
||||
s.push_back (Glib::path_get_dirname (execpath));
|
||||
s.push_back ("..");
|
||||
s.push_back ("libs");
|
||||
s.push_back ("soundgrid");
|
||||
s.push_back ("SurfaceDriver_App.bundle");
|
||||
driver_path = Glib::build_filename (s);
|
||||
} else {
|
||||
driver_path = Glib::build_filename (ardour_dll_directory(), "SurfaceDriver_App.bundle");
|
||||
}
|
||||
|
||||
DEBUG_TRACE (DEBUG::SoundGrid, string_compose ("driver path: %1\n", driver_path));
|
||||
|
||||
char b[PATH_MAX+1];
|
||||
|
||||
getcwd (b, PATH_MAX);
|
||||
string driver_path = b;
|
||||
driver_path += "/../build/libs/soundgrid/SurfaceDriver_App.bundle";
|
||||
|
||||
if ((ret = InitializeMixerCoreDLL (&mixer_limits, driver_path.c_str(), window_handle, _sg_callback, this, &_sg)) != eNoErr) {
|
||||
DEBUG_TRACE (DEBUG::SoundGrid, string_compose ("Failed to initialize SG core, ret = %1 core handle %2\n", ret, _sg));
|
||||
return -1;
|
||||
}
|
||||
|
||||
_max_plugins = max_plugins_per_rack;
|
||||
|
||||
DEBUG_TRACE (DEBUG::SoundGrid, string_compose ("Initialized SG core, core handle %1\n", _sg));
|
||||
} else {
|
||||
DEBUG_TRACE (DEBUG::SoundGrid, "SG core already initialized...\n");
|
||||
|
|
@ -229,14 +220,10 @@ SoundGrid::configure_driver (uint32_t inputs, uint32_t outputs, uint32_t tracks)
|
|||
/* process group is set to 7, because these should run last no matter what
|
||||
*/
|
||||
|
||||
if (add_rack_synchronous (eClusterType_GroupTrack, 7, 1, handle)) {
|
||||
if (add_rack (eClusterType_GroupTrack, 0, 1, handle)) {
|
||||
error << string_compose (_("Cannot create mixing channel for driver output %1"), n) << endmsg;
|
||||
return -1;
|
||||
}
|
||||
if (set_gain (eClusterType_GroupTrack, handle, 1000.0)) {
|
||||
error << string_compose (_("Cannot set gain for mixing channel for driver output %1"), n) << endmsg;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (outputs) {
|
||||
|
|
@ -247,12 +234,12 @@ SoundGrid::configure_driver (uint32_t inputs, uint32_t outputs, uint32_t tracks)
|
|||
|
||||
ARDOUR::SoundGrid::BusOutputPort src (n, 0); // single output of the group track
|
||||
ARDOUR::SoundGrid::PhysicalOutputPort dst (n); // real physical channel where the signal should go
|
||||
|
||||
WSAudioAssignment &assignment (outputsCommand.in_Assignments.m_aAssignments[n]);
|
||||
|
||||
src.set_source (assignment);
|
||||
dst.set_destination (assignment);
|
||||
}
|
||||
|
||||
|
||||
int ret = command (&outputsCommand.m_command);
|
||||
|
||||
Dispose_WSAudioAssignmentBatch (&outputsCommand.in_Assignments);
|
||||
|
|
@ -263,7 +250,7 @@ SoundGrid::configure_driver (uint32_t inputs, uint32_t outputs, uint32_t tracks)
|
|||
}
|
||||
|
||||
/* wire up inputs and outputs */
|
||||
|
||||
|
||||
if (inputs) {
|
||||
|
||||
DEBUG_TRACE (DEBUG::SoundGrid, string_compose ("setting up wiring for %1 inputs\n", inputs));
|
||||
|
|
@ -299,14 +286,17 @@ SoundGrid::configure_driver (uint32_t inputs, uint32_t outputs, uint32_t tracks)
|
|||
|
||||
for (uint32_t n = 0; n < outputs; ++n) {
|
||||
|
||||
ARDOUR::SoundGrid::DriverInputPort src (n); // writable driver/JACK port
|
||||
ARDOUR::SoundGrid::DriverInputPort src (n); // writable driver/JACK channel/port
|
||||
ARDOUR::SoundGrid::PseudoPhysicalOutputPort dst (n); // physical channel where the signal should go
|
||||
connect (src, dst);
|
||||
#if 0
|
||||
WSAudioAssignment &assignment (outputsCommand.in_Assignments.m_aAssignments[n]);
|
||||
|
||||
src.set_source (assignment);
|
||||
dst.set_destination (assignment);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
int ret = command (&outputsCommand.m_command);
|
||||
|
||||
Dispose_WSAudioAssignmentBatch (&outputsCommand.in_Assignments);
|
||||
|
|
@ -314,6 +304,7 @@ SoundGrid::configure_driver (uint32_t inputs, uint32_t outputs, uint32_t tracks)
|
|||
if (ret != 0) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -704,16 +695,21 @@ SoundGrid::assignment_complete (WSCommand* cmd)
|
|||
/* Actually do stuff */
|
||||
|
||||
bool
|
||||
SoundGrid::add_rack_synchronous (uint32_t clusterType, int32_t process_group, uint32_t channels, uint32_t &trackHandle)
|
||||
SoundGrid::add_rack (uint32_t clusterType, int32_t process_group, uint32_t channels, uint32_t &trackHandle)
|
||||
{
|
||||
WSAddTrackCommand myCommand;
|
||||
|
||||
channels = 1;
|
||||
if (channels == 0) {
|
||||
/* we can change it later, but we can get here during initial setup when
|
||||
a route has no outputs.
|
||||
*/
|
||||
channels = 1;
|
||||
}
|
||||
|
||||
DEBUG_TRACE (DEBUG::SoundGrid, string_compose ("add rack sync, type %1 channels %2 pgroup %3\n",
|
||||
clusterType, channels, process_group));
|
||||
|
||||
command (Init_WSAddTrackCommand (&myCommand, clusterType, channels, process_group, (WSDControllerHandle)this, 0));
|
||||
command (Init_WSAddTrackCommand (&myCommand, clusterType, channels, process_group, _max_plugins, (WSDControllerHandle)this, 0));
|
||||
|
||||
if (0 == myCommand.m_command.out_status) {
|
||||
trackHandle = myCommand.out_trackID.clusterHandle;
|
||||
|
|
@ -724,19 +720,7 @@ SoundGrid::add_rack_synchronous (uint32_t clusterType, int32_t process_group, ui
|
|||
}
|
||||
|
||||
bool
|
||||
SoundGrid::add_rack_asynchronous (uint32_t clusterType, int32_t process_group, uint32_t channels)
|
||||
{
|
||||
WSAddTrackCommand *pMyCommand = new WSAddTrackCommand;
|
||||
|
||||
channels = 1;
|
||||
|
||||
WMSDErr errCode = command (Init_WSAddTrackCommand (pMyCommand, clusterType, channels, process_group, (WSDControllerHandle)this, pMyCommand));
|
||||
|
||||
return (WMSD_Pending == errCode);
|
||||
}
|
||||
|
||||
bool
|
||||
SoundGrid::remove_rack_synchronous (uint32_t clusterType, uint32_t trackHandle)
|
||||
SoundGrid::remove_rack (uint32_t clusterType, uint32_t trackHandle)
|
||||
{
|
||||
WSRemoveTrackCommand myCommand;
|
||||
|
||||
|
|
@ -746,7 +730,7 @@ SoundGrid::remove_rack_synchronous (uint32_t clusterType, uint32_t trackHandle)
|
|||
}
|
||||
|
||||
bool
|
||||
SoundGrid::remove_all_racks_synchronous ()
|
||||
SoundGrid::remove_all_racks ()
|
||||
{
|
||||
WSCommand myCommand;
|
||||
|
||||
|
|
@ -757,7 +741,7 @@ SoundGrid::remove_all_racks_synchronous ()
|
|||
}
|
||||
|
||||
int
|
||||
SoundGrid::set_gain (uint32_t in_clusterType, uint32_t in_trackHandle, double in_gainValue)
|
||||
SoundGrid::set_gain (uint32_t clusterType, uint32_t trackHandle, double in_gainValue)
|
||||
{
|
||||
WSEvent faderEvent;
|
||||
Init_WSEvent(&faderEvent);
|
||||
|
|
@ -766,8 +750,8 @@ SoundGrid::set_gain (uint32_t in_clusterType, uint32_t in_trackHandle, double in
|
|||
faderEvent.controllerValue = in_gainValue;
|
||||
|
||||
Init_WSControlID(&faderEvent.controlID);
|
||||
faderEvent.controlID.clusterID.clusterType = in_clusterType;
|
||||
faderEvent.controlID.clusterID.clusterHandle = in_trackHandle;
|
||||
faderEvent.controlID.clusterID.clusterType = clusterType;
|
||||
faderEvent.controlID.clusterID.clusterHandle = trackHandle;
|
||||
|
||||
faderEvent.controlID.sectionControlID.sectionType = eControlType_Output;
|
||||
faderEvent.controlID.sectionControlID.sectionIndex = eControlType_Output_Local;
|
||||
|
|
@ -1119,9 +1103,6 @@ operator<< (std::ostream& out, const SoundGrid::Port& p)
|
|||
case eControlID_Input_Choose_Link_UnLink:
|
||||
out << "choose_link_unlink";
|
||||
break;
|
||||
case eControlID_Input_Trim:
|
||||
out << "trim";
|
||||
break;
|
||||
case eControlID_Input_Phase_On_Off:
|
||||
out << "phase_on_off";
|
||||
break;
|
||||
|
|
|
|||
4
wscript
4
wscript
|
|
@ -571,7 +571,7 @@ def configure(conf):
|
|||
'-DUSE_SOUNDGRID',
|
||||
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid',
|
||||
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesMixerAPI/1.0',
|
||||
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesPublicAPI/1.0',
|
||||
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesPublicAPI/1.1',
|
||||
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesPublicAPIs/',
|
||||
])
|
||||
conf.env.append_value ('CFLAGS_SOUNDGRID',
|
||||
|
|
@ -579,7 +579,7 @@ def configure(conf):
|
|||
'-DUSE_SOUNDGRID',
|
||||
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid',
|
||||
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesMixerAPI/1.0',
|
||||
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesPublicAPI/1.0',
|
||||
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesPublicAPI/1.1',
|
||||
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesPublicAPIs/',
|
||||
])
|
||||
conf.env.append_value ('LINKFLAGS_SOUNDGRID',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue