SConsignFile()
EnsureSConsVersion(0, 96)
-version = '2.0beta2'
+version = '2.0beta5.1'
subst_dict = { }
opts = Options('scache.conf')
opts.AddOptions(
- ('ARCH', 'Set architecture-specific compilation flags by hand (all flags as 1 argument)',''),
+ ('ARCH', 'Set architecture-specific compilation flags by hand (all flags as 1 argument)',''),
BoolOption('AUDIOUNITS', 'Compile with Apple\'s AudioUnit library. (experimental)', 0),
BoolOption('COREAUDIO', 'Compile with Apple\'s CoreAudio library', 0),
BoolOption('DEBUG', 'Set to build with debugging information and no optimizations', 0),
answer = sys.stdin.readline ()
answer = answer.rstrip().strip()
if answer != "yes" and answer != "y":
- print 'You cannot build Ardour with VST support for distribution to others.\nIt is a violation of several different licenses. VST support disabled.'
- env['VST'] = 0;
+ print 'You cannot build Ardour with VST support for distribution to others.\nIt is a violation of several different licenses. Build with VST=false.'
+ sys.exit (-1);
else:
print "OK, VST support will be enabled"
'libs/libsndfile',
'libs/pbd',
'libs/midi++2',
- 'libs/ardour'
+ 'libs/ardour',
+ # these are unconditionally included but have
+ # tests internally to avoid compilation etc
+ # if VST is not set
+ 'libs/fst',
+ 'vst',
+ # this is unconditionally included but has
+ # tests internally to avoid compilation etc
+ # if COREAUDIO is not set
+ 'libs/appleutility'
]
- if env['VST']:
- subdirs = ['libs/fst'] + subdirs + ['vst']
-
- if env['COREAUDIO']:
- subdirs = subdirs + ['libs/appleutility']
-
gtk_subdirs = [
# 'libs/flowcanvas',
'libs/gtkmm2ext',
'libs/libsndfile',
'libs/pbd',
'libs/midi++2',
- 'libs/ardour'
+ 'libs/ardour',
+ # these are unconditionally included but have
+ # tests internally to avoid compilation etc
+ # if VST is not set
+ 'libs/fst',
+ 'vst',
+ # this is unconditionally included but has
+ # tests internally to avoid compilation etc
+ # if COREAUDIO is not set
+ 'libs/appleutility'
]
- if env['VST']:
- subdirs = ['libs/fst'] + subdirs + ['vst']
-
- if env['COREAUDIO']:
- subdirs = subdirs + ['libs/appleutility']
-
gtk_subdirs = [
'libs/glibmm2',
'libs/gtkmm2/pango',
env['ENV']['HOME'] = os.environ['HOME']
final_prefix = '$PREFIX'
-install_prefix = '$DESTDIR/$PREFIX'
-subst_dict['INSTALL_PREFIX'] = install_prefix;
+if env['DESTDIR'] :
+ install_prefix = '$DESTDIR/$PREFIX'
+else:
+ install_prefix = env['PREFIX']
+
+subst_dict['%INSTALL_PREFIX%'] = install_prefix;
+subst_dict['%FINAL_PREFIX%'] = final_prefix;
+subst_dict['%PREFIX%'] = final_prefix;
if env['PREFIX'] == '/usr':
final_config_prefix = '/etc'
config_prefix = '$DESTDIR' + final_config_prefix
-# For colorgcc ( so says the wiki, but it's still not working :/ anyone? )
+# For colorgcc
if os.environ.has_key('PATH'):
env['PATH'] = os.environ['PATH']
if os.environ.has_key('TERM'):
if os.environ.has_key('HOME'):
env['HOME'] = os.environ['HOME']
-
# SCons should really do this for us
conf = Configure (env)
'COPYING', 'PACKAGER_README', 'README',
'ardour.rc.in',
'ardour_system.rc',
- 'tools/config.guess'
+ 'tools/config.guess',
+ 'icons/icon/ardour_icon_mac_mask.png',
+ 'icons/icon/ardour_icon_mac.png',
+ 'icons/icon/ardour_icon_tango_16px_blue.png',
+ 'icons/icon/ardour_icon_tango_16px_red.png',
+ 'icons/icon/ardour_icon_tango_22px_blue.png',
+ 'icons/icon/ardour_icon_tango_22px_red.png',
+ 'icons/icon/ardour_icon_tango_32px_blue.png',
+ 'icons/icon/ardour_icon_tango_32px_red.png',
+ 'icons/icon/ardour_icon_tango_48px_blue.png',
+ 'icons/icon/ardour_icon_tango_48px_red.png'
] +
glob.glob ('DOCUMENTATION/AUTHORS*') +
glob.glob ('DOCUMENTATION/CONTRIBUTORS*') +
srcdist = env.Tarball(env['TARBALL'], env['DISTTREE'])
env.Alias ('srctar', srcdist)
+
#
# don't leave the distree around
#
<?xml version="1.0"?>
<Ardour>
<MIDI-port tag="%MIDITAG%" device="ardour" type="%MIDITYPE%" mode="duplex"/>
+ <MIDI-port tag="control" device="ardour" type="%MIDITYPE%" mode="duplex"/>
<Config>
<Option name="minimum-disk-io-bytes" value="262144"/>
<Option name="track-buffer-seconds" value="5.000000"/>
Import('env install_prefix final_prefix config_prefix libraries i18n version')
gtkardour = env.Copy()
+gtkmmtests = env.Copy()
#
# this defines the version number of the GTK interface to ardour
libraries['jack']
])
+gtkmmtests.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
+
+gtkmmtests.Merge ([
+ libraries['gtkmm2'],
+ libraries['glib2'],
+ libraries['glibmm2'],
+ libraries['pangomm'],
+ libraries['atkmm'],
+ libraries['gdkmm2'],
+ libraries['sigc2'],
+ libraries['gtk2']
+])
+
if gtkardour['DMALLOC']:
gtkardour.Merge([libraries['dmalloc']])
gtkardour.Append(CCFLAGS='-DUSE_DMALLOC')
fft_result.cc
""")
-pixmap_files=glob.glob('pixmaps/*.xpm')
+pixmap_files = glob.glob('pixmaps/*.xpm')
+icon_files = glob.glob ('icons/*.png')
intl_files = gtkardour_files + glob.glob('*.h')
stest.cc
""")
+tt_files=Split ("""
+tt.cc
+""")
+
extra_sources = []
vst_files = [ 'vst_pluginui.cc' ]
mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
itest = gtkardour.Program(target = 'itest', source = itest_files)
rcu = gtkardour.Program(target = 'rcu', source = rcu_files)
+tt = gtkmmtests.Program(target = 'tt', source = tt_files)
my_subst_dict = { }
-my_subst_dict['%INSTALL_PREFIX%'] = install_prefix
+my_subst_dict['%INSTALL_PREFIX%'] = final_prefix
ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.colors'))
# data files
-env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'), 'splash.ppm'))
+env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'), 'splash.png'))
env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/pixmaps'), pixmap_files))
+env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/icons'), icon_files))
#dist
[ 'SConscript',
'i18n.h', 'gettext.h',
'ardour.sh.in',
- 'ardour2_ui.rc', 'splash.ppm',
+ 'ardour2_ui.rc', 'splash.png',
'ardour.menus', 'ardour.bindings', 'ardour.colors',
'editor_xpms'
] +
- gtkardour_files + vst_files + pixmap_files +
- glob.glob('po/*.po') + glob.glob('*.h')))
+ gtkardour_files +
+ vst_files +
+ pixmap_files +
+ icon_files +
+ skipped_files +
+ audiounit_files +
+ fft_analysis_files +
+ glob.glob('po/*.po') + glob.glob('*.h')))
# generate a prototype full-featured ardour_ui.rc file
string path;
string t;
- path = find_data_file ("splash.ppm");
+ path = find_data_file ("splash.png");
Glib::RefPtr<Pixbuf> pixbuf = Gdk::Pixbuf::create_from_file (path);
}
set_translator_credits (t);
- set_copyright (_("Copyright (C) 1999-2005 Paul Davis\n"));
+ set_copyright (_("Copyright (C) 1999-2006 Paul Davis\n"));
set_license (_("Ardour comes with ABSOLUTELY NO WARRANTY\n"
"This is free software, and you are welcome to redistribute it\n"
"under certain conditions; see the file COPYING for details.\n"));
set_name (X_("ardour"));
set_website (X_("http://ardour.org/"));
- set_website_label (X_("ardour.org"));
+ set_website_label (X_("visit http://www.ardour.org/"));
set_version ((string_compose(_("%1\n(built with ardour/gtk %2.%3.%4 libardour: %5.%6.%7)"),
VERSIONSTRING,
gtk_ardour_major_version,
using namespace Glib;
using namespace sigc;
using namespace PBD;
+using namespace ARDOUR;
vector<RefPtr<Gtk::Action> > ActionManager::session_sensitive_actions;
vector<RefPtr<Gtk::Action> > ActionManager::region_list_selection_sensitive_actions;
delete [] group_name;
}
+void
+ActionManager::toggle_config_state (const char* group, const char* action, bool (Configuration::*set)(bool), bool (Configuration::*get)(void) const)
+{
+ Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact) {
+ bool x = (Config->*get)();
+
+ if (x != tact->get_active()) {
+ (Config->*set) (!x);
+ }
+ }
+ }
+}
+
+void
+ActionManager::toggle_config_state (const char* group, const char* action, sigc::slot<void> theSlot)
+{
+ Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ if (tact->get_active()) {
+ theSlot ();
+ }
+ }
+}
+
+void
+ActionManager::map_some_state (const char* group, const char* action, bool (Configuration::*get)() const)
+{
+ Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact) {
+
+ bool x = (Config->*get)();
+
+ if (tact->get_active() != x) {
+ tact->set_active (x);
+ }
+ } else {
+ cerr << group << ':' << action << " is not a toggle\n";
+ }
+ } else {
+ cerr << group << ':' << action << " not an action\n";
+ }
+}
static std::vector<Glib::RefPtr<Gtk::Action> > jack_opposite_sensitive_actions;
static std::vector<Glib::RefPtr<Gtk::Action> > edit_cursor_in_region_sensitive_actions;
+ static void map_some_state (const char* group, const char* action, bool (ARDOUR::Configuration::*get)() const);
+ static void toggle_config_state (const char* group, const char* action, bool (ARDOUR::Configuration::*set)(bool), bool (ARDOUR::Configuration::*get)(void) const);
+ static void toggle_config_state (const char* group, const char* action, sigc::slot<void> theSlot);
+
static void set_sensitive (std::vector<Glib::RefPtr<Gtk::Action> >& actions, bool);
static std::string unbound_string; /* the key string returned if an action is not bound */
for (std::list<ARDOUR::AudioRange>::iterator j = ts.begin(); j != ts.end(); ++j) {
- jack_nframes_t i = 0;
+ nframes_t i = 0;
int n;
while ( i < (*j).length() ) {
continue;
// cerr << " - " << (*j)->region().name() << ": " << (*j)->region().length() << " samples starting at " << (*j)->region().position() << endl;
- jack_nframes_t i = 0;
+ nframes_t i = 0;
int n;
while ( i < arv->region()->length() ) {
#!/bin/sh
dir=`dirname "$0"`
-source $dir/ardev_common.sh
+. $dir/ardev_common.sh
exec gdb gtk2_ardour/ardour.bin $*
#!/bin/sh
-source `dirname "$0"`/ardev_common.sh
+. `dirname "$0"`/ardev_common.sh
exec gtk2_ardour/ardour.bin --novst $*
#export G_DEBUG=fatal_criticals
-export ARDOUR_PATH=gtk2_ardour/glade:gtk2_ardour/pixmaps:gtk2_ardour
+export ARDOUR_PATH=gtk2_ardour/icons:gtk2_ardour/pixmaps:gtk2_ardour
export LD_LIBRARY_PATH=libs/surfaces/control_protocol:libs/ardour:libs/midi++2:libs/pbd:libs/soundtouch:libs/gtkmm2ext:libs/sigc++2:libs/glibmm2:libs/gtkmm2/atk:libs/gtkmm2/pango:libs/gtkmm2/gdk:libs/gtkmm2/gtk:libs/libgnomecanvasmm:libs/libsndfile:libs/appleutility:$LD_LIBRARY_PATH
cEnteredMarker 0.87 0.39 0.39 1.00
cMeterMarker 0.95 0.26 0.36 1.00
cTempoMarker 0.95 0.26 0.36 1.00
-cMeasureLineBar 0.5 0.5 0.5 0.98
-cMeasureLineBeat 0.7 0.7 0.7 0.94
+cMeasureLineBeat 0.55 0.55 0.55 1.00
+cMeasureLineBar 0.45 0.45 0.45 1.00
cGhostTrackBaseOutline 0.00 0.00 0.00 1.00
cGhostTrackBaseFill 0.27 0.00 0.49 0.50
cImageTrackBase 0.87 0.87 0.85 1.00
</menu>
<separator/>
<menu action='Autoconnect'>
- <menuitem action='AutoConnectNewTrackInputsToHardware'/>
+ <menuitem action='InputAutoConnectPhysical'/>
+ <menuitem action='InputAutoConnectManual'/>
<separator/>
- <menuitem action='AutoConnectNewTrackOutputsToHardware'/>
- <menuitem action='AutoConnectNewTrackOutputsToMaster'/>
- <menuitem action='ManuallyConnectNewTrackOutputs'/>
+ <menuitem action='OutputAutoConnectPhysical'/>
+ <menuitem action='OutputAutoConnectMaster'/>
+ <menuitem action='OutputAutoConnectManual'/>
</menu>
<menu action='ControlSurfaces'/>
<menu action='Monitoring'>
<menuitem action='toggle-xfades-active'/>
<menuitem action='toggle-xfades-visible'/>
<menuitem action='toggle-auto-xfades'/>
- <menuitem action='UnmuteNewFullCrossfades'/>
<separator/>
<menuitem action='CrossfadesFull'/>
<menuitem action='CrossfadesShort'/>
<menuitem action='SendMTC'/>
<menuitem action='SendMMC'/>
<menuitem action='UseMMC'/>
- <menuitem action='SendMIDIfeedback'/>
- <menuitem action='UseMIDIcontrol'/>
<separator/>
<menuitem action='StopPluginsWithTransport'/>
<menuitem action='DoNotRunPluginsWhileRecording'/>
GtkWidget::cursor_color = {1.0, 1.0, 1.0 }
GtkButton::default_border = { 0, 0, 0, 0 }
GtkButton::default_outside_border = { 0, 0, 0, 0 }
+ GtkButton::button_relief = GTK_RELIEF_NONE
GtkTreeView::vertical-padding = 0
GtkTreeView::horizontal-padding = 0
fg[INSENSITIVE] = { 0.80, 0.80, 0.80 }
fg[SELECTED] = { 0.80, 0.80, 0.80 }
- bg[NORMAL] = { 0.40, 0.40, 0.40 }
- bg[ACTIVE] = { 0.40, 0.40, 0.40 }
+ bg[NORMAL] = { 0.40, 0.41, 0.41 }
+ bg[ACTIVE] = { 0.40, 0.41, 0.41 }
bg[PRELIGHT] = "#565690"
bg[INSENSITIVE] = { 0.10, 0.10, 0.10 }
bg[SELECTED] = { 0, 0.40, 0.60 }
base[SELECTED] = { 0.25, 0.25, 0.25 }
engine "clearlooks" {
- menubarstyle = 1 # 0 = flat, 1 = sunken, 2 = flat gradient
- menuitemstyle = 1 # 0 = flat, 1 = 3d-ish (gradient), 2 = 3d-ish (button)
- listviewitemstyle = 1 # 0 = flat, 1 = 3d-ish (gradient)
+ menubarstyle = 0 # 0 = flat, 1 = sunken, 2 = flat gradient
+ menuitemstyle = 0 # 0 = flat, 1 = 3d-ish (gradient), 2 = 3d-ish (button)
+ listviewitemstyle = 0 # 0 = flat, 1 = 3d-ish (gradient)
progressbarstyle = 0 # 0 = candy bar, 1 = flat
}
}
bg[ACTIVE] = { 1.0, 0.98, 0.53 }
fg[PRELIGHT] = { 0, 0, 0 }
+ fg[ACTIVE] = { 0, 0, 0 }
}
$Id$
*/
+#define __STDC_FORMAT_MACROS 1
+#include <stdint.h>
+
#include <algorithm>
#include <cmath>
#include <fcntl.h>
sigc::signal<void,bool> ARDOUR_UI::Blink;
sigc::signal<void> ARDOUR_UI::RapidScreenUpdate;
sigc::signal<void> ARDOUR_UI::SuperRapidScreenUpdate;
-sigc::signal<void,jack_nframes_t> ARDOUR_UI::Clock;
+sigc::signal<void,nframes_t> ARDOUR_UI::Clock;
ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile)
shuttle_fract = 0.0;
shuttle_max_speed = 8.0f;
- set_shuttle_units (Percentage);
- set_shuttle_behaviour (Sprung);
-
shuttle_style_menu = 0;
shuttle_unit_menu = 0;
gettimeofday (&last_peak_grab, 0);
gettimeofday (&last_shuttle_request, 0);
- ARDOUR::AudioDiskstream::DeleteSources.connect (mem_fun(*this, &ARDOUR_UI::delete_sources_in_the_right_thread));
ARDOUR::Diskstream::DiskOverrun.connect (mem_fun(*this, &ARDOUR_UI::disk_overrun_handler));
ARDOUR::Diskstream::DiskUnderrun.connect (mem_fun(*this, &ARDOUR_UI::disk_underrun_handler));
}
void
-ARDOUR_UI::update_sample_rate (jack_nframes_t ignored)
+ARDOUR_UI::update_sample_rate (nframes_t ignored)
{
char buf[32];
} else {
- jack_nframes_t rate = engine->frame_rate();
+ nframes_t rate = engine->frame_rate();
if (fmod (rate, 1000.0) != 0.0) {
snprintf (buf, sizeof (buf), _("%.1f kHz / %4.1f msecs"),
return;
}
- jack_nframes_t frames = session->available_capture_duration();
+ nframes_t frames = session->available_capture_duration();
char buf[64];
if (frames == max_frames) {
int hrs;
int mins;
int secs;
- jack_nframes_t fr = session->frame_rate();
+ nframes_t fr = session->frame_rate();
- if (session->actively_recording()){
-
- rec_enabled_diskstreams = 0;
- session->foreach_route (this, &ARDOUR_UI::count_recenabled_diskstreams);
-
- if (rec_enabled_diskstreams) {
- frames /= rec_enabled_diskstreams;
- }
-
- } else {
-
- /* hmmm. shall we divide by the route count? or the diskstream count?
- or what? for now, do nothing ...
- */
-
+ rec_enabled_diskstreams = 0;
+ session->foreach_route (this, &ARDOUR_UI::count_recenabled_diskstreams);
+
+ if (rec_enabled_diskstreams) {
+ frames /= rec_enabled_diskstreams;
}
hrs = frames / (fr * 3600);
}
void
-ARDOUR_UI::do_transport_locate (jack_nframes_t new_position)
+ARDOUR_UI::do_transport_locate (nframes_t new_position)
{
- jack_nframes_t _preroll;
+ nframes_t _preroll = 0;
if (session) {
- _preroll = session->convert_to_frames_at (new_position, session->preroll);
+ // XXX CONFIG_CHANGE FIX - requires AnyTime handling
+ // _preroll = session->convert_to_frames_at (new_position, Config->get_preroll());
if (new_position > _preroll) {
new_position -= _preroll;
ARDOUR_UI::transport_goto_end ()
{
if (session) {
- jack_nframes_t frame = session->current_end_frame();
+ nframes_t frame = session->current_end_frame();
session->request_locate (frame);
/* force displayed area in editor to start no matter
return;
}
- if (session->get_auto_loop()) {
- session->request_auto_loop (false);
+ if (Config->get_auto_loop()) {
+ session->request_play_loop (false);
}
session->request_stop ();
switch (session->record_status()) {
case Session::Disabled:
if (session->ntracks() == 0) {
- string txt = _("Please create 1 or more track\nbefore trying to record.\nCheck the Session menu.");
- MessageDialog msg (*editor, txt);
+ MessageDialog msg (*editor, _("Please create 1 or more track\nbefore trying to record.\nCheck the Session menu."));
msg.run ();
return;
}
rolling = session->transport_rolling ();
- if (session->get_auto_loop()) {
- session->request_auto_loop (false);
+ if (Config->get_auto_loop()) {
+ session->request_play_loop (false);
auto_loop_button.set_active (false);
roll_button.set_active (true);
} else if (session->get_play_range ()) {
ARDOUR_UI::transport_loop()
{
if (session) {
- if (session->get_auto_loop()) {
+ if (Config->get_auto_loop()) {
if (session->transport_rolling()) {
Location * looploc = session->locations()->auto_loop_location();
if (looploc) {
}
}
else {
- session->request_auto_loop (true);
+ session->request_play_loop (true);
}
}
}
new_session_dialog->reset_recent();
new_session_dialog->show();
- //Glib::RefPtr<Gdk::Window> nsd_window = new_session_dialog->get_window();
-
do {
response = new_session_dialog->run ();
- //nsd_window ->set_cursor(Gdk::Cursor(Gdk::WATCH));
+
if(response == Gtk::RESPONSE_CANCEL || response == Gtk::RESPONSE_DELETE_EVENT) {
quit();
return;
if (session_name.empty()) {
response = Gtk::RESPONSE_NONE;
- cerr << "session name is empty\n";
continue;
}
} else if (response == Gtk::RESPONSE_OK) {
+ session_name = new_session_dialog->session_name();
+
if (new_session_dialog->get_current_page() == 1) {
/* XXX this is a bit of a hack..
if (session_name.empty()) {
response = Gtk::RESPONSE_NONE;
- cerr << "session name is empty 2\n";
continue;
}
_session_is_new = true;
- session_name = new_session_dialog->session_name();
-
if (session_name.empty()) {
response = Gtk::RESPONSE_NONE;
- cerr << "session name is empty 3\n";
continue;
}
} else {
- std::string session_path = new_session_dialog->session_folder();
+ session_path = new_session_dialog->session_folder();
}
uint32_t cchns;
uint32_t mchns;
- Session::AutoConnectOption iconnect;
- Session::AutoConnectOption oconnect;
+ AutoConnectOption iconnect;
+ AutoConnectOption oconnect;
if (new_session_dialog->create_control_bus()) {
cchns = (uint32_t) new_session_dialog->control_channel_count();
}
if (new_session_dialog->connect_inputs()) {
- iconnect = Session::AutoConnectPhysical;
+ iconnect = AutoConnectPhysical;
} else {
- iconnect = Session::AutoConnectOption (0);
+ iconnect = AutoConnectOption (0);
}
/// @todo some minor tweaks.
if (new_session_dialog->connect_outs_to_master()) {
- oconnect = Session::AutoConnectMaster;
+ oconnect = AutoConnectMaster;
} else if (new_session_dialog->connect_outs_to_physical()) {
- oconnect = Session::AutoConnectPhysical;
+ oconnect = AutoConnectPhysical;
} else {
- oconnect = Session::AutoConnectOption (0);
+ oconnect = AutoConnectOption (0);
}
uint32_t nphysin = (uint32_t) new_session_dialog->input_limit_count();
connect_to_session (new_session);
+ Config->set_current_owner (ConfigVariableBase::Interface);
+
session_loaded = true;
return 0;
}
ARDOUR_UI::build_session (const string & path, const string & snap_name,
uint32_t control_channels,
uint32_t master_channels,
- Session::AutoConnectOption input_connect,
- Session::AutoConnectOption output_connect,
+ AutoConnectOption input_connect,
+ AutoConnectOption output_connect,
uint32_t nphysin,
uint32_t nphysout,
- jack_nframes_t initial_length)
+ nframes_t initial_length)
{
Session *new_session;
int x;
string name_template = add_route_dialog->name_template ();
bool track = add_route_dialog->track ();
- Session::AutoConnectOption oac = session->get_output_auto_connect();
+ AutoConnectOption oac = Config->get_output_auto_connect();
- if (oac & Session::AutoConnectMaster) {
+ if (oac & AutoConnectMaster) {
output_chan = (session->master_out() ? session->master_out()->n_inputs().get(DataType::AUDIO) : input_chan);
} else {
output_chan = input_chan;
msg.run ();
}
-void
-ARDOUR_UI::delete_sources_in_the_right_thread (list<boost::shared_ptr<ARDOUR::Source> >* deletion_list)
-{
- ENSURE_GUI_THREAD (bind (mem_fun(*this, &ARDOUR_UI::delete_sources_in_the_right_thread), deletion_list));
-
- for (list<boost::shared_ptr<Source> >::iterator i = deletion_list->begin(); i != deletion_list->end(); ++i) {
- (*i)->drop_references ();
- }
-
- delete deletion_list;
-}
-
void
ARDOUR_UI::disk_overrun_handler ()
{
}
void
-ARDOUR_UI::set_jack_buffer_size (jack_nframes_t nframes)
+ARDOUR_UI::set_jack_buffer_size (nframes_t nframes)
{
engine->request_buffer_size (nframes);
update_sample_rate (0);
return FALSE; /* don't call it again */
}
-void
-ARDOUR_UI::set_native_file_header_format (HeaderFormat hf)
-{
- Glib::RefPtr<Action> act;
-
- switch (hf) {
- case BWF:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatBWF"));
- break;
- case WAVE:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatWAVE"));
- break;
- case WAVE64:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatWAVE64"));
- break;
- case iXML:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatiXML"));
- break;
- case RF64:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatRF64"));
- break;
- case CAF:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatCAF"));
- break;
- case AIFF:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatAIFF"));
- break;
- }
-
- if (act) {
- Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && ract->get_active() && Config->get_native_file_header_format() != hf) {
- Config->set_native_file_header_format (hf);
- if (session) {
- session->reset_native_file_format ();
- }
- }
- }
-}
-
-void
-ARDOUR_UI::set_native_file_data_format (SampleFormat sf)
-{
- Glib::RefPtr<Action> act;
-
- switch (sf) {
- case FormatFloat:
- act = ActionManager::get_action (X_("options"), X_("FileDataFormatFloat"));
- break;
- case FormatInt24:
- act = ActionManager::get_action (X_("options"), X_("FileDataFormat24bit"));
- break;
- }
-
- if (act) {
- Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
-
- if (ract && ract->get_active() && Config->get_native_file_data_format() != sf) {
- Config->set_native_file_data_format (sf);
- if (session) {
- session->reset_native_file_format ();
- }
- }
- }
-}
-
void
ARDOUR_UI::use_config ()
{
int build_session (const string & path, const string & snapshot,
uint32_t ctl_chns,
uint32_t master_chns,
- ARDOUR::Session::AutoConnectOption input_connect,
- ARDOUR::Session::AutoConnectOption output_connect,
+ ARDOUR::AutoConnectOption input_connect,
+ ARDOUR::AutoConnectOption output_connect,
uint32_t nphysin,
uint32_t nphysout,
- jack_nframes_t initial_length);
+ nframes_t initial_length);
bool session_is_new() const { return _session_is_new; }
ARDOUR::Session* the_session() { return session; }
static sigc::signal<void,bool> Blink;
static sigc::signal<void> RapidScreenUpdate;
static sigc::signal<void> SuperRapidScreenUpdate;
- static sigc::signal<void,jack_nframes_t> Clock;
+ static sigc::signal<void,nframes_t> Clock;
/* this is a helper function to centralize the (complex) logic for
blinking rec-enable buttons.
void save_ardour_state ();
gboolean configure_handler (GdkEventConfigure* conf);
- void do_transport_locate (jack_nframes_t position);
+ void do_transport_locate (nframes_t position);
void halt_on_xrun_message ();
AudioClock primary_clock;
void toggle_time_master ();
void toggle_video_sync ();
- enum ShuttleBehaviour {
- Sprung,
- Wheel
- };
-
- enum ShuttleUnits {
- Percentage,
- Semitones
- };
-
Gtk::DrawingArea shuttle_box;
Gtk::EventBox speed_display_box;
Gtk::Label speed_display_label;
Gtk::ComboBoxText shuttle_style_button;
Gtk::Menu* shuttle_unit_menu;
Gtk::Menu* shuttle_style_menu;
- ShuttleBehaviour shuttle_behaviour;
- ShuttleUnits shuttle_units;
float shuttle_max_speed;
Gtk::Menu* shuttle_context_menu;
void show_shuttle_context_menu ();
void shuttle_style_changed();
void shuttle_unit_clicked ();
- void set_shuttle_behaviour (ShuttleBehaviour);
- void set_shuttle_units (ShuttleUnits);
void set_shuttle_max_speed (float);
void update_speed_display ();
float last_speed_displayed;
Gtk::Label sample_rate_label;
Gtk::EventBox sample_rate_box;
- void update_sample_rate (jack_nframes_t);
+ void update_sample_rate (nframes_t);
gint every_second ();
gint every_point_one_seconds ();
void we_have_dependents ();
void setup_keybindings ();
void setup_session_options ();
- void setup_config_options ();
guint32 last_key_press_time;
struct timeval last_peak_grab;
struct timeval last_shuttle_request;
- void delete_sources_in_the_right_thread (list<boost::shared_ptr<ARDOUR::Source> >*);
-
void editor_display_control_changed (Editing::DisplayControl c);
bool have_disk_overrun_displayed;
void disconnect_from_jack ();
void reconnect_to_jack ();
- void set_jack_buffer_size (jack_nframes_t);
+ void set_jack_buffer_size (nframes_t);
Gtk::MenuItem* jack_disconnect_item;
Gtk::MenuItem* jack_reconnect_item;
std::vector<std::string> positional_sync_strings;
- void toggle_config_state (const char* group, const char* action, void (ARDOUR::Configuration::*set)(bool));
- void toggle_session_state (const char* group, const char* action, void (ARDOUR::Session::*set)(bool), bool (ARDOUR::Session::*get)(void) const);
- void toggle_session_state (const char* group, const char* action, sigc::slot<void> theSlot);
void toggle_send_midi_feedback ();
void toggle_use_mmc ();
void toggle_send_mmc ();
void toggle_use_midi_control();
void toggle_send_mtc ();
- void toggle_AutoConnectNewTrackInputsToHardware();
- void toggle_AutoConnectNewTrackOutputsToHardware();
- void toggle_AutoConnectNewTrackOutputsToMaster();
- void toggle_ManuallyConnectNewTrackOutputs();
- void toggle_UseHardwareMonitoring();
- void toggle_UseSoftwareMonitoring();
- void toggle_UseExternalMonitoring();
+ void set_input_auto_connect (ARDOUR::AutoConnectOption);
+ void set_output_auto_connect (ARDOUR::AutoConnectOption);
+ void set_solo_model (ARDOUR::SoloModel);
+ void set_monitor_model (ARDOUR::MonitorModel);
+
void toggle_StopPluginsWithTransport();
void toggle_DoNotRunPluginsWhileRecording();
void toggle_VerifyRemoveLastCapture();
void toggle_GainReduceFastTransport();
void toggle_LatchedSolo();
void toggle_SoloViaBus();
- void toggle_AutomaticallyCreateCrossfades();
- void toggle_UnmuteNewFullCrossfades();
void toggle_LatchedRecordEnable ();
void mtc_port_changed ();
- void map_some_session_state (const char* group, const char* action, bool (ARDOUR::Session::*get)() const);
- void queue_session_control_changed (ARDOUR::Session::ControlType t);
- void session_control_changed (ARDOUR::Session::ControlType t);
+ void map_solo_model ();
+ void map_monitor_model ();
+ void map_file_header_format ();
+ void map_file_data_format ();
+ void map_input_auto_connect ();
+ void map_output_auto_connect ();
+ void parameter_changed (const char*);
+
+ void set_meter_hold (ARDOUR::MeterHold);
+ void set_meter_falloff (ARDOUR::MeterFalloff);
+ void map_meter_hold ();
+ void map_meter_falloff ();
void toggle_control_protocol (ARDOUR::ControlProtocolInfo*);
+ void toggle_control_protocol_feedback (ARDOUR::ControlProtocolInfo*, const char* group_name, const char* action_name);
};
#endif /* __ardour_gui_h__ */
update_disk_space ();
}
-static const double SHUTTLE_FRACT_SPEED1=0.48412291827; /* derived from A1,A2 */
-
void
ARDOUR_UI::transport_rolling ()
{
stop_button.set_active (false);
if (session->get_play_range()) {
-
play_selection_button.set_active (true);
roll_button.set_active (false);
auto_loop_button.set_active (false);
- } else if (session->get_auto_loop ()) {
-
+ } else if (Config->get_auto_loop ()) {
auto_loop_button.set_active (true);
play_selection_button.set_active (false);
roll_button.set_active (false);
goto_start_button.set_colors (colors);
goto_end_button.set_colors (colors);
+ stop_button.set_size_request(29, -1);
+ roll_button.set_size_request(29, -1);
+ auto_loop_button.set_size_request(29, -1);
+ play_selection_button.set_size_request(29, -1);
+ goto_start_button.set_size_request(29, -1);
+ goto_end_button.set_size_request(29, -1);
+ rec_button.set_size_request(29, -1);
+
Widget* w;
stop_button.set_active (true);
-
- w = manage (new Image (Stock::MEDIA_PREVIOUS, ICON_SIZE_BUTTON));
+
+ w = manage (new Image (get_icon (X_("transport_start"))));
w->show();
goto_start_button.add (*w);
- w = manage (new Image (Stock::MEDIA_NEXT, ICON_SIZE_BUTTON));
+ w = manage (new Image (get_icon (X_("transport_end"))));
w->show();
goto_end_button.add (*w);
- w = manage (new Image (Stock::MEDIA_PLAY, ICON_SIZE_BUTTON));
+ w = manage (new Image (get_icon (X_("transport_play"))));
w->show();
roll_button.add (*w);
- w = manage (new Image (Stock::MEDIA_STOP, ICON_SIZE_BUTTON));
+ w = manage (new Image (get_icon (X_("transport_stop"))));
w->show();
stop_button.add (*w);
- w = manage (new Image (Stock::MEDIA_PLAY, ICON_SIZE_BUTTON));
+ w = manage (new Image (get_icon (X_("transport_range"))));
w->show();
play_selection_button.add (*w);
- w = manage (new Image (Stock::MEDIA_RECORD, ICON_SIZE_BUTTON));
+ w = manage (new Image (get_icon (X_("transport_record"))));
w->show();
rec_button.add (*w);
- w = manage (new Image (get_xpm("loop.xpm")));
+ w = manage (new Image (get_icon (X_("transport_loop"))));
w->show();
auto_loop_button.add (*w);
auditioning_alert_button.set_name ("TransportAuditioningAlert");
auditioning_alert_button.signal_pressed().connect (mem_fun(*this,&ARDOUR_UI::audition_alert_toggle));
+ tooltips().set_tip (solo_alert_button, _("When active, something is soloed.\nClick to de-solo everything"));
+ tooltips().set_tip (auditioning_alert_button, _("When active, auditioning is taking place\nClick to stop the audition"));
+
alert_box.pack_start (solo_alert_button, false, false);
alert_box.pack_start (auditioning_alert_button, false, false);
sdframe->add (speed_display_box);
mtc_port_changed ();
- sync_option_combo.set_active_text (positional_sync_strings.front());
sync_option_combo.signal_changed().connect (mem_fun (*this, &ARDOUR_UI::sync_option_changed));
- Gtkmm2ext::set_size_request_to_display_given_text (sync_option_combo, "Internal", 22, 10);
+ const guint32 FUDGE = 25; // Combo's are stupid - they steal space from the entry for the button
+ set_size_request_to_display_given_text (sync_option_combo, X_("Igternal"), 2+FUDGE, 10);
shbox->pack_start (*sdframe, false, false);
shbox->pack_start (shuttle_units_button, true, true);
transport_tearoff_hbox.pack_start (alert_box, false, false);
}
-void
-ARDOUR_UI::setup_clock ()
-{
- ARDOUR_UI::Clock.connect (bind (mem_fun (big_clock, &AudioClock::set), false));
-
- big_clock_window = new Window (WINDOW_TOPLEVEL);
-
- big_clock_window->set_border_width (0);
- big_clock_window->add (big_clock);
- big_clock_window->set_title (_("ardour: clock"));
- big_clock_window->set_type_hint (Gdk::WINDOW_TYPE_HINT_MENU);
- big_clock_window->signal_realize().connect (bind (sigc::ptr_fun (set_decoration), big_clock_window, (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH)));
- big_clock_window->signal_unmap().connect (bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleBigClock")));
-
- manage_window (*big_clock_window);
-}
-
void
ARDOUR_UI::manage_window (Window& win)
{
void
ARDOUR_UI::auditioning_changed (bool onoff)
{
- Gtkmm2ext::UI::instance()->call_slot(bind (mem_fun(*this, &ARDOUR_UI::_auditioning_changed), onoff));
+ UI::instance()->call_slot(bind (mem_fun(*this, &ARDOUR_UI::_auditioning_changed), onoff));
}
void
mouse_shuttle (ev->x, true);
shuttle_grabbed = false;
shuttle_box.remove_modal_grab ();
- if (shuttle_behaviour == Sprung) {
- if (session->get_auto_play() || roll_button.get_state()) {
+ if (Config->get_shuttle_behaviour() == Sprung) {
+ if (Config->get_auto_play() || roll_button.get_state()) {
shuttle_fract = SHUTTLE_FRACT_SPEED1;
session->request_transport_speed (1.0);
stop_button.set_active (false);
shuttle_unit_menu->popup (1, 0);
}
-void
-ARDOUR_UI::set_shuttle_units (ShuttleUnits u)
-{
- switch ((shuttle_units = u)) {
- case Percentage:
- shuttle_units_button.set_label("% ");
- break;
- case Semitones:
- shuttle_units_button.set_label(_("ST"));
- break;
- }
-}
-
void
ARDOUR_UI::shuttle_style_changed ()
{
ustring str = shuttle_style_button.get_active_text ();
if (str == _("sprung")) {
- set_shuttle_behaviour (Sprung);
+ Config->set_shuttle_behaviour (Sprung);
} else if (str == _("wheel")) {
- set_shuttle_behaviour (Wheel);
- }
-}
-
-
-void
-ARDOUR_UI::set_shuttle_behaviour (ShuttleBehaviour b)
-{
- switch ((shuttle_behaviour = b)) {
- case Sprung:
- shuttle_style_button.set_active_text (_("sprung"));
- shuttle_fract = 0.0;
- shuttle_box.queue_draw ();
- if (session) {
- if (session->transport_rolling()) {
- shuttle_fract = SHUTTLE_FRACT_SPEED1;
- session->request_transport_speed (1.0);
- }
- }
- break;
- case Wheel:
- shuttle_style_button.set_active_text (_("wheel"));
- break;
+ Config->set_shuttle_behaviour (Wheel);
}
}
if (x != last_speed_displayed) {
if (x != 0) {
- if (shuttle_units == Percentage) {
+ if (Config->get_shuttle_units() == Percentage) {
snprintf (buf, sizeof (buf), "%.2f", x);
} else {
if (x < 0) {
void
ARDOUR_UI::editor_realized ()
{
+ Config->map_parameters (mem_fun (*this, &ARDOUR_UI::parameter_changed));
+
set_size_request_to_display_given_text (speed_display_box, _("-0.55"), 2, 2);
- /* XXX: this should really be saved in instant.xml or something similar and restored from there */
- shuttle_style_button.set_active_text (_("sprung"));
- const guint32 FUDGE = 20; // Combo's are stupid - they steal space from the entry for the button
+ const guint32 FUDGE = 25; // Combo's are stupid - they steal space from the entry for the button
set_size_request_to_display_given_text (shuttle_style_button, _("sprung"), 2+FUDGE, 10);
}
void
ARDOUR_UI::sync_option_changed ()
{
- string which;
-
- if (session == 0) {
- return;
+ if (session) {
+ session->request_slave_source (string_to_slave_source (sync_option_combo.get_active_text()));
}
-
- which = sync_option_combo.get_active_text();
-
- if (which == positional_sync_strings[Session::None]) {
- session->request_slave_source (Session::None);
- } else if (which == positional_sync_strings[Session::MTC]) {
- session->request_slave_source (Session::MTC);
- } else if (which == positional_sync_strings[Session::JACK]) {
- session->request_slave_source (Session::JACK);
- }
}
void
#include <pbd/pathscanner.h>
+#include <gtkmm2ext/utils.h>
+
#include "ardour_ui.h"
#include "public_editor.h"
#include "audio_clock.h"
#include "i18n.h"
+using namespace std;
using namespace ARDOUR;
using namespace PBD;
-using namespace Gtk;
using namespace Gtkmm2ext;
+using namespace Gtk;
+using namespace Glib;
+using namespace sigc;
int
ARDOUR_UI::create_editor ()
ActionManager::register_action (main_actions, X_("AudioFileFormatHeader"), _("Header"));
ActionManager::register_action (main_actions, X_("AudioFileFormatData"), _("Data"));
ActionManager::register_action (main_actions, X_("ControlSurfaces"), _("Control Surfaces"));
+ ActionManager::register_action (main_actions, X_("Metering"), _("Metering"));
+ ActionManager::register_action (main_actions, X_("MeteringFallOffRate"), _("Fall off rate"));
+ ActionManager::register_action (main_actions, X_("MeteringHoldTime"), _("Hold Time"));
/* the real actions */
RadioAction::Group jack_latency_group;
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 32));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 32));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 64));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 64));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency128"), X_("128"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 128));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency128"), X_("128"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 128));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency256"), X_("256"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 256));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency256"), X_("256"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 256));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency512"), X_("512"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 512));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency512"), X_("512"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 512));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency1024"), X_("1024"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 1024));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency1024"), X_("1024"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 1024));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency2048"), X_("2048"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 2048));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency2048"), X_("2048"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 2048));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency4096"), X_("4096"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 4096));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency4096"), X_("4096"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 4096));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 8192));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 8192));
ActionManager::jack_sensitive_actions.push_back (act);
/* these actions are intended to be shared across all windows */
Glib::RefPtr<ActionGroup> shuttle_actions = ActionGroup::create ("ShuttleActions");
- shuttle_actions->add (Action::create (X_("SetShuttleUnitsPercentage"), _("Percentage")), bind (mem_fun(*this, &ARDOUR_UI::set_shuttle_units), Percentage));
- shuttle_actions->add (Action::create (X_("SetShuttleUnitsSemitones"), _("Semitones")), bind (mem_fun(*this, &ARDOUR_UI::set_shuttle_units), Semitones));
+ shuttle_actions->add (Action::create (X_("SetShuttleUnitsPercentage"), _("Percentage")), hide_return (bind (mem_fun (*Config, &Configuration::set_shuttle_units), Percentage)));
+ shuttle_actions->add (Action::create (X_("SetShuttleUnitsSemitones"), _("Semitones")), hide_return (bind (mem_fun (*Config, &Configuration::set_shuttle_units), Semitones)));
Glib::RefPtr<ActionGroup> option_actions = ActionGroup::create ("options");
act = ActionManager::register_toggle_action (option_actions, X_("UseMIDIcontrol"), _("Use MIDI control"), mem_fun (*this, &ARDOUR_UI::toggle_use_midi_control));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_toggle_action (option_actions, X_("AutoConnectNewTrackInputsToHardware"), _("Connect new track inputs to hardware"), mem_fun (*this, &ARDOUR_UI::toggle_AutoConnectNewTrackInputsToHardware));
+ ActionManager::register_toggle_action (option_actions, X_("StopPluginsWithTransport"), _("Stop plugins with transport"), mem_fun (*this, &ARDOUR_UI::toggle_StopPluginsWithTransport));
+ ActionManager::register_toggle_action (option_actions, X_("VerifyRemoveLastCapture"), _("Verify remove last capture"), mem_fun (*this, &ARDOUR_UI::toggle_VerifyRemoveLastCapture));
+ ActionManager::register_toggle_action (option_actions, X_("StopRecordingOnXrun"), _("Stop recording on xrun"), mem_fun (*this, &ARDOUR_UI::toggle_StopRecordingOnXrun));
+ ActionManager::register_toggle_action (option_actions, X_("StopTransportAtEndOfSession"), _("Stop transport at session end"), mem_fun (*this, &ARDOUR_UI::toggle_StopTransportAtEndOfSession));
+ ActionManager::register_toggle_action (option_actions, X_("GainReduceFastTransport"), _("-12dB gain reduce ffwd/rewind"), mem_fun (*this, &ARDOUR_UI::toggle_GainReduceFastTransport));
+ ActionManager::register_toggle_action (option_actions, X_("LatchedRecordEnable"), _("Rec-enable stays engaged at stop"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedRecordEnable));
+
+ act = ActionManager::register_toggle_action (option_actions, X_("DoNotRunPluginsWhileRecording"), _("Do not run plugins while recording"), mem_fun (*this, &ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording));
+ ActionManager::session_sensitive_actions.push_back (act);
+
+ act = ActionManager::register_toggle_action (option_actions, X_("LatchedSolo"), _("Latched solo"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedSolo));
ActionManager::session_sensitive_actions.push_back (act);
+ /* !!! REMEMBER THAT RADIO ACTIONS HAVE TO BE HANDLED WITH MORE FINESSE THAN SIMPLE TOGGLES !!! */
+
+ RadioAction::Group meter_falloff_group;
+ RadioAction::Group meter_hold_group;
+
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffOff"), _("Off"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffOff));
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffSlowest"), _("Slowest"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffSlowest));
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffSlow"), _("Slow"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffSlow));
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffMedium"), _("Medium"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffMedium));
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffFast"), _("Fast"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffFast));
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffFaster"), _("Faster"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffFaster));
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffFastest"), _("Fastest"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffFastest));
+
+ ActionManager::register_radio_action (option_actions, meter_hold_group, X_("MeterHoldOff"), _("Off"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_hold), MeterHoldOff));
+ ActionManager::register_radio_action (option_actions, meter_hold_group, X_("MeterHoldShort"), _("Short"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_hold), MeterHoldShort));
+ ActionManager::register_radio_action (option_actions, meter_hold_group, X_("MeterHoldMedium"), _("Medium"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_hold), MeterHoldMedium));
+ ActionManager::register_radio_action (option_actions, meter_hold_group, X_("MeterHoldLong"), _("Long"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_hold), MeterHoldLong));
+
RadioAction::Group file_header_group;
act = ActionManager::register_radio_action (option_actions, file_header_group, X_("FileHeaderFormatBWF"), X_("Broadcast WAVE"), bind (mem_fun (*this, &ARDOUR_UI::set_native_file_header_format), ARDOUR::BWF));
act = ActionManager::register_radio_action (option_actions, file_data_group, X_("FileDataFormatFloat"), X_("32-bit floating point"), bind (mem_fun (*this, &ARDOUR_UI::set_native_file_data_format), ARDOUR::FormatFloat));
act = ActionManager::register_radio_action (option_actions, file_data_group, X_("FileDataFormat24bit"), X_("24-bit signed integer"), bind (mem_fun (*this, &ARDOUR_UI::set_native_file_data_format), ARDOUR::FormatInt24));
- RadioAction::Group connect_outputs_group;
-
- act = ActionManager::register_radio_action (option_actions, connect_outputs_group, X_("AutoConnectNewTrackOutputsToHardware"), _("Connect new track outputs to hardware"), mem_fun (*this, &ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToHardware));
- ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (option_actions, connect_outputs_group, X_("AutoConnectNewTrackOutputsToMaster"), _("Connect new track outputs to master"), mem_fun (*this, &ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToMaster));
- ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (option_actions, connect_outputs_group, X_("ManuallyConnectNewTrackOutputs"), _("Manually connect new track outputs"), mem_fun (*this, &ARDOUR_UI::toggle_ManuallyConnectNewTrackOutputs));
- ActionManager::session_sensitive_actions.push_back (act);
-
RadioAction::Group monitoring_group;
- act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseHardwareMonitoring"), _("Hardware monitoring"), mem_fun (*this, &ARDOUR_UI::toggle_UseHardwareMonitoring));
- act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseSoftwareMonitoring"), _("Software monitoring"), mem_fun (*this, &ARDOUR_UI::toggle_UseSoftwareMonitoring));
- act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseExternalMonitoring"), _("External monitoring"), mem_fun (*this, &ARDOUR_UI::toggle_UseExternalMonitoring));
+ act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseHardwareMonitoring"), _("Hardware monitoring"), bind (mem_fun (*this, &ARDOUR_UI::set_monitor_model), HardwareMonitoring));
+ act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseSoftwareMonitoring"), _("Software monitoring"), bind (mem_fun (*this, &ARDOUR_UI::set_monitor_model), SoftwareMonitoring));
+ act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseExternalMonitoring"), _("External monitoring"), bind (mem_fun (*this, &ARDOUR_UI::set_monitor_model), ExternalMonitoring));
- /* Configuration object options (i.e. not session specific) */
-
- ActionManager::register_toggle_action (option_actions, X_("StopPluginsWithTransport"), _("Stop plugins with transport"), mem_fun (*this, &ARDOUR_UI::toggle_StopPluginsWithTransport));
- ActionManager::register_toggle_action (option_actions, X_("VerifyRemoveLastCapture"), _("Verify remove last capture"), mem_fun (*this, &ARDOUR_UI::toggle_VerifyRemoveLastCapture));
- ActionManager::register_toggle_action (option_actions, X_("StopRecordingOnXrun"), _("Stop recording on xrun"), mem_fun (*this, &ARDOUR_UI::toggle_StopRecordingOnXrun));
- ActionManager::register_toggle_action (option_actions, X_("StopTransportAtEndOfSession"), _("Stop transport at session end"), mem_fun (*this, &ARDOUR_UI::toggle_StopTransportAtEndOfSession));
- ActionManager::register_toggle_action (option_actions, X_("GainReduceFastTransport"), _("-12dB gain reduce ffwd/rewind"), mem_fun (*this, &ARDOUR_UI::toggle_GainReduceFastTransport));
- ActionManager::register_toggle_action (option_actions, X_("LatchedRecordEnable"), _("Rec-enable stays engaged at stop"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedRecordEnable));
+ RadioAction::Group solo_group;
- /* session options */
-
- act = ActionManager::register_toggle_action (option_actions, X_("DoNotRunPluginsWhileRecording"), _("Do not run plugins while recording"), mem_fun (*this, &ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording));
+ act = ActionManager::register_radio_action (option_actions, solo_group, X_("SoloInPlace"), _("Solo in-place"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_solo_model), InverseMute)));
ActionManager::session_sensitive_actions.push_back (act);
-
- act = ActionManager::register_toggle_action (option_actions, X_("LatchedSolo"), _("Latched solo"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedSolo));
+ act = ActionManager::register_radio_action (option_actions, solo_group, X_("SoloViaBus"), _("Solo via bus"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_solo_model), SoloBus)));
ActionManager::session_sensitive_actions.push_back (act);
- RadioAction::Group solo_group;
+ RadioAction::Group input_auto_connect_group;
- act = ActionManager::register_radio_action (option_actions, solo_group, X_("SoloInPlace"), _("Solo in-place"), mem_fun (*this, &ARDOUR_UI::toggle_SoloViaBus));
+ act = ActionManager::register_radio_action (option_actions, input_auto_connect_group, X_("InputAutoConnectPhysical"), _("Auto-connect inputs to physical inputs"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_input_auto_connect), AutoConnectPhysical)));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (option_actions, solo_group, X_("SoloViaBus"), _("Solo via bus"), mem_fun (*this, &ARDOUR_UI::toggle_SoloViaBus));
+ act = ActionManager::register_radio_action (option_actions, input_auto_connect_group, X_("InputAutoConnectManual"), _("Manually connect inputs"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_input_auto_connect), (AutoConnectOption) 0)));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_action (option_actions, X_("AutomaticallyCreateCrossfades"), _("Automatically create crossfades"), mem_fun (*this, &ARDOUR_UI::toggle_AutomaticallyCreateCrossfades));
+ RadioAction::Group output_auto_connect_group;
+
+ act = ActionManager::register_radio_action (option_actions, output_auto_connect_group, X_("OutputAutoConnectPhysical"), _("Auto-connect outputs to physical outs"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_output_auto_connect), AutoConnectPhysical)));
+ ActionManager::session_sensitive_actions.push_back (act);
+ act = ActionManager::register_radio_action (option_actions, output_auto_connect_group, X_("OutputAutoConnectMaster"), _("Auto-connect outputs to master bus"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_output_auto_connect), AutoConnectMaster)));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_action (option_actions, X_("UnmuteNewFullCrossfades"), _("Unmute new full crossfades"), mem_fun (*this, &ARDOUR_UI::toggle_UnmuteNewFullCrossfades));
+ act = ActionManager::register_radio_action (option_actions, output_auto_connect_group, X_("OutputAutoConnectManual"), _("Manually connect outputs"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_output_auto_connect), (AutoConnectOption) 0)));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::add_action_group (shuttle_actions);
ActionManager::add_action_group (transport_actions);
ActionManager::add_action_group (main_actions);
ActionManager::add_action_group (common_actions);
-
- /* initialize state of non-session dependent options */
-
- setup_config_options ();
}
void
}
}
+void
+ARDOUR_UI::toggle_control_protocol_feedback (ControlProtocolInfo* cpi, const char* group, const char* action)
+{
+ if (!session) {
+ /* this happens when we build the menu bar when control protocol support
+ has been used in the past for some given protocol - the item needs
+ to be made active, but there is no session yet.
+ */
+ return;
+ }
+
+ if (cpi->protocol) {
+ Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (group, action);
+
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+ bool x = tact->get_active();
+
+ if (tact && x != cpi->protocol->get_feedback()) {
+ cpi->protocol->set_feedback (!x);
+ }
+ }
+ }
+}
+
void
ARDOUR_UI::build_control_surface_menu ()
{
list<ControlProtocolInfo*>::iterator i;
+ bool with_feedback;
/* !!! this has to match the top level entry from ardour.menus */
(bind (mem_fun (*this, &ARDOUR_UI::toggle_control_protocol), *i)));
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+
+ with_feedback = false;
if ((*i)->protocol || (*i)->requested) {
tact->set_active ();
ui += "<menuitem action='";
ui += action_name;
ui += "'/>\n";
+
+ if ((*i)->supports_feedback) {
+
+ string submenu_name = action_name;
+
+ submenu_name += "SubMenu";
+
+ ActionManager::register_action (editor->editor_actions, submenu_name.c_str(), _("Controls"));
+
+ action_name += "Feedback";
+
+ Glib::RefPtr<Action> act = ActionManager::register_toggle_action (editor->editor_actions, action_name.c_str(), _("Feedback"),
+ (bind (mem_fun (*this, &ARDOUR_UI::toggle_control_protocol_feedback),
+ *i,
+ "Editor",
+ action_name.c_str())));
+
+ ui += "<menu action='";
+ ui += submenu_name;
+ ui += "'>\n<menuitem action='";
+ ui += action_name;
+ ui += "'/>\n</menu>\n";
+
+ if ((*i)->protocol) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+ tact->set_active ((*i)->protocol->get_feedback ());
+ }
+ }
}
}
menu_bar_base.set_name ("MainMenuBar");
menu_bar_base.add (menu_hbox);
}
+
+void
+ARDOUR_UI::setup_clock ()
+{
+ ARDOUR_UI::Clock.connect (bind (mem_fun (big_clock, &AudioClock::set), false));
+
+ big_clock_window = new Window (WINDOW_TOPLEVEL);
+
+ big_clock_window->set_border_width (0);
+ big_clock_window->add (big_clock);
+ big_clock_window->set_title (_("ardour: clock"));
+ big_clock_window->set_type_hint (Gdk::WINDOW_TYPE_HINT_MENU);
+ big_clock_window->signal_realize().connect (bind (sigc::ptr_fun (set_decoration), big_clock_window, (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH)));
+ big_clock_window->signal_unmap().connect (bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleBigClock")));
+
+ if (editor) {
+ editor->ensure_float (*big_clock_window);
+ }
+
+ manage_window (*big_clock_window);
+}
using namespace Gtkmm2ext;
using namespace ARDOUR;
using namespace PBD;
-
-void
-ARDOUR_UI::setup_config_options ()
-{
- std::vector<Glib::ustring> groups;
- groups.push_back("options");
- groups.push_back("Editor");
- groups.push_back("Transport");
-
- struct {
- char* name;
- bool (Configuration::*method)(void) const;
- char act_type; //(t)oggle or (r)adio
- } options[] = {
- { "ToggleTimeMaster", &Configuration::get_jack_time_master, 't' },
- { "StopPluginsWithTransport", &Configuration::get_plugins_stop_with_transport, 't' },
- { "LatchedRecordEnable", &Configuration::get_latched_record_enable, 't' },
- { "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture, 't' },
- { "StopRecordingOnXrun", &Configuration::get_stop_recording_on_xrun, 't' },
- { "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end, 't' },
- { "UseHardwareMonitoring", &Configuration::get_use_hardware_monitoring, 'r' },
- { "UseSoftwareMonitoring", &Configuration::get_use_sw_monitoring, 'r' },
- { "UseExternalMonitoring", &Configuration::get_use_external_monitoring, 'r' },
- { "MeterFalloffOff", &Configuration::get_meter_falloff_off, 'r' },
- { "MeterFalloffSlowest", &Configuration::get_meter_falloff_slowest, 'r' },
- { "MeterFalloffSlow", &Configuration::get_meter_falloff_slow, 'r' },
- { "MeterFalloffMedium", &Configuration::get_meter_falloff_medium, 'r' },
- { "MeterFalloffFast", &Configuration::get_meter_falloff_fast, 'r' },
- { "MeterFalloffFaster", &Configuration::get_meter_falloff_faster, 'r' },
- { "MeterFalloffFastest", &Configuration::get_meter_falloff_fastest, 'r' },
- { "MeterHoldOff", &Configuration::get_meter_hold_off, 'r' },
- { "MeterHoldShort", &Configuration::get_meter_hold_short, 'r' },
- { "MeterHoldMedium", &Configuration::get_meter_hold_medium, 'r' },
- { "MeterHoldLong", &Configuration::get_meter_hold_long, 'r' },
- { "ToggleVideoSync", &Configuration::get_use_video_sync, 't' },
- { 0, 0, 0 }
- };
-
- for (uint32_t n = 0; options[n].name; ++n) {
- for (std::vector<Glib::ustring>::iterator i = groups.begin(); i != groups.end(); i++) {
- Glib::RefPtr<Action> act = ActionManager::get_action (i->c_str(), options[n].name);
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (options[n].act_type == 't' || options[n].act_type == 'r') {
- if ((Config->*(options[n].method))()) {
- tact->set_active (true);
- } else {
- tact->set_active (false);
- }
- }
- continue;
- }
- }
- }
-}
+using namespace sigc;
void
ARDOUR_UI::toggle_time_master ()
{
- toggle_config_state ("Transport", "ToggleTimeMaster", &Configuration::set_jack_time_master);
- if (session) {
- session->engine().reset_timebase ();
- }
+ ActionManager::toggle_config_state ("Transport", "ToggleTimeMaster", &Configuration::set_jack_time_master, &Configuration::get_jack_time_master);
}
void
-ARDOUR_UI::toggle_config_state (const char* group, const char* action, void (Configuration::*set)(bool))
+ARDOUR_UI::toggle_send_mtc ()
{
- Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- (Config->*set) (tact->get_active());
- }
+ ActionManager::toggle_config_state ("options", "SendMTC", &Configuration::set_send_mtc, &Configuration::get_send_mtc);
}
void
-ARDOUR_UI::toggle_session_state (const char* group, const char* action, void (Session::*set)(bool), bool (Session::*get)(void) const)
+ARDOUR_UI::toggle_send_mmc ()
{
- if (session) {
- Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- bool x = (session->*get)();
-
- if (x != tact->get_active()) {
- (session->*set) (!x);
- }
- }
- }
+ ActionManager::toggle_config_state ("options", "SendMMC", &Configuration::set_send_mmc, &Configuration::get_send_mmc);
}
void
-ARDOUR_UI::toggle_session_state (const char* group, const char* action, sigc::slot<void> theSlot)
+ARDOUR_UI::toggle_use_mmc ()
{
- if (session) {
- Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (tact->get_active()) {
- theSlot ();
- }
- }
- }
+ ActionManager::toggle_config_state ("options", "UseMMC", &Configuration::set_mmc_control, &Configuration::get_mmc_control);
}
void
-ARDOUR_UI::toggle_send_mtc ()
+ARDOUR_UI::toggle_use_midi_control ()
{
- toggle_session_state ("options", "SendMTC", &Session::set_send_mtc, &Session::get_send_mtc);
+ ActionManager::toggle_config_state ("options", "UseMIDIcontrol", &Configuration::set_midi_control, &Configuration::get_midi_control);
}
void
-ARDOUR_UI::toggle_send_mmc ()
+ARDOUR_UI::toggle_send_midi_feedback ()
{
- toggle_session_state ("options", "SendMMC", &Session::set_send_mmc, &Session::get_send_mmc);
+ ActionManager::toggle_config_state ("options", "SendMIDIfeedback", &Configuration::set_midi_feedback, &Configuration::get_midi_feedback);
}
void
-ARDOUR_UI::toggle_use_mmc ()
+ARDOUR_UI::set_native_file_header_format (HeaderFormat hf)
{
- toggle_session_state ("options", "UseMMC", &Session::set_mmc_control, &Session::get_mmc_control);
-}
+ const char *action;
-void
-ARDOUR_UI::toggle_use_midi_control ()
-{
- toggle_session_state ("options", "UseMIDIcontrol", &Session::set_midi_control, &Session::get_midi_control);
+ switch (hf) {
+ case BWF:
+ action = X_("FileHeaderFormatBWF");
+ break;
+ case WAVE:
+ action = X_("FileHeaderFormatWAVE");
+ break;
+ case WAVE64:
+ action = X_("FileHeaderFormatWAVE64");
+ break;
+ case iXML:
+ action = X_("FileHeaderFormatiXML");
+ break;
+ case RF64:
+ action = X_("FileHeaderFormatRF64");
+ break;
+ case CAF:
+ action = X_("FileHeaderFormatCAF");
+ break;
+ case AIFF:
+ action = X_("FileHeaderFormatAIFF");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active() && Config->get_native_file_header_format() != hf) {
+ Config->set_native_file_header_format (hf);
+ }
+ }
}
void
-ARDOUR_UI::toggle_send_midi_feedback ()
+ARDOUR_UI::set_native_file_data_format (SampleFormat sf)
{
- toggle_session_state ("options", "SendMIDIfeedback", &Session::set_midi_feedback, &Session::get_midi_feedback);
+ const char* action;
+
+ switch (sf) {
+ case FormatFloat:
+ action = X_("FileDataFormatFloat");
+ break;
+ case FormatInt24:
+ action = X_("FileDataFormat24bit");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active() && Config->get_native_file_data_format() != sf) {
+ Config->set_native_file_data_format (sf);
+ }
+ }
}
void
-ARDOUR_UI::toggle_AutoConnectNewTrackInputsToHardware()
+ARDOUR_UI::set_input_auto_connect (AutoConnectOption option)
{
- toggle_session_state ("options", "AutoConnectNewTrackInputsToHardware", &Session::set_input_auto_connect, &Session::get_input_auto_connect);
+ const char* action;
+
+ switch (option) {
+ case AutoConnectPhysical:
+ action = X_("InputAutoConnectPhysical");
+ break;
+ default:
+ action = X_("InputAutoConnectManual");
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+
+ if (ract && ract->get_active() && Config->get_input_auto_connect() != option) {
+ Config->set_input_auto_connect (option);
+ }
+ }
}
+
void
-ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToHardware()
+ARDOUR_UI::set_output_auto_connect (AutoConnectOption option)
{
- toggle_session_state ("options", "AutoConnectNewTrackOutputsToHardware", bind (mem_fun (session, &Session::set_output_auto_connect), Session::AutoConnectPhysical));
+ const char* action;
+
+ switch (option) {
+ case AutoConnectPhysical:
+ action = X_("OutputAutoConnectPhysical");
+ break;
+ case AutoConnectMaster:
+ action = X_("OutputAutoConnectMaster");
+ break;
+ default:
+ action = X_("OutputAutoConnectManual");
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+
+ if (ract && ract->get_active() && Config->get_output_auto_connect() != option) {
+ Config->set_output_auto_connect (option);
+ }
+ }
}
+
void
-ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToMaster()
+ARDOUR_UI::set_solo_model (SoloModel model)
{
- toggle_session_state ("options", "AutoConnectNewTrackOutputsToHardware", bind (mem_fun (session, &Session::set_output_auto_connect), Session::AutoConnectMaster));
+ const char* action = 0;
+
+ switch (model) {
+ case SoloBus:
+ action = X_("SoloViaBus");
+ break;
+
+ case InverseMute:
+ action = X_("SoloInPlace");
+ break;
+ default:
+ fatal << string_compose (_("programming error: unknown solo model in ARDOUR_UI::set_solo_model: %1"), model) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+
+ if (ract && ract->get_active() && Config->get_solo_model() != model) {
+ Config->set_solo_model (model);
+ }
+ }
+
}
+
void
-ARDOUR_UI::toggle_ManuallyConnectNewTrackOutputs()
+ARDOUR_UI::set_monitor_model (MonitorModel model)
{
- toggle_session_state ("options", "AutoConnectNewTrackOutputsToHardware", bind (mem_fun (session, &Session::set_output_auto_connect), Session::AutoConnectOption (0)));
+ const char* action = 0;
+
+ switch (model) {
+ case HardwareMonitoring:
+ action = X_("UseHardwareMonitoring");
+ break;
+
+ case SoftwareMonitoring:
+ action = X_("UseSoftwareMonitoring");
+ break;
+ case ExternalMonitoring:
+ action = X_("UseExternalMonitoring");
+ break;
+
+ default:
+ fatal << string_compose (_("programming error: unknown solo model in ARDOUR_UI::set_solo_model: %1"), model) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+
+ if (ract && ract->get_active() && Config->get_monitoring_model() != model) {
+ Config->set_monitoring_model (model);
+ }
+ }
+
}
void
ARDOUR_UI::toggle_auto_input ()
{
- toggle_session_state ("Transport", "ToggleAutoInput", &Session::set_auto_input, &Session::get_auto_input);
+ ActionManager::toggle_config_state ("Transport", "ToggleAutoInput", &Configuration::set_auto_input, &Configuration::get_auto_input);
}
void
ARDOUR_UI::toggle_auto_play ()
{
- toggle_session_state ("Transport", "ToggleAutoPlay", &Session::set_auto_play, &Session::get_auto_play);
+ ActionManager::toggle_config_state ("Transport", "ToggleAutoPlay", &Configuration::set_auto_play, &Configuration::get_auto_play);
}
void
ARDOUR_UI::toggle_auto_return ()
{
- toggle_session_state ("Transport", "ToggleAutoReturn", &Session::set_auto_return, &Session::get_auto_return);
+ ActionManager::toggle_config_state ("Transport", "ToggleAutoReturn", &Configuration::set_auto_return, &Configuration::get_auto_return);
}
void
ARDOUR_UI::toggle_click ()
{
- toggle_session_state ("Transport", "ToggleClick", &Session::set_clicking, &Session::get_clicking);
+ ActionManager::toggle_config_state ("Transport", "ToggleClick", &Configuration::set_clicking, &Configuration::get_clicking);
}
void
ARDOUR_UI::toggle_session_auto_loop ()
{
if (session) {
- if (session->get_auto_loop()) {
+ if (Config->get_auto_loop()) {
if (session->transport_rolling()) {
transport_roll();
} else {
- session->request_auto_loop (false);
+ session->request_play_loop (false);
}
} else {
- session->request_auto_loop (true);
+ session->request_play_loop (true);
}
}
}
void
ARDOUR_UI::toggle_punch_in ()
{
- toggle_session_state ("Transport", "TogglePunchIn", &Session::set_punch_in, &Session::get_punch_in);
+ ActionManager::toggle_config_state ("Transport", "TogglePunchIn", &Configuration::set_punch_in, &Configuration::get_punch_in);
}
void
ARDOUR_UI::toggle_punch_out ()
{
- toggle_session_state ("Transport", "TogglePunchOut", &Session::set_punch_out, &Session::get_punch_out);
+ ActionManager::toggle_config_state ("Transport", "TogglePunchOut", &Configuration::set_punch_out, &Configuration::get_punch_out);
}
- void
+void
ARDOUR_UI::toggle_video_sync()
{
Glib::RefPtr<Action> act = ActionManager::get_action ("Transport", "ToggleVideoSync");
}
}
-void
-ARDOUR_UI::toggle_UseHardwareMonitoring()
-{
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", "UseHardwareMonitoring");
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (tact->get_active()) {
- Config->set_use_hardware_monitoring (true);
- Config->set_use_sw_monitoring (false);
- Config->set_use_external_monitoring (false);
- if (session) {
- session->reset_input_monitor_state();
- }
- }
- }
-}
-
-void
-ARDOUR_UI::toggle_UseSoftwareMonitoring()
-{
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", "UseSoftwareMonitoring");
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (tact->get_active()) {
- Config->set_use_hardware_monitoring (false);
- Config->set_use_sw_monitoring (true);
- Config->set_use_external_monitoring (false);
- if (session) {
- session->reset_input_monitor_state();
- }
- }
- }
-}
-
-void
-ARDOUR_UI::toggle_UseExternalMonitoring()
-{
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", "UseExternalMonitoring");
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (tact->get_active()) {
- Config->set_use_hardware_monitoring (false);
- Config->set_use_sw_monitoring (false);
- Config->set_use_external_monitoring (true);
- if (session) {
- session->reset_input_monitor_state();
- }
- }
- }
-}
-
void
ARDOUR_UI::toggle_StopPluginsWithTransport()
{
- toggle_config_state ("options", "StopPluginsWithTransport", &Configuration::set_plugins_stop_with_transport);
+ ActionManager::toggle_config_state ("options", "StopPluginsWithTransport", &Configuration::set_plugins_stop_with_transport, &Configuration::get_plugins_stop_with_transport);
}
void
ARDOUR_UI::toggle_LatchedRecordEnable()
{
- toggle_config_state ("options", "LatchedRecordEnable", &Configuration::set_latched_record_enable);
+ ActionManager::toggle_config_state ("options", "LatchedRecordEnable", &Configuration::set_latched_record_enable, &Configuration::get_latched_record_enable);
}
void
ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording()
{
- toggle_session_state ("options", "DoNotRunPluginsWhileRecording", &Session::set_do_not_record_plugins, &Session::get_do_not_record_plugins);
+ ActionManager::toggle_config_state ("options", "DoNotRunPluginsWhileRecording", &Configuration::set_do_not_record_plugins, &Configuration::get_do_not_record_plugins);
}
void
ARDOUR_UI::toggle_VerifyRemoveLastCapture()
{
- toggle_config_state ("options", "VerifyRemoveLastCapture", &Configuration::set_verify_remove_last_capture);
+ ActionManager::toggle_config_state ("options", "VerifyRemoveLastCapture", &Configuration::set_verify_remove_last_capture, &Configuration::get_verify_remove_last_capture);
}
void
ARDOUR_UI::toggle_StopRecordingOnXrun()
{
- toggle_config_state ("options", "StopRecordingOnXrun", &Configuration::set_stop_recording_on_xrun);
+ ActionManager::toggle_config_state ("options", "StopRecordingOnXrun", &Configuration::set_stop_recording_on_xrun, &Configuration::get_stop_recording_on_xrun);
}
void
ARDOUR_UI::toggle_StopTransportAtEndOfSession()
{
- toggle_config_state ("options", "StopTransportAtEndOfSession", &Configuration::set_stop_at_session_end);
+ ActionManager::toggle_config_state ("options", "StopTransportAtEndOfSession", &Configuration::set_stop_at_session_end, &Configuration::get_stop_at_session_end);
}
void
ARDOUR_UI::toggle_GainReduceFastTransport()
{
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", "GainReduceFastTransport");
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (tact->get_active()) {
- Config->set_quieten_at_speed (0.251189); // -12dB reduction for ffwd or rewind
- } else {
- Config->set_quieten_at_speed (1.0); /* no change */
- }
- }
+ ActionManager::toggle_config_state ("options", "GainReduceFastTransport", &Configuration::set_quieten_at_speed, &Configuration::get_quieten_at_speed);
}
void
ARDOUR_UI::toggle_LatchedSolo()
{
- toggle_session_state ("options", "LatchedSolo", &Session::set_solo_latched, &Session::solo_latched);
-}
-
-void
-ARDOUR_UI::toggle_SoloViaBus()
-{
- if (!session) {
- return;
- }
-
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", "SoloViaBus");
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
-
- if (tact->get_active()) {
- session->set_solo_model (Session::SoloBus);
- } else {
- session->set_solo_model (Session::InverseMute);
- }
- }
-}
-
-void
-ARDOUR_UI::toggle_AutomaticallyCreateCrossfades()
-{
-}
-void
-ARDOUR_UI::toggle_UnmuteNewFullCrossfades()
-{
+ ActionManager::toggle_config_state ("options", "LatchedSolo", &Configuration::set_solo_latched, &Configuration::get_solo_latched);
}
void
have_mtc = false;
}
+ positional_sync_strings.clear ();
+ positional_sync_strings.push_back (slave_source_to_string (None));
if (have_mtc) {
- const gchar *psync_strings[] = {
- N_("Internal"),
- N_("MTC"),
- N_("JACK"),
- 0
- };
-
- positional_sync_strings = PBD::internationalize (psync_strings);
-
- } else {
- const gchar *psync_strings[] = {
- N_("Internal"),
- N_("JACK"),
- 0
- };
- positional_sync_strings = PBD::internationalize (psync_strings);
+ positional_sync_strings.push_back (slave_source_to_string (MTC));
}
+ positional_sync_strings.push_back (slave_source_to_string (JACK));
set_popdown_strings (sync_option_combo, positional_sync_strings);
}
{
mtc_port_changed ();
- session_control_changed (Session::SlaveType);
- session_control_changed (Session::SendMTC);
- session_control_changed (Session::SendMMC);
- session_control_changed (Session::MMCControl);
- session_control_changed (Session::MidiFeedback);
- session_control_changed (Session::MidiControl);
- session_control_changed (Session::RecordingPlugins);
- session_control_changed (Session::CrossFadesActive);
- session_control_changed (Session::SoloLatch);
- session_control_changed (Session::SoloingModel);
- session_control_changed (Session::LayeringModel);
- session_control_changed (Session::CrossfadingModel);
- session_control_changed (Session::PunchOut);
- session_control_changed (Session::PunchIn);
- session_control_changed (Session::AutoPlay);
- session_control_changed (Session::AutoReturn);
- session_control_changed (Session::AutoInput);
- session_control_changed (Session::Clicking);
- session_control_changed (Session::SmpteMode);
-
- session->ControlChanged.connect (mem_fun (*this, &ARDOUR_UI::queue_session_control_changed));
+ Config->ParameterChanged.connect (mem_fun (*this, &ARDOUR_UI::parameter_changed));
}
+
void
-ARDOUR_UI::map_some_session_state (const char* group, const char* action, bool (Session::*get)() const)
+ARDOUR_UI::map_solo_model ()
{
- if (!session) {
- return;
+ const char* on;
+
+ if (Config->get_solo_model() == InverseMute) {
+ on = "SoloInPlace";
+ } else {
+ on = "SoloViaBus";
}
- Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- bool x = (session->*get)();
- if (tact->get_active() != x) {
- tact->set_active (x);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
}
}
}
void
-ARDOUR_UI::queue_session_control_changed (Session::ControlType t)
+ARDOUR_UI::map_monitor_model ()
{
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &ARDOUR_UI::session_control_changed), t));
+ const char* on = 0;
+
+ switch (Config->get_monitoring_model()) {
+ case HardwareMonitoring:
+ on = X_("UseHardwareMonitoring");
+ break;
+ case SoftwareMonitoring:
+ on = X_("UseSoftwareMonitoring");
+ break;
+ case ExternalMonitoring:
+ on = X_("UseExternalMonitoring");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
+ }
+ }
}
void
-ARDOUR_UI::session_control_changed (Session::ControlType t)
+ARDOUR_UI::map_file_header_format ()
{
- switch (t) {
- case Session::SlaveType:
- switch (session->slave_source()) {
- case Session::None:
- sync_option_combo.set_active_text (_("Internal"));
- break;
- case Session::MTC:
- sync_option_combo.set_active_text (_("MTC"));
- break;
- case Session::JACK:
- sync_option_combo.set_active_text (_("JACK"));
- break;
- }
-
- break;
+ const char* action = 0;
- case Session::SendMTC:
- map_some_session_state ("options", "SendMTC", &Session::get_send_mtc);
+ switch (Config->get_native_file_header_format()) {
+ case BWF:
+ action = X_("FileHeaderFormatBWF");
break;
- case Session::SendMMC:
- map_some_session_state ("options", "SendMMC", &Session::get_send_mmc);
+ case WAVE:
+ action = X_("FileHeaderFormatWAVE");
break;
- case Session::MMCControl:
- map_some_session_state ("options", "UseMMC", &Session::get_mmc_control);
+ case WAVE64:
+ action = X_("FileHeaderFormatWAVE64");
break;
- case Session::MidiFeedback:
- map_some_session_state ("options", "SendMIDIfeedback", &Session::get_midi_feedback);
+ case iXML:
+ action = X_("FileHeaderFormatiXML");
break;
- case Session::MidiControl:
- map_some_session_state ("options", "UseMIDIcontrol", &Session::get_midi_control);
+ case RF64:
+ action = X_("FileHeaderFormatRF64");
break;
- case Session::RecordingPlugins:
- map_some_session_state ("options", "DoNotRunPluginsWhileRecording", &Session::get_do_not_record_plugins);
+ case CAF:
+ action = X_("FileHeaderFormatCAF");
break;
- case Session::CrossFadesActive:
- map_some_session_state ("options", "CrossfadesActive", &Session::get_crossfades_active);
- break;
+ default:
+ fatal << string_compose (_("programming error: unknown file header format passed to ARDOUR_UI::map_file_data_format: %1"),
+ Config->get_native_file_header_format()) << endmsg;
+ /*NOTREACHED*/
+ }
- case Session::SoloLatch:
- break;
- case Session::SoloingModel:
- switch (session->solo_model()) {
- case Session::InverseMute:
- break;
- case Session::SoloBus:
- break;
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
}
- break;
+ }
+}
- case Session::LayeringModel:
- break;
+void
+ARDOUR_UI::map_file_data_format ()
+{
+ const char* action = 0;
- case Session::CrossfadingModel:
+ switch (Config->get_native_file_data_format()) {
+ case FormatFloat:
+ action = X_("FileDataFormatFloat");
break;
- case Session::AutoPlay:
- map_some_session_state ("Transport", "ToggleAutoPlay", &Session::get_auto_play);
+ case FormatInt24:
+ action = X_("FileDataFormat24bit");
break;
- case Session::AutoLoop:
- break;
+ default:
+ fatal << string_compose (_("programming error: unknown file data format passed to ARDOUR_UI::map_file_data_format: %1"),
+ Config->get_native_file_data_format()) << endmsg;
+ /*NOTREACHED*/
+ }
- case Session::AutoReturn:
- map_some_session_state ("Transport", "ToggleAutoReturn", &Session::get_auto_return);
- break;
- case Session::AutoInput:
- map_some_session_state ("Transport", "ToggleAutoInput", &Session::get_auto_input);
- break;
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
- case Session::PunchOut:
- map_some_session_state ("Transport", "TogglePunchOut", &Session::get_punch_out);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
+ }
+ }
+}
+
+void
+ARDOUR_UI::map_input_auto_connect ()
+{
+ const char* on;
+
+ if (Config->get_input_auto_connect() == (AutoConnectOption) 0) {
+ on = "InputAutoConnectManual";
+ } else {
+ on = "InputAutoConnectPhysical";
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
+ }
+ }
+}
+
+void
+ARDOUR_UI::map_output_auto_connect ()
+{
+ const char* on;
+
+ if (Config->get_output_auto_connect() == (AutoConnectOption) 0) {
+ on = "OutputAutoConnectManual";
+ } else if (Config->get_output_auto_connect() == AutoConnectPhysical) {
+ on = "OutputAutoConnectPhysical";
+ } else {
+ on = "OutputAutoConnectMaster";
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
+ }
+ }
+}
+
+void
+ARDOUR_UI::map_meter_falloff ()
+{
+ const char* action = X_("MeterFalloffMedium");
+
+ /* XXX hack alert. Fix this. Please */
+
+ float val = Config->get_meter_falloff ();
+ MeterFalloff code = (MeterFalloff) (int) (floor (val));
+
+ switch (code) {
+ case MeterFalloffOff:
+ action = X_("MeterFalloffOff");
+ break;
+ case MeterFalloffSlowest:
+ action = X_("MeterFalloffSlowest");
+ break;
+ case MeterFalloffSlow:
+ action = X_("MeterFalloffSlow");
+ break;
+ case MeterFalloffMedium:
+ action = X_("MeterFalloffMedium");
+ break;
+ case MeterFalloffFast:
+ action = X_("MeterFalloffFast");
break;
+ case MeterFalloffFaster:
+ action = X_("MeterFalloffFaster");
+ break;
+ case MeterFalloffFastest:
+ action = X_("MeterFalloffFastest");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
+ }
+}
- case Session::PunchIn:
- map_some_session_state ("Transport", "TogglePunchIn", &Session::get_punch_in);
+void
+ARDOUR_UI::map_meter_hold ()
+{
+ const char* action = X_("MeterHoldMedium");
+
+ /* XXX hack alert. Fix this. Please */
+
+ float val = Config->get_meter_hold ();
+ MeterHold code = (MeterHold) (int) (floor (val));
+
+ switch (code) {
+ case MeterHoldOff:
+ action = X_("MeterHoldOff");
+ break;
+ case MeterHoldShort:
+ action = X_("MeterHoldShort");
break;
+ case MeterHoldMedium:
+ action = X_("MeterHoldMedium");
+ break;
+ case MeterHoldLong:
+ action = X_("MeterHoldLong");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
+ }
+}
+
+void
+ARDOUR_UI::set_meter_hold (MeterHold val)
+{
+ const char* action = 0;
+ float fval;
+
+ fval = meter_hold_to_float (val);
- case Session::Clicking:
- map_some_session_state ("Transport", "ToggleClick", &Session::get_clicking);
+ switch (val) {
+ case MeterHoldOff:
+ action = X_("MeterHoldOff");
+ break;
+ case MeterHoldShort:
+ action = X_("MeterHoldShort");
+ break;
+ case MeterHoldMedium:
+ action = X_("MeterHoldMedium");
+ break;
+ case MeterHoldLong:
+ action = X_("MeterHoldLong");
break;
+ }
- default:
- // somebody else handles this
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active() && Config->get_meter_hold() != fval) {
+ Config->set_meter_hold (fval);
+ }
+ }
+}
+
+void
+ARDOUR_UI::set_meter_falloff (MeterFalloff val)
+{
+ const char* action = 0;
+ float fval;
+
+ fval = meter_falloff_to_float (val);
+
+ switch (val) {
+ case MeterFalloffOff:
+ action = X_("MeterFalloffOff");
+ break;
+ case MeterFalloffSlowest:
+ action = X_("MeterFalloffSlowest");
+ break;
+ case MeterFalloffSlow:
+ action = X_("MeterFalloffSlow");
+ break;
+ case MeterFalloffMedium:
+ action = X_("MeterFalloffMedium");
break;
+ case MeterFalloffFast:
+ action = X_("MeterFalloffFast");
+ break;
+ case MeterFalloffFaster:
+ action = X_("MeterFalloffFaster");
+ break;
+ case MeterFalloffFastest:
+ action = X_("MeterFalloffFastest");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active() && Config->get_meter_falloff () != fval) {
+ Config->set_meter_falloff (fval);
+ }
+ }
+}
+
+void
+ARDOUR_UI::parameter_changed (const char* parameter_name)
+{
+#define PARAM_IS(x) (!strcmp (parameter_name, (x)))
+
+ if (PARAM_IS ("slave-source")) {
+
+ sync_option_combo.set_active_text (slave_source_to_string (Config->get_slave_source()));
+
+ } else if (PARAM_IS ("send-mtc")) {
+
+ ActionManager::map_some_state ("options", "SendMTC", &Configuration::get_send_mtc);
+
+ } else if (PARAM_IS ("send-mmc")) {
+
+ ActionManager::map_some_state ("options", "SendMMC", &Configuration::get_send_mmc);
+
+ } else if (PARAM_IS ("mmc-control")) {
+ ActionManager::map_some_state ("options", "UseMMC", &Configuration::get_mmc_control);
+ } else if (PARAM_IS ("midi-feedback")) {
+ ActionManager::map_some_state ("options", "SendMIDIfeedback", &Configuration::get_midi_feedback);
+ } else if (PARAM_IS ("midi-control")) {
+ ActionManager::map_some_state ("options", "UseMIDIcontrol", &Configuration::get_midi_control);
+ } else if (PARAM_IS ("do-not-record-plugins")) {
+ ActionManager::map_some_state ("options", "DoNotRunPluginsWhileRecording", &Configuration::get_do_not_record_plugins);
+ } else if (PARAM_IS ("latched-record-enable")) {
+ ActionManager::map_some_state ("options", "LatchedRecordEnable", &Configuration::get_latched_record_enable);
+ } else if (PARAM_IS ("solo-latched")) {
+ ActionManager::map_some_state ("options", "LatchedSolo", &Configuration::get_solo_latched);
+ } else if (PARAM_IS ("solo-model")) {
+ map_solo_model ();
+ } else if (PARAM_IS ("auto-play")) {
+ ActionManager::map_some_state ("Transport", "ToggleAutoPlay", &Configuration::get_auto_play);
+ } else if (PARAM_IS ("auto-loop")) {
+ ActionManager::map_some_state ("Transport", "Loop", &Configuration::get_auto_loop);
+ } else if (PARAM_IS ("auto-return")) {
+ ActionManager::map_some_state ("Transport", "ToggleAutoReturn", &Configuration::get_auto_return);
+ } else if (PARAM_IS ("auto-input")) {
+ ActionManager::map_some_state ("Transport", "ToggleAutoInput", &Configuration::get_auto_input);
+ } else if (PARAM_IS ("punch-out")) {
+ ActionManager::map_some_state ("Transport", "TogglePunchOut", &Configuration::get_punch_out);
+ } else if (PARAM_IS ("punch-in")) {
+ ActionManager::map_some_state ("Transport", "TogglePunchIn", &Configuration::get_punch_in);
+ } else if (PARAM_IS ("clicking")) {
+ ActionManager::map_some_state ("Transport", "ToggleClick", &Configuration::get_clicking);
+ } else if (PARAM_IS ("jack-time-master")) {
+ ActionManager::map_some_state ("Transport", "ToggleTimeMaster", &Configuration::get_jack_time_master);
+ } else if (PARAM_IS ("plugins-stop-with-transport")) {
+ ActionManager::map_some_state ("options", "StopPluginsWithTransport", &Configuration::get_plugins_stop_with_transport);
+ } else if (PARAM_IS ("latched-record-enable")) {
+ ActionManager::map_some_state ("options", "LatchedRecordEnable", &Configuration::get_latched_record_enable);
+ } else if (PARAM_IS ("verify-remove-last-capture")) {
+ ActionManager::map_some_state ("options", "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture);
+ } else if (PARAM_IS ("stop-recording-on-xrun")) {
+ ActionManager::map_some_state ("options", "StopRecordingOnXrun", &Configuration::get_stop_recording_on_xrun);
+ } else if (PARAM_IS ("stop-at-session-end")) {
+ ActionManager::map_some_state ("options", "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end);
+ } else if (PARAM_IS ("monitoring-model")) {
+ map_monitor_model ();
+ } else if (PARAM_IS ("use-video-sync")) {
+ ActionManager::map_some_state ("Transport", "ToggleVideoSync", &Configuration::get_use_video_sync);
+ } else if (PARAM_IS ("quieten-at-speed")) {
+ ActionManager::map_some_state ("options", "GainReduceFastTransport", &Configuration::get_quieten_at_speed);
+ } else if (PARAM_IS ("shuttle-behaviour")) {
+
+ switch (Config->get_shuttle_behaviour ()) {
+ case Sprung:
+ shuttle_style_button.set_active_text (_("sprung"));
+ shuttle_fract = 0.0;
+ shuttle_box.queue_draw ();
+ if (session) {
+ if (session->transport_rolling()) {
+ shuttle_fract = SHUTTLE_FRACT_SPEED1;
+ session->request_transport_speed (1.0);
+ }
+ }
+ break;
+ case Wheel:
+ shuttle_style_button.set_active_text (_("wheel"));
+ break;
+ }
+
+ } else if (PARAM_IS ("shuttle-units")) {
+
+ switch (Config->get_shuttle_units()) {
+ case Percentage:
+ shuttle_units_button.set_label("% ");
+ break;
+ case Semitones:
+ shuttle_units_button.set_label(_("ST"));
+ break;
+ }
+ } else if (PARAM_IS ("input-auto-connect")) {
+ map_input_auto_connect ();
+ } else if (PARAM_IS ("output-auto-connect")) {
+ map_output_auto_connect ();
+ } else if (PARAM_IS ("native-file-header-format")) {
+ map_file_header_format ();
+ } else if (PARAM_IS ("native-file-data-format")) {
+ map_file_data_format ();
+ } else if (PARAM_IS ("meter-hold")) {
+ map_meter_hold ();
+ } else if (PARAM_IS ("meter-falloff")) {
+ map_meter_falloff ();
+ } else if (PARAM_IS ("verify-remove-last-capture")) {
+ ActionManager::map_some_state ("options", "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture);
}
+
+#undef PARAM_IS
}
#!/bin/sh
-source ardev_common.sh
+. ardev_common.sh
+export ARDOUR_RUNNING_UNDER_VALGRIND=TRUE
exec valgrind --num-callers=50 --tool=memcheck gtk2_ardour/ardour.bin --novst $*
/* styles are not available until the widgets are bound to a window */
- switch (_mode) {
- case SMPTE:
- Gtkmm2ext::set_size_request_to_display_given_text (hours_label, "-88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (minutes_label, "88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (seconds_label, "88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (frames_label, "88", 0, 2);
- break;
-
- case BBT:
- Gtkmm2ext::set_size_request_to_display_given_text (bars_label, "-888", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (beats_label, "88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (ticks_label, "8888", 0, 2);
- break;
-
- case MinSec:
- Gtkmm2ext::set_size_request_to_display_given_text (ms_hours_label, "99", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (ms_minutes_label, "99", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (ms_seconds_label, "99", 0, 2);
- break;
-
- case Frames:
- Gtkmm2ext::set_size_request_to_display_given_text (audio_frames_label, "4294967296", 0, 2);
- break;
-
- case Off:
- break;
-
- }
+ set_size_requests ();
}
void
-AudioClock::set (jack_nframes_t when, bool force)
+AudioClock::set (nframes_t when, bool force)
{
if ((!force && !is_visible()) || session == 0) {
void
AudioClock::smpte_offset_changed ()
{
- jack_nframes_t current;
+ nframes_t current;
switch (_mode) {
case SMPTE:
}
void
-AudioClock::set_frames (jack_nframes_t when, bool force)
+AudioClock::set_frames (nframes_t when, bool force)
{
char buf[32];
snprintf (buf, sizeof (buf), "%u", when);
}
void
-AudioClock::set_minsec (jack_nframes_t when, bool force)
+AudioClock::set_minsec (nframes_t when, bool force)
{
char buf[32];
- jack_nframes_t left;
+ nframes_t left;
int hrs;
int mins;
float secs;
left = when;
hrs = (int) floor (left / (session->frame_rate() * 60.0f * 60.0f));
- left -= (jack_nframes_t) floor (hrs * session->frame_rate() * 60.0f * 60.0f);
+ left -= (nframes_t) floor (hrs * session->frame_rate() * 60.0f * 60.0f);
mins = (int) floor (left / (session->frame_rate() * 60.0f));
- left -= (jack_nframes_t) floor (mins * session->frame_rate() * 60.0f);
+ left -= (nframes_t) floor (mins * session->frame_rate() * 60.0f);
secs = left / (float) session->frame_rate();
if (force || hrs != ms_last_hrs) {
- sprintf (buf, "%d", hrs);
+ sprintf (buf, "%02d", hrs);
ms_hours_label.set_text (buf);
ms_last_hrs = hrs;
}
if (force || mins != ms_last_mins) {
- sprintf (buf, "%d", mins);
+ sprintf (buf, "%02d", mins);
ms_minutes_label.set_text (buf);
ms_last_mins = mins;
}
}
void
-AudioClock::set_smpte (jack_nframes_t when, bool force)
+AudioClock::set_smpte (nframes_t when, bool force)
{
char buf[32];
SMPTE::Time smpte;
}
void
-AudioClock::set_bbt (jack_nframes_t when, bool force)
+AudioClock::set_bbt (nframes_t when, bool force)
{
char buf[16];
BBT_Time bbt;
{
if (session == 0) return FALSE;
- jack_nframes_t frames = 0;
+ nframes_t frames = 0;
switch (ev->button) {
case 1:
{
if (session == 0) return FALSE;
- jack_nframes_t frames = 0;
+ nframes_t frames = 0;
switch (ev->direction) {
if (trunc(drag_accum) != 0) {
- jack_nframes_t frames;
- jack_nframes_t pos ;
+ nframes_t frames;
+ nframes_t pos ;
int dir;
dir = (drag_accum < 0 ? 1:-1);
pos = current_time();
if (frames != 0 && frames * drag_accum < current_time()) {
- set ((jack_nframes_t) floor (pos - drag_accum * frames), false); // minus because up is negative in computer-land
+ set ((nframes_t) floor (pos - drag_accum * frames), false); // minus because up is negative in computer-land
} else {
set (0 , false);
return TRUE;
}
-jack_nframes_t
-AudioClock::get_frames (Field field,jack_nframes_t pos,int dir)
+nframes_t
+AudioClock::get_frames (Field field,nframes_t pos,int dir)
{
- jack_nframes_t frames = 0;
+ nframes_t frames = 0;
BBT_Time bbt;
switch (field) {
case SMPTE_Hours:
- frames = (jack_nframes_t) floor (3600.0 * session->frame_rate());
+ frames = (nframes_t) floor (3600.0 * session->frame_rate());
break;
case SMPTE_Minutes:
- frames = (jack_nframes_t) floor (60.0 * session->frame_rate());
+ frames = (nframes_t) floor (60.0 * session->frame_rate());
break;
case SMPTE_Seconds:
frames = session->frame_rate();
break;
case SMPTE_Frames:
- frames = (jack_nframes_t) floor (session->frame_rate() / session->smpte_frames_per_second);
+ frames = (nframes_t) floor (session->frame_rate() / Config->get_smpte_frames_per_second());
break;
case AudioFrames:
break;
case MS_Hours:
- frames = (jack_nframes_t) floor (3600.0 * session->frame_rate());
+ frames = (nframes_t) floor (3600.0 * session->frame_rate());
break;
case MS_Minutes:
- frames = (jack_nframes_t) floor (60.0 * session->frame_rate());
+ frames = (nframes_t) floor (60.0 * session->frame_rate());
break;
case MS_Seconds:
frames = session->frame_rate();
return frames;
}
-jack_nframes_t
-AudioClock::current_time (jack_nframes_t pos) const
+nframes_t
+AudioClock::current_time (nframes_t pos) const
{
- jack_nframes_t ret = 0;
+ nframes_t ret = 0;
switch (_mode) {
case SMPTE:
return ret;
}
-jack_nframes_t
-AudioClock::current_duration (jack_nframes_t pos) const
+nframes_t
+AudioClock::current_duration (nframes_t pos) const
{
- jack_nframes_t ret = 0;
+ nframes_t ret = 0;
switch (_mode) {
case SMPTE:
seconds_label.set_text("59");
}
- switch ((long)rint(session->smpte_frames_per_second)) {
+ switch ((long)rint(Config->get_smpte_frames_per_second())) {
case 24:
if (atoi(frames_label.get_text()) > 23) {
frames_label.set_text("23");
break;
}
- if (session->smpte_drop_frames) {
+ if (Config->get_smpte_drop_frames()) {
if ((atoi(minutes_label.get_text()) % 10) && (atoi(seconds_label.get_text()) == 0) && (atoi(frames_label.get_text()) < 2)) {
frames_label.set_text("02");
}
}
}
-jack_nframes_t
+nframes_t
AudioClock::smpte_frame_from_display () const
{
if (session == 0) {
}
SMPTE::Time smpte;
- jack_nframes_t sample;
+ nframes_t sample;
smpte.hours = atoi (hours_label.get_text());
smpte.minutes = atoi (minutes_label.get_text());
// Testcode for smpte<->sample conversions (P.S.)
SMPTE::Time smpte1;
- jack_nframes_t sample1;
- jack_nframes_t oldsample = 0;
+ nframes_t sample1;
+ nframes_t oldsample = 0;
SMPTE::Time smpte2;
- jack_nframes_t sample_increment;
+ nframes_t sample_increment;
sample_increment = (long)rint(session->frame_rate() / session->smpte_frames_per_second);
return sample;
}
-jack_nframes_t
+nframes_t
AudioClock::minsec_frame_from_display () const
{
if (session == 0) {
int mins = atoi (ms_minutes_label.get_text());
float secs = atof (ms_seconds_label.get_text());
- jack_nframes_t sr = session->frame_rate();
+ nframes_t sr = session->frame_rate();
- return (jack_nframes_t) floor ((hrs * 60.0f * 60.0f * sr) + (mins * 60.0f * sr) + (secs * sr));
+ return (nframes_t) floor ((hrs * 60.0f * 60.0f * sr) + (mins * 60.0f * sr) + (secs * sr));
}
-jack_nframes_t
-AudioClock::bbt_frame_from_display (jack_nframes_t pos) const
+nframes_t
+AudioClock::bbt_frame_from_display (nframes_t pos) const
{
if (session == 0) {
error << "AudioClock::current_time() called with BBT mode but without session!" << endmsg;
any.bbt.beats = atoi (beats_label.get_text());
any.bbt.ticks = atoi (ticks_label.get_text());
- jack_nframes_t ret = session->convert_to_frames_at (pos, any);
+ nframes_t ret = session->convert_to_frames_at (pos, any);
return ret;
}
-jack_nframes_t
-AudioClock::bbt_frame_duration_from_display (jack_nframes_t pos) const
+nframes_t
+AudioClock::bbt_frame_duration_from_display (nframes_t pos) const
{
if (session == 0) {
error << "AudioClock::current_time() called with BBT mode but without session!" << endmsg;
return session->tempo_map().bbt_duration_at(pos,bbt,1);
}
-jack_nframes_t
+nframes_t
AudioClock::audio_frame_from_display () const
{
- return (jack_nframes_t) atoi (audio_frames_label.get_text());
+ return (nframes_t) atoi (audio_frames_label.get_text());
}
void
}
_mode = m;
-
+
switch (_mode) {
case SMPTE:
clock_base.add (smpte_packer_hbox);
- Gtkmm2ext::set_size_request_to_display_given_text (hours_label, "-88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (minutes_label, "88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (seconds_label, "88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (frames_label, "88", 0, 2);
break;
case BBT:
clock_base.add (bbt_packer_hbox);
- Gtkmm2ext::set_size_request_to_display_given_text (bars_label, "-888", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (beats_label, "88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (ticks_label, "8888", 0, 2);
break;
case MinSec:
clock_base.add (minsec_packer_hbox);
- Gtkmm2ext::set_size_request_to_display_given_text (ms_hours_label, "99", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (ms_minutes_label, "99", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (ms_seconds_label, "99", 0, 2);
break;
case Frames:
clock_base.add (frames_packer_hbox);
- Gtkmm2ext::set_size_request_to_display_given_text (audio_frames_label, "4294967296", 0, 2);
+ break;
case Off:
break;
}
+ set_size_requests ();
+
set (last_when, true);
clock_base.show_all ();
key_entry_state = 0;
}
+void
+AudioClock::set_size_requests ()
+{
+ /* note that in some fonts, "88" is narrower than "00", hence the 2 pixel padding */
+
+ switch (_mode) {
+ case SMPTE:
+ Gtkmm2ext::set_size_request_to_display_given_text (hours_label, "-88", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (minutes_label, "88", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (seconds_label, "88", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (frames_label, "88", 2, 2);
+ break;
+
+ case BBT:
+ Gtkmm2ext::set_size_request_to_display_given_text (bars_label, "-888", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (beats_label, "88", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (ticks_label, "8888", 2, 2);
+ break;
+
+ case MinSec:
+ Gtkmm2ext::set_size_request_to_display_given_text (ms_hours_label, "99", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (ms_minutes_label, "99", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (ms_seconds_label, "99.999", 2, 2);
+ break;
+
+ case Frames:
+ Gtkmm2ext::set_size_request_to_display_given_text (audio_frames_label, "4294967296", 2, 2);
+ break;
+
+ case Off:
+ break;
+
+ }
+}
Mode mode() const { return _mode; }
- void set (jack_nframes_t, bool force = false);
+ void set (nframes_t, bool force = false);
void set_mode (Mode);
- jack_nframes_t current_time (jack_nframes_t position = 0) const;
- jack_nframes_t current_duration (jack_nframes_t position = 0) const;
+ nframes_t current_time (nframes_t position = 0) const;
+ nframes_t current_duration (nframes_t position = 0) const;
void set_session (ARDOUR::Session *s);
sigc::signal<void> ValueChanged;
Gtk::EventBox clock_base;
Gtk::Frame clock_frame;
- jack_nframes_t last_when;
+ nframes_t last_when;
uint32_t last_hrs;
uint32_t last_mins;
bool field_focus_in_event (GdkEventFocus *, Field);
bool field_focus_out_event (GdkEventFocus *, Field);
- void set_smpte (jack_nframes_t, bool);
- void set_bbt (jack_nframes_t, bool);
- void set_minsec (jack_nframes_t, bool);
- void set_frames (jack_nframes_t, bool);
+ void set_smpte (nframes_t, bool);
+ void set_bbt (nframes_t, bool);
+ void set_minsec (nframes_t, bool);
+ void set_frames (nframes_t, bool);
- jack_nframes_t get_frames (Field,jack_nframes_t pos = 0,int dir=1);
+ nframes_t get_frames (Field,nframes_t pos = 0,int dir=1);
void smpte_sanitize_display();
- jack_nframes_t smpte_frame_from_display () const;
- jack_nframes_t bbt_frame_from_display (jack_nframes_t) const;
- jack_nframes_t bbt_frame_duration_from_display (jack_nframes_t) const;
- jack_nframes_t minsec_frame_from_display () const;
- jack_nframes_t audio_frame_from_display () const;
+ nframes_t smpte_frame_from_display () const;
+ nframes_t bbt_frame_from_display (nframes_t) const;
+ nframes_t bbt_frame_duration_from_display (nframes_t) const;
+ nframes_t minsec_frame_from_display () const;
+ nframes_t audio_frame_from_display () const;
void build_ops_menu ();
void setup_events ();
void smpte_offset_changed ();
+ void set_size_requests ();
static const uint32_t field_length[(int)AudioFrames+1];
};
void
AudioRegionEditor::length_clock_changed ()
{
- jack_nframes_t frames = length_clock.current_time();
+ nframes_t frames = length_clock.current_time();
_region->trim_end (_region->position() + frames, this);
length_clock.set (_region->length());
AudioRegionEditor::fade_in_changed ()
{
float msecs = fade_in_length_adjustment.get_value();
- jack_nframes_t sr = _session.frame_rate();
- jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
- jack_nframes_t frames;
+ nframes_t sr = _session.frame_rate();
+ nframes_t adj_frames = (nframes_t) floor (msecs * (sr/1000.0f));
+ nframes_t frames;
bool x;
- if (adj_frames != (frames = (jack_nframes_t) _region->fade_in().back()->when)) {
+ if (adj_frames != (frames = (nframes_t) _region->fade_in().back()->when)) {
fade_in_length_adjustment.set_value ((frames * 1000.0f) / sr);
}
AudioRegionEditor::fade_out_changed ()
{
float msecs = fade_out_length_adjustment.get_value();
- jack_nframes_t sr = _session.frame_rate();
- jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
- jack_nframes_t frames;
+ nframes_t sr = _session.frame_rate();
+ nframes_t adj_frames = (nframes_t) floor (msecs * (sr/1000.0f));
+ nframes_t frames;
bool x;
- if (adj_frames != (frames = (jack_nframes_t) _region->fade_out().back()->when)) {
+ if (adj_frames != (frames = (nframes_t) _region->fade_out().back()->when)) {
fade_out_length_adjustment.set_value ((frames * 1000.0f) / sr);
}
void
AudioRegionEditor::fade_in_length_adjustment_changed ()
{
- jack_nframes_t fade_length = (jack_nframes_t) floor (fade_in_length_adjustment.get_value() * _session.frame_rate() * 0.001);
- fade_length = max (fade_length, (jack_nframes_t) 64);
+ nframes_t fade_length = (nframes_t) floor (fade_in_length_adjustment.get_value() * _session.frame_rate() * 0.001);
+ fade_length = max (fade_length, (nframes_t) 64);
fade_length = min (fade_length, _region->length());
_region->set_fade_in_length (fade_length);
void
AudioRegionEditor::fade_out_length_adjustment_changed ()
{
- jack_nframes_t fade_length = (jack_nframes_t) floor (fade_out_length_adjustment.get_value() * _session.frame_rate() * 0.001);
- fade_length = max (fade_length, (jack_nframes_t) 64);
+ nframes_t fade_length = (nframes_t) floor (fade_out_length_adjustment.get_value() * _session.frame_rate() * 0.001);
+ fade_length = max (fade_length, (nframes_t) 64);
fade_length = min (fade_length, _region->length());
_region->set_fade_out_length (fade_length);
gain_line->show ();
}
- reset_width_dependent_items ((double) _region->length() / samples_per_unit);
-
gain_line->reset ();
set_height (trackview.height);
void
AudioRegionView::reset_fade_in_shape ()
{
- reset_fade_in_shape_width ((jack_nframes_t) audio_region()->fade_in().back()->when);
+ reset_fade_in_shape_width ((nframes_t) audio_region()->fade_in().back()->when);
}
void
-AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
+AudioRegionView::reset_fade_in_shape_width (nframes_t width)
{
if (fade_in_handle == 0) {
return;
/* smallest size for a fade is 64 frames */
- width = std::max ((jack_nframes_t) 64, width);
+ width = std::max ((nframes_t) 64, width);
Points* points;
double pwidth = width / samples_per_unit;
void
AudioRegionView::reset_fade_out_shape ()
{
- reset_fade_out_shape_width ((jack_nframes_t) audio_region()->fade_out().back()->when);
+ reset_fade_out_shape_width ((nframes_t) audio_region()->fade_out().back()->when);
}
void
-AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
+AudioRegionView::reset_fade_out_shape_width (nframes_t width)
{
if (fade_out_handle == 0) {
return;
/* smallest size for a fade is 64 frames */
- width = std::max ((jack_nframes_t) 64, width);
+ width = std::max ((nframes_t) 64, width);
Points* points;
double pwidth = width / samples_per_unit;
}
if (create_zero_line) {
+ if (zero_line) {
+ delete zero_line;
+ }
zero_line = new ArdourCanvas::SimpleLine (*group);
zero_line->property_x1() = (gdouble) 1.0;
zero_line->property_x2() = (gdouble) (_region->length() / samples_per_unit) - 1.0;
item->w2i (x, y);
- jack_nframes_t fx = trackview.editor.pixel_to_frame (x);
+ nframes_t fx = trackview.editor.pixel_to_frame (x);
if (fx > _region->length()) {
return;
GhostRegion* add_ghost (AutomationTimeAxisView&);
- void reset_fade_in_shape_width (jack_nframes_t);
- void reset_fade_out_shape_width (jack_nframes_t);
+ void reset_fade_in_shape_width (nframes_t);
+ void reset_fade_out_shape_width (nframes_t);
void set_fade_in_active (bool);
void set_fade_out_active (bool);
void
AudioStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wait_for_waves)
{
+ AudioRegionView *region_view;
+
ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::add_region_view), r));
boost::shared_ptr<AudioRegion> region = boost::dynamic_pointer_cast<AudioRegion> (r);
return;
}
- AudioRegionView *region_view;
- list<RegionView *>::iterator i;
-
- for (i = region_views.begin(); i != region_views.end(); ++i) {
+ for (list<RegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
if ((*i)->region() == r) {
/* great. we already have a AudioRegionView for this Region. use it again. */
-
+
(*i)->set_valid (true);
return;
}
}
-
+
switch (_trackview.audio_track()->mode()) {
case Normal:
region_view = new AudioRegionView (canvas_group, _trackview, region,
region_view->set_waveform_visible(_trackview.editor.show_waveforms());
/* catch regionview going away */
+ region->GoingAway.connect (bind (mem_fun (*this, &AudioStreamView::remove_region_view), boost::weak_ptr<Region> (r)));
- region->GoingAway.connect (bind (mem_fun (*this, &AudioStreamView::remove_region_view), region));
-
RegionViewAdded (region_view);
}
void
-AudioStreamView::remove_region_view (boost::shared_ptr<Region> r)
+AudioStreamView::remove_region_view (boost::weak_ptr<Region> weak_r)
{
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::remove_region_view), r));
+ ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::remove_region_view), weak_r));
- for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end();) {
- list<CrossfadeView*>::iterator tmp;
-
- tmp = i;
- ++tmp;
-
- boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>(r);
- if (ar && (*i)->crossfade.involves (ar)) {
- delete *i;
- crossfade_views.erase (i);
+ boost::shared_ptr<Region> r (weak_r.lock());
+
+ if (!r) {
+ return;
+ }
+
+ if (!_trackview.session().deletion_in_progress()) {
+
+ for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end();) {
+ list<CrossfadeView*>::iterator tmp;
+
+ tmp = i;
+ ++tmp;
+
+ boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>(r);
+ if (ar && (*i)->crossfade.involves (ar)) {
+ delete *i;
+ crossfade_views.erase (i);
+ }
+
+ i = tmp;
}
-
- i = tmp;
}
StreamView::remove_region_view(r);
boost::shared_ptr<AudioFileSource> src = boost::static_pointer_cast<AudioFileSource> (ads->write_source (n));
if (src) {
sources.push_back (src);
- rec_data_ready_connections.push_back (src->PeakRangeReady.connect (bind (mem_fun (*this, &AudioStreamView::rec_peak_range_ready), src)));
+
+ rec_data_ready_connections.push_back (src->PeakRangeReady.connect (bind
+ (mem_fun (*this, &AudioStreamView::rec_peak_range_ready), boost::weak_ptr<Source>(src))));
}
}
// handle multi
- jack_nframes_t start = 0;
+ nframes_t start = 0;
if (rec_regions.size() > 0) {
start = rec_regions.back()->start() + _trackview.get_diskstream()->get_captured_frames(rec_regions.size()-1);
}
(RegionFactory::create (sources, start, 1 , "", 0, (Region::Flag)(Region::DefaultFlags | Region::DoNotSaveState), false)));
assert(region);
region->set_position (_trackview.session().transport_frame(), this);
- rec_regions.push_back (region);
-
- // rec regions are destroyed in setup_rec_box
- /* we add the region later */
+ rec_regions.push_back (region);
}
/* start a new rec box */
at = _trackview.audio_track(); /* we know what it is already */
boost::shared_ptr<AudioDiskstream> ds = at->audio_diskstream();
- jack_nframes_t frame_pos = ds->current_capture_start ();
+ nframes_t frame_pos = ds->current_capture_start ();
gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
gdouble xend;
uint32_t fill_color;
last_rec_data_frame = 0;
/* remove temp regions */
-
- for (list<boost::shared_ptr<Region> >::iterator iter = rec_regions.begin(); iter != rec_regions.end();) {
+
+ for (list<boost::shared_ptr<Region> >::iterator iter = rec_regions.begin(); iter != rec_regions.end(); ) {
list<boost::shared_ptr<Region> >::iterator tmp;
+
tmp = iter;
++tmp;
+
(*iter)->drop_references ();
+
iter = tmp;
}
}
void
-AudioStreamView::rec_peak_range_ready (jack_nframes_t start, jack_nframes_t cnt, boost::shared_ptr<Source> src)
+AudioStreamView::rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::weak_ptr<Source> weak_src)
{
- // this is called from the peak building thread
+ ENSURE_GUI_THREAD(bind (mem_fun (*this, &AudioStreamView::rec_peak_range_ready), start, cnt, weak_src));
+
+ boost::shared_ptr<Source> src (weak_src.lock());
+
+ if (!src) {
+ return;
+ }
- ENSURE_GUI_THREAD(bind (mem_fun (*this, &AudioStreamView::rec_peak_range_ready), start, cnt, src));
+ // this is called from the peak building thread
if (rec_data_ready_map.size() == 0 || start+cnt > last_rec_data_frame) {
last_rec_data_frame = start + cnt;
}
-
+
rec_data_ready_map[src] = true;
-
+
if (rec_data_ready_map.size() == _trackview.get_diskstream()->n_channels().get(DataType::AUDIO)) {
this->update_rec_regions ();
rec_data_ready_map.clear();
continue;
}
- jack_nframes_t origlen = region->length();
+ nframes_t origlen = region->length();
if (region == rec_regions.back() && rec_active) {
if (last_rec_data_frame > region->start()) {
- jack_nframes_t nlen = last_rec_data_frame - region->start();
+ nframes_t nlen = last_rec_data_frame - region->start();
if (nlen != region->length()) {
} else {
- jack_nframes_t nlen = _trackview.get_diskstream()->get_captured_frames(n);
+ nframes_t nlen = _trackview.get_diskstream()->get_captured_frames(n);
if (nlen != region->length()) {
#include <map>
#include <cmath>
+#include <boost/weak_ptr.hpp>
+
#include <ardour/location.h>
#include "enums.h"
#include "simplerect.h"
private:
void setup_rec_box ();
- void rec_peak_range_ready (jack_nframes_t start, jack_nframes_t cnt, boost::shared_ptr<ARDOUR::Source> src);
+ void rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::weak_ptr<ARDOUR::Source> src);
void update_rec_regions ();
void add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_waves);
- void remove_region_view (boost::shared_ptr<ARDOUR::Region> );
+ void remove_region_view (boost::weak_ptr<ARDOUR::Region> );
void remove_audio_region_view (boost::shared_ptr<ARDOUR::AudioRegion> );
- void remove_audio_rec_region (boost::shared_ptr<ARDOUR::AudioRegion>);
void undisplay_diskstream ();
void redisplay_diskstream ();
line to convert them to something relevant.
*/
- mr.xval = (jack_nframes_t) floor (cp.get_x());
+ mr.xval = (nframes_t) floor (cp.get_x());
mr.yval = 1.0 - (cp.get_y() / _height);
/* if xval has not changed, set it directly from the model to avoid rounding errors */
if (mr.xval == trackview.editor.frame_to_unit((*cp.model)->when)) {
- mr.xval = (jack_nframes_t) (*cp.model)->when;
+ mr.xval = (nframes_t) (*cp.model)->when;
} else {
mr.xval = trackview.editor.unit_to_frame (mr.xval);
}
/* part 2: find out where the model point is now
*/
- mr.xpos = (jack_nframes_t) (*cp.model)->when;
+ mr.xpos = (nframes_t) (*cp.model)->when;
mr.ypos = (*cp.model)->value;
/* part 3: get the position of the visual control
after = nth (cp.view_index + 1);
if (before) {
- mr.xmin = (jack_nframes_t) (*before->model)->when;
+ mr.xmin = (nframes_t) (*before->model)->when;
mr.ymin = (*before->model)->value;
mr.start = before->model;
++mr.start;
}
void
-AutomationLine::point_drag (ControlPoint& cp, jack_nframes_t x, float fraction, bool with_push)
+AutomationLine::point_drag (ControlPoint& cp, nframes_t x, float fraction, bool with_push)
{
modify_view (cp, x, fraction, with_push);
drags++;
}
void
-AutomationLine::get_selectables (jack_nframes_t& start, jack_nframes_t& end,
+AutomationLine::get_selectables (nframes_t& start, nframes_t& end,
double botfrac, double topfrac, list<Selectable*>& results)
{
double top;
double bot;
- jack_nframes_t nstart;
- jack_nframes_t nend;
+ nframes_t nstart;
+ nframes_t nend;
bool collecting = false;
/* Curse X11 and its inverted coordinate system! */
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
- jack_nframes_t when = (jack_nframes_t) (*(*i)->model)->when;
+ nframes_t when = (nframes_t) (*(*i)->model)->when;
if (when >= start && when <= end) {
void
AutomationLine::change_model (AutomationList::iterator i, double x, double y)
{
- alist.modify (i, (jack_nframes_t) x, y);
+ alist.modify (i, (nframes_t) x, y);
}
void
ShapeType _shape;
};
-class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
+class AutomationLine : public PBD::StatefulDestructible
{
public:
AutomationLine (const string & name, TimeAxisView&, ArdourCanvas::Group&, ARDOUR::AutomationList&);
void clear();
void set_selected_points (PointSelection&);
- void get_selectables (jack_nframes_t& start, jack_nframes_t& end,
+ void get_selectables (nframes_t& start, nframes_t& end,
double botfrac, double topfrac,
list<Selectable*>& results);
void get_inverted_selectables (Selection&, list<Selectable*>& results);
/* dragging API */
virtual void start_drag (ControlPoint*, float fraction);
- virtual void point_drag(ControlPoint&, jack_nframes_t x, float, bool with_push);
+ virtual void point_drag(ControlPoint&, nframes_t x, float, bool with_push);
virtual void end_drag (ControlPoint*);
virtual void line_drag(uint32_t i1, uint32_t i2, float, bool with_push);
struct ModelRepresentation {
ARDOUR::AutomationList::iterator start;
ARDOUR::AutomationList::iterator end;
- jack_nframes_t xpos;
+ nframes_t xpos;
double ypos;
- jack_nframes_t xmin;
+ nframes_t xmin;
double ymin;
- jack_nframes_t xmax;
+ nframes_t xmax;
double ymax;
- jack_nframes_t xval;
+ nframes_t xval;
double yval;
};
struct AutomationSelectable : public Selectable
{
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
double low_fract;
double high_fract;
TimeAxisView& track;
- AutomationSelectable (jack_nframes_t s, jack_nframes_t e, double l, double h, TimeAxisView& atv)
+ AutomationSelectable (nframes_t s, nframes_t e, double l, double h, TimeAxisView& atv)
: start (s), end (e), low_fract (l), high_fract (h), track (atv) {}
};
}
bool
-AutomationTimeAxisView::paste (jack_nframes_t pos, float times, Selection& selection, size_t nth)
+AutomationTimeAxisView::paste (nframes_t pos, float times, Selection& selection, size_t nth)
{
bool ret = true;
}
bool
-AutomationTimeAxisView::paste_one (AutomationLine& line, jack_nframes_t pos, float times, Selection& selection, size_t nth)
+AutomationTimeAxisView::paste_one (AutomationLine& line, nframes_t pos, float times, Selection& selection, size_t nth)
{
AutomationSelection::iterator p;
AutomationList& alist (line.the_list());
}
void
-AutomationTimeAxisView::get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results)
+AutomationTimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& results)
{
if (!lines.empty() && touched (top, bot)) {
double topfrac;
void set_samples_per_unit (double);
std::string name() const { return _name; }
- virtual void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double) = 0;
+ virtual void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double) = 0;
virtual void clear_lines ();
virtual void add_line (AutomationLine&);
vector<AutomationLine*> lines;
void set_selected_points (PointSelection&);
- void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable *>&);
+ void get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable *>&);
void get_inverted_selectables (Selection&, list<Selectable*>& results);
- void show_timestretch (jack_nframes_t start, jack_nframes_t end) {}
+ void show_timestretch (nframes_t start, nframes_t end) {}
void hide_timestretch () {}
/* editing operations */
bool cut_copy_clear (Selection&, Editing::CutCopyOp);
bool cut_copy_clear_objects (PointSelection&, Editing::CutCopyOp);
- bool paste (jack_nframes_t, float times, Selection&, size_t nth);
+ bool paste (nframes_t, float times, Selection&, size_t nth);
void reset_objects (PointSelection&);
void add_ghost (GhostRegion*);
bool cut_copy_clear_one (AutomationLine&, Selection&, Editing::CutCopyOp);
bool cut_copy_clear_objects_one (AutomationLine&, PointSelection&, Editing::CutCopyOp);
- bool paste_one (AutomationLine&, jack_nframes_t, float times, Selection&, size_t nth);
+ bool paste_one (AutomationLine&, nframes_t, float times, Selection&, size_t nth);
void reset_objects_one (AutomationLine&, PointSelection&);
virtual void set_automation_state (ARDOUR::AutoState) = 0;
case PROP_RECTIFIED:
g_value_set_boolean (value, waveview->rectified);
+ break;
case PROP_REGION_START:
g_value_set_uint (value, waveview->region_start);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
return;
}
- jack_nframes_t len = xfade.length ();
+ nframes_t len = xfade.length ();
fade[current].normative_curve.clear ();
fade[current].gain_curve.clear ();
CrossfadeEditor::audition_both ()
{
AudioPlaylist& pl (session.the_auditioner()->prepare_playlist());
- jack_nframes_t preroll;
- jack_nframes_t postroll;
- jack_nframes_t length;
- jack_nframes_t left_start_offset;
- jack_nframes_t right_length;
- jack_nframes_t left_length;
+ nframes_t preroll;
+ nframes_t postroll;
+ nframes_t length;
+ nframes_t left_start_offset;
+ nframes_t right_length;
+ nframes_t left_length;
if (preroll_button.get_active()) {
preroll = ARDOUR_UI::instance()->preroll_clock.current_duration ();
void
CrossfadeView::set_height (double height)
{
- if (height == TimeAxisView::Smaller ||
- height == TimeAxisView::Small)
+ if (height == TimeAxisView::hSmaller ||
+ height == TimeAxisView::hSmall)
TimeAxisViewItem::set_height (height - 3 );
else
TimeAxisViewItem::set_height (height - NAME_HIGHLIGHT_SIZE - 3 );
At "height - 3.0" the bottom of the crossfade touches the name highlight or the bottom of the track (if the
track is either Small or Smaller.
*/
- switch(get_time_axis_view().height) {
- case TimeAxisView::Smaller:
- case TimeAxisView::Small:
- h = get_time_axis_view().height - 3.0;
- break;
-
- default:
- h = get_time_axis_view().height - NAME_HIGHLIGHT_SIZE - 3.0;
+ double tav_height = get_time_axis_view().height;
+ if (tav_height == TimeAxisView::hSmaller ||
+ tav_height == TimeAxisView::hSmall) {
+ h = tav_height - 3.0;
+ } else {
+ h = tav_height - NAME_HIGHLIGHT_SIZE - 3.0;
}
if (h < 0) {
ArdourCanvas::Item* item;
ItemType item_type;
void* data;
- jack_nframes_t last_frame_position;
+ nframes_t last_frame_position;
int32_t pointer_frame_offset;
- jack_nframes_t grab_frame;
- jack_nframes_t last_pointer_frame;
- jack_nframes_t current_pointer_frame;
+ nframes_t grab_frame;
+ nframes_t last_pointer_frame;
+ nframes_t current_pointer_frame;
double grab_x, grab_y;
double cumulative_x_drag;
double cumulative_y_drag;
#include "editor_xpms"
-static const int32_t slide_index = 0;
-static const int32_t splice_index = 1;
-
-static const gchar *edit_mode_strings[] = {
- N_("Slide Edit"),
- N_("Splice Edit"),
- 0
-};
-
static const gchar *snap_type_strings[] = {
N_("None"),
N_("CD Frames"),
};
static const gchar *zoom_focus_strings[] = {
- N_("Focus Left"),
- N_("Focus Right"),
- N_("Focus Center"),
- N_("Focus Play"),
- N_("Focus Edit"),
+ N_("Left"),
+ N_("Right"),
+ N_("Center"),
+ N_("Playhead"),
+ N_("Edit Cursor"),
0
};
bbt_beat_subdivision = 4;
canvas_width = 0;
canvas_height = 0;
+ autoscroll_active = false;
autoscroll_timeout_tag = -1;
interthread_progress_window = 0;
/* nudge stuff */
- nudge_forward_button.add (*(manage (new Image (get_xpm("right_arrow.xpm")))));
- nudge_backward_button.add (*(manage (new Image (get_xpm("left_arrow.xpm")))));
+ nudge_forward_button.add (*(manage (new Image (::get_icon("nudge_right")))));
+ nudge_backward_button.add (*(manage (new Image (::get_icon("nudge_left")))));
ARDOUR_UI::instance()->tooltips().set_tip (nudge_forward_button, _("Nudge Region/Selection Forwards"));
ARDOUR_UI::instance()->tooltips().set_tip (nudge_backward_button, _("Nudge Region/Selection Backwards"));
ControlProtocol::ZoomOut.connect (bind (mem_fun (*this, &Editor::temporal_zoom_step), true));
ControlProtocol::ScrollTimeline.connect (mem_fun (*this, &Editor::control_scroll));
+ Config->ParameterChanged.connect (mem_fun (*this, &Editor::parameter_changed));
+
constructed = true;
instant_save ();
-
}
Editor::~Editor()
void
Editor::set_frames_per_unit (double fpu)
{
- jack_nframes_t frames;
+ nframes_t frames;
if (fpu == frames_per_unit) {
return;
}
- if (fpu < 1.0) {
- fpu = 1.0;
+ if (fpu < 2.0) {
+ fpu = 2.0;
}
// convert fpu to frame count
- frames = (jack_nframes_t) floor (fpu * canvas_width);
+ frames = (nframes_t) floor (fpu * canvas_width);
/* don't allow zooms that fit more than the maximum number
of frames into an 800 pixel wide space.
return;
}
+ if (fpu == frames_per_unit) {
+ return;
+ }
+
frames_per_unit = fpu;
if (frames != zoom_range_clock.current_duration()) {
}
void
-Editor::reposition_x_origin (jack_nframes_t frame)
+Editor::reposition_x_origin (nframes_t frame)
{
if (frame != leftmost_frame) {
leftmost_frame = frame;
- jack_nframes_t rightmost_frame = leftmost_frame + current_page_frames ();
+ nframes_t rightmost_frame = leftmost_frame + current_page_frames ();
if (rightmost_frame > last_canvas_frame) {
last_canvas_frame = rightmost_frame;
if (fpu < 1.0) {
fpu = 1.0;
- zoom_range_clock.set ((jack_nframes_t) floor (fpu * canvas_width));
+ zoom_range_clock.set ((nframes_t) floor (fpu * canvas_width));
} else if (fpu > session->current_end_frame() / canvas_width) {
fpu = session->current_end_frame() / canvas_width;
- zoom_range_clock.set ((jack_nframes_t) floor (fpu * canvas_width));
+ zoom_range_clock.set ((nframes_t) floor (fpu * canvas_width));
}
temporal_zoom (fpu);
}
double step = fraction * current_page_frames();
- jack_nframes_t target;
+ nframes_t target;
- if ((fraction < 0.0f) && (session->transport_frame() < (jack_nframes_t) fabs(step))) {
+ if ((fraction < 0.0f) && (session->transport_frame() < (nframes_t) fabs(step))) {
target = 0;
} else if ((fraction > 0.0f) && (max_frames - session->transport_frame() < step)) {
target = (max_frames - (current_page_frames()*2)); // allow room for slop in where the PH is on the screen
} else {
- target = (session->transport_frame() + (jack_nframes_t) floor ((fraction * current_page_frames())));
+ target = (session->transport_frame() + (nframes_t) floor ((fraction * current_page_frames())));
}
/* move visuals, we'll catch up with it later */
}
bool
-Editor::deferred_control_scroll (jack_nframes_t target)
+Editor::deferred_control_scroll (nframes_t target)
{
session->request_locate (target);
return false;
Editor::canvas_horizontally_scrolled ()
{
- leftmost_frame = (jack_nframes_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
+ leftmost_frame = (nframes_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
update_fixed_rulers ();
tempo_map_changed (Change (0));
}
void
-Editor::reposition_and_zoom (jack_nframes_t frame, double nfpu)
+Editor::reposition_and_zoom (nframes_t frame, double nfpu)
{
if (!repos_zoom_queued) {
repos_zoom_queued = true;
}
gint
-Editor::deferred_reposition_and_zoom (jack_nframes_t frame, double nfpu)
+Editor::deferred_reposition_and_zoom (nframes_t frame, double nfpu)
{
set_frames_per_unit (nfpu);
Realized ();
}
-void
-Editor::queue_session_control_changed (Session::ControlType t)
-{
- Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &Editor::session_control_changed), t));
-}
-
-void
-Editor::session_control_changed (Session::ControlType t)
-{
- // right now we're only tracking some state here
-
- switch (t) {
- case Session::AutoLoop:
- update_loop_range_view (true);
- break;
- case Session::PunchIn:
- case Session::PunchOut:
- update_punch_range_view (true);
- break;
-
- case Session::LayeringModel:
- update_layering_model ();
- break;
-
- case Session::SmpteMode:
- update_smpte_mode ();
- break;
-
- default:
- break;
- }
-}
-
void
Editor::start_scrolling ()
{
}
void
-Editor::map_position_change (jack_nframes_t frame)
+Editor::map_position_change (nframes_t frame)
{
ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::map_position_change), frame));
}
void
-Editor::center_screen (jack_nframes_t frame)
+Editor::center_screen (nframes_t frame)
{
double page = canvas_width * frames_per_unit;
}
void
-Editor::center_screen_internal (jack_nframes_t frame, float page)
+Editor::center_screen_internal (nframes_t frame, float page)
{
page /= 2;
if (frame > page) {
- frame -= (jack_nframes_t) page;
+ frame -= (nframes_t) page;
} else {
frame = 0;
}
{
ENSURE_GUI_THREAD (mem_fun (*this, &Editor::handle_new_duration));
- jack_nframes_t new_end = session->get_maximum_extent() + (jack_nframes_t) floorf (current_page_frames() * 0.10f);
+ nframes_t new_end = session->get_maximum_extent() + (nframes_t) floorf (current_page_frames() * 0.10f);
if (new_end > last_canvas_frame) {
last_canvas_frame = new_end;
session_connections.push_back (session->RegionHiddenChange.connect (mem_fun(*this, &Editor::region_hidden)));
session_connections.push_back (session->SMPTEOffsetChanged.connect (mem_fun(*this, &Editor::update_just_smpte)));
- session_connections.push_back (session->SMPTETypeChanged.connect (mem_fun(*this, &Editor::update_just_smpte)));
-
- session_connections.push_back (session->SMPTETypeChanged.connect (mem_fun(*this, &Editor::update_smpte_mode)));
- session_connections.push_back (session->PullupChanged.connect (mem_fun(*this, &Editor::update_video_pullup)));
session_connections.push_back (session->tempo_map().StateChanged.connect (mem_fun(*this, &Editor::tempo_map_changed)));
analysis_window->set_session (session);
#endif
- switch (session->get_edit_mode()) {
- case Splice:
- edit_mode_selector.set_active_text (edit_mode_strings[splice_index]);
- break;
-
- case Slide:
- edit_mode_selector.set_active_text (edit_mode_strings[slide_index]);
- break;
- }
-
Location* loc = session->locations()->auto_loop_location();
if (loc == 0) {
loc = new Location (0, session->current_end_frame(), _("Loop"),(Location::Flags) (Location::IsAutoLoop | Location::IsHidden));
loc->set_name (_("Punch"));
}
- update_loop_range_view (true);
- update_punch_range_view (true);
+ Config->map_parameters (mem_fun (*this, &Editor::parameter_changed));
- session->ControlChanged.connect (mem_fun(*this, &Editor::queue_session_control_changed));
session->StateSaved.connect (mem_fun(*this, &Editor::session_state_saved));
refresh_location_display ();
session->locations()->StateChanged.connect (mem_fun(*this, &Editor::refresh_location_display_s));
session->locations()->end_location()->changed.connect (mem_fun(*this, &Editor::end_location_changed));
- bool yn;
- RefPtr<Action> act;
-
- act = ActionManager::get_action (X_("Editor"), X_("toggle-xfades-active"));
- if (act) {
- RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
- /* do it twice to force the change */
- yn = session->get_crossfades_active();
- tact->set_active (!yn);
- tact->set_active (yn);
- }
-
- act = ActionManager::get_action (X_("Editor"), X_("toggle-auto-xfades"));
- if (act) {
- RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
- /* do it twice to force the change */
- yn = Config->get_auto_xfade ();
- tact->set_active (!yn);
- tact->set_active (yn);
- }
-
- /* xfade visibility state set from editor::set_state() */
-
- update_crossfade_model();
- update_layering_model();
-
- update_smpte_mode();
- update_video_pullup();
-
handle_new_duration ();
redisplay_regions ();
}
void
-Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, bool with_selection, jack_nframes_t frame)
+Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, bool with_selection, nframes_t frame)
{
using namespace Menu_Helpers;
- Menu* (Editor::*build_menu_function)(jack_nframes_t);
+ Menu* (Editor::*build_menu_function)(nframes_t);
Menu *menu;
switch (item_type) {
}
Menu*
-Editor::build_track_context_menu (jack_nframes_t ignored)
+Editor::build_track_context_menu (nframes_t ignored)
{
using namespace Menu_Helpers;
}
Menu*
-Editor::build_track_bus_context_menu (jack_nframes_t ignored)
+Editor::build_track_bus_context_menu (nframes_t ignored)
{
using namespace Menu_Helpers;
}
Menu*
-Editor::build_track_region_context_menu (jack_nframes_t frame)
+Editor::build_track_region_context_menu (nframes_t frame)
{
using namespace Menu_Helpers;
MenuList& edit_items = track_region_context_menu.items();
Playlist* pl;
if ((ds = atv->get_diskstream()) && ((pl = ds->playlist()))) {
- Playlist::RegionList* regions = pl->regions_at ((jack_nframes_t) floor ( (double)frame * ds->speed()));
+ Playlist::RegionList* regions = pl->regions_at ((nframes_t) floor ( (double)frame * ds->speed()));
for (Playlist::RegionList::iterator i = regions->begin(); i != regions->end(); ++i) {
add_region_context_items (atv->audio_view(), (*i), edit_items);
}
}
Menu*
-Editor::build_track_crossfade_context_menu (jack_nframes_t frame)
+Editor::build_track_crossfade_context_menu (nframes_t frame)
{
using namespace Menu_Helpers;
MenuList& edit_items = track_crossfade_context_menu.items();
Menu*
-Editor::build_track_selection_context_menu (jack_nframes_t ignored)
+Editor::build_track_selection_context_menu (nframes_t ignored)
{
using namespace Menu_Helpers;
MenuList& edit_items = track_selection_context_menu.items();
XMLNode* node = new XMLNode ("Editor");
char buf[32];
- _id.print (buf);
+ _id.print (buf, sizeof (buf));
node->add_property ("id", buf);
if (is_realized()) {
}
void
-Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
+Editor::snap_to (nframes_t& start, int32_t direction, bool for_mark)
{
Location* before = 0;
Location* after = 0;
return;
}
- const jack_nframes_t one_second = session->frame_rate();
- const jack_nframes_t one_minute = session->frame_rate() * 60;
+ const nframes_t one_second = session->frame_rate();
+ const nframes_t one_minute = session->frame_rate() * 60;
- jack_nframes_t presnap = start;
+ nframes_t presnap = start;
switch (snap_type) {
case SnapToFrame:
case SnapToCDFrame:
if (direction) {
- start = (jack_nframes_t) ceil ((double) start / (one_second / 75)) * (one_second / 75);
+ start = (nframes_t) ceil ((double) start / (one_second / 75)) * (one_second / 75);
} else {
- start = (jack_nframes_t) floor ((double) start / (one_second / 75)) * (one_second / 75);
+ start = (nframes_t) floor ((double) start / (one_second / 75)) * (one_second / 75);
}
break;
case SnapToSMPTEFrame:
if (direction) {
- start = (jack_nframes_t) (ceil ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
+ start = (nframes_t) (ceil ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
} else {
- start = (jack_nframes_t) (floor ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
+ start = (nframes_t) (floor ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
}
break;
start -= session->smpte_offset ();
}
if (direction > 0) {
- start = (jack_nframes_t) ceil ((double) start / one_second) * one_second;
+ start = (nframes_t) ceil ((double) start / one_second) * one_second;
} else {
- start = (jack_nframes_t) floor ((double) start / one_second) * one_second;
+ start = (nframes_t) floor ((double) start / one_second) * one_second;
}
if (session->smpte_offset_negative())
start -= session->smpte_offset ();
}
if (direction) {
- start = (jack_nframes_t) ceil ((double) start / one_minute) * one_minute;
+ start = (nframes_t) ceil ((double) start / one_minute) * one_minute;
} else {
- start = (jack_nframes_t) floor ((double) start / one_minute) * one_minute;
+ start = (nframes_t) floor ((double) start / one_minute) * one_minute;
}
if (session->smpte_offset_negative())
{
case SnapToSeconds:
if (direction) {
- start = (jack_nframes_t) ceil ((double) start / one_second) * one_second;
+ start = (nframes_t) ceil ((double) start / one_second) * one_second;
} else {
- start = (jack_nframes_t) floor ((double) start / one_second) * one_second;
+ start = (nframes_t) floor ((double) start / one_second) * one_second;
}
break;
case SnapToMinutes:
if (direction) {
- start = (jack_nframes_t) ceil ((double) start / one_minute) * one_minute;
+ start = (nframes_t) ceil ((double) start / one_minute) * one_minute;
} else {
- start = (jack_nframes_t) floor ((double) start / one_minute) * one_minute;
+ start = (nframes_t) floor ((double) start / one_minute) * one_minute;
}
break;
case SnapToRegionSync:
case SnapToRegionBoundary:
if (!region_boundary_cache.empty()) {
- vector<jack_nframes_t>::iterator i;
+ vector<nframes_t>::iterator i;
if (direction > 0) {
i = std::upper_bound (region_boundary_cache.begin(), region_boundary_cache.end(), start);
vector<ToggleButton *> mouse_mode_buttons;
- mouse_move_button.add (*(manage (new Image (get_xpm("tool_object.xpm")))));
+ mouse_move_button.add (*(manage (new Image (::get_icon("tool_object")))));
mouse_move_button.set_relief(Gtk::RELIEF_NONE);
mouse_mode_buttons.push_back (&mouse_move_button);
mouse_select_button.add (*(manage (new Image (get_xpm("tool_range.xpm")))));
mouse_select_button.set_relief(Gtk::RELIEF_NONE);
mouse_mode_buttons.push_back (&mouse_select_button);
- mouse_gain_button.add (*(manage (new Image (get_xpm("tool_gain.xpm")))));
+ mouse_gain_button.add (*(manage (new Image (::get_icon("tool_gain")))));
mouse_gain_button.set_relief(Gtk::RELIEF_NONE);
mouse_mode_buttons.push_back (&mouse_gain_button);
- mouse_zoom_button.add (*(manage (new Image (get_xpm("tool_zoom.xpm")))));
+ mouse_zoom_button.add (*(manage (new Image (::get_icon("tool_zoom")))));
mouse_zoom_button.set_relief(Gtk::RELIEF_NONE);
mouse_mode_buttons.push_back (&mouse_zoom_button);
- mouse_timefx_button.add (*(manage (new Image (get_xpm("tool_stretch.xpm")))));
+ mouse_timefx_button.add (*(manage (new Image (::get_icon("tool_stretch")))));
mouse_timefx_button.set_relief(Gtk::RELIEF_NONE);
mouse_mode_buttons.push_back (&mouse_timefx_button);
- mouse_audition_button.add (*(manage (new Image (get_xpm("tool_audition.xpm")))));
+ mouse_audition_button.add (*(manage (new Image (::get_icon("tool_audition")))));
mouse_audition_button.set_relief(Gtk::RELIEF_NONE);
mouse_mode_buttons.push_back (&mouse_audition_button);
mouse_mode_button_box.pack_start(mouse_audition_button, true, true);
mouse_mode_button_box.set_homogeneous(true);
+ vector<string> edit_mode_strings;
+ edit_mode_strings.push_back (edit_mode_to_string (Splice));
+ edit_mode_strings.push_back (edit_mode_to_string (Slide));
+
edit_mode_selector.set_name ("EditModeSelector");
- Gtkmm2ext::set_size_request_to_display_given_text (edit_mode_selector, "Splice Edit", 2+FUDGE, 10);
- set_popdown_strings (edit_mode_selector, internationalize (edit_mode_strings));
+ Gtkmm2ext::set_size_request_to_display_given_text (edit_mode_selector, longest (edit_mode_strings).c_str(), 2+FUDGE, 10);
+ set_popdown_strings (edit_mode_selector, edit_mode_strings);
edit_mode_selector.signal_changed().connect (mem_fun(*this, &Editor::edit_mode_selection_done));
mode_box->pack_start(edit_mode_selector);
zoom_box.set_border_width (2);
zoom_in_button.set_name ("EditorTimeButton");
- zoom_in_button.add (*(manage (new Image (get_xpm("zoom_in.xpm")))));
+ zoom_in_button.add (*(manage (new Image (::get_icon("zoom_in")))));
zoom_in_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), false));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_in_button, _("Zoom In"));
zoom_out_button.set_name ("EditorTimeButton");
- zoom_out_button.add (*(manage (new Image (get_xpm("zoom_out.xpm")))));
+ zoom_out_button.add (*(manage (new Image (::get_icon("zoom_out")))));
zoom_out_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), true));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_button, _("Zoom Out"));
zoom_out_full_button.set_name ("EditorTimeButton");
- zoom_out_full_button.add (*(manage (new Image (get_xpm("zoom_full.xpm")))));
+ zoom_out_full_button.add (*(manage (new Image (::get_icon("zoom_full")))));
zoom_out_full_button.signal_clicked().connect (mem_fun(*this, &Editor::temporal_zoom_session));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_full_button, _("Zoom to Session"));
Gtkmm2ext::set_size_request_to_display_given_text (zoom_focus_selector, "Focus Center", 2+FUDGE, 0);
set_popdown_strings (zoom_focus_selector, internationalize (zoom_focus_strings));
zoom_focus_selector.signal_changed().connect (mem_fun(*this, &Editor::zoom_focus_selection_done));
+ ARDOUR_UI::instance()->tooltips().set_tip (zoom_focus_selector, _("Zoom focus"));
zoom_box.pack_start (zoom_focus_selector, false, false);
/* select this point and any others that it represents */
double y1, y2;
- jack_nframes_t x1, x2;
+ nframes_t x1, x2;
x1 = pixel_to_frame (clicked_control_point->get_x() - 10);
x2 = pixel_to_frame (clicked_control_point->get_x() + 10);
} else if (op == Selection::Extend) {
list<Selectable*> results;
- jack_nframes_t last_frame;
- jack_nframes_t first_frame;
+ nframes_t last_frame;
+ nframes_t first_frame;
/* 1. find the last selected regionview in the track that was clicked in */
mode = Slide;
}
- session->set_edit_mode (mode);
+ Config->set_edit_mode (mode);
}
void
return *_playlist_selector;
}
-jack_nframes_t
-Editor::get_nudge_distance (jack_nframes_t pos, jack_nframes_t& next)
+nframes_t
+Editor::get_nudge_distance (nframes_t pos, nframes_t& next)
{
- jack_nframes_t ret;
+ nframes_t ret;
ret = nudge_clock.current_duration (pos);
next = ret + 1; /* XXXX fix me */
}
bool
-Editor::audio_region_selection_covers (jack_nframes_t where)
+Editor::audio_region_selection_covers (nframes_t where)
{
for (RegionSelection::iterator a = selection->regions.begin(); a != selection->regions.end(); ++a) {
if ((*a)->region()->covers (where)) {
return key_press_focus_accelerator_handler (*this, ev);
}
-void
-Editor::update_smpte_mode ()
-{
- ENSURE_GUI_THREAD(mem_fun(*this, &Editor::update_smpte_mode));
-
- RefPtr<Action> act;
-
- float frames = session->smpte_frames_per_second;
- bool drop = session->smpte_drop_frames;
-
- if ((frames < 23.976 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte23976"));
- else if ((frames < 24 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte24"));
- else if ((frames < 24.976 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte24976"));
- else if ((frames < 25 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte25"));
- else if ((frames < 29.97 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte2997"));
- else if ((frames < 29.97 * 1.0005) && drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte2997drop"));
- else if ((frames < 30 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte30"));
- else if ((frames < 30 * 1.0005) && drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte30drop"));
- else if ((frames < 59.94 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte5994"));
- else if ((frames < 60 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte60"));
- else
- cerr << "Unexpected SMPTE value (" << frames << (drop ? "drop" : "") << ") in update_smpte_mode. Menu is probably wrong\n" << endl;
-
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && !ract->get_active()) {
- ract->set_active (true);
- }
- }
-}
-
-void
-Editor::update_video_pullup ()
-{
- ENSURE_GUI_THREAD (mem_fun(*this, &Editor::update_video_pullup));
-
- RefPtr<Action> act;
-
- float pullup = session->video_pullup;
-
- if ( pullup < (-4.1667 - 0.1) * 0.99) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4Minus1"));
- } else if ( pullup < (-4.1667) * 0.99 ) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4"));
- } else if ( pullup < (-4.1667 + 0.1) * 0.99 ) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4Plus1"));
- } else if ( pullup < (-0.1) * 0.99 ) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus1"));
- } else if (pullup > (4.1667 + 0.1) * 0.99 ) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4Plus1"));
- } else if ( pullup > (4.1667) * 0.99 ) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4"));
- } else if ( pullup > (4.1667 - 0.1) * 0.99) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4Minus1"));
- } else if ( pullup > (0.1) * 0.99 ) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus1"));
- } else
- act = ActionManager::get_action (X_("Editor"), X_("PullupNone"));
-
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && !ract->get_active()) {
- ract->set_active (true);
- }
- }
-
-}
-
-
-void
-Editor::update_layering_model ()
-{
- RefPtr<Action> act;
-
- switch (session->get_layer_model()) {
- case Session::LaterHigher:
- act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
- break;
- case Session::MoveAddHigher:
- act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
- break;
- case Session::AddHigher:
- act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
- break;
- }
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && !ract->get_active()) {
- ract->set_active (true);
- }
- }
-}
-
-void
-Editor::update_crossfade_model ()
-{
- RefPtr<Action> act;
-
- switch (session->get_xfade_model()) {
- case FullCrossfade:
- act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
- break;
- case ShortCrossfade:
- act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
- break;
- }
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && !ract->get_active()) {
- ract->set_active (true);
- }
- }
-}
-
void connect_to_session (ARDOUR::Session *);
ARDOUR::Session* current_session() const { return session; }
- jack_nframes_t leftmost_position() const { return leftmost_frame; }
- jack_nframes_t current_page_frames() const {
- return (jack_nframes_t) floor (canvas_width * frames_per_unit);
+ nframes_t leftmost_position() const { return leftmost_frame; }
+ nframes_t current_page_frames() const {
+ return (nframes_t) floor (canvas_width * frames_per_unit);
}
void set_snap_to (Editing::SnapType);
void set_edit_menu (Gtk::Menu&);
- jack_nframes_t unit_to_frame (double unit) {
- return (jack_nframes_t) rint (unit * frames_per_unit);
+ nframes_t unit_to_frame (double unit) {
+ return (nframes_t) rint (unit * frames_per_unit);
}
- double frame_to_unit (jack_nframes_t frame) {
+ double frame_to_unit (nframes_t frame) {
return rint ((double) frame / (double) frames_per_unit);
}
xscroll_adjustment.
*/
- jack_nframes_t pixel_to_frame (double pixel) {
+ nframes_t pixel_to_frame (double pixel) {
/* pixel can be less than zero when motion events
are processed. since we've already run the world->canvas
*/
if (pixel >= 0) {
- return (jack_nframes_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas.gobj())->pixels_per_unit);
+ return (nframes_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas.gobj())->pixels_per_unit);
} else {
return 0;
}
}
- gulong frame_to_pixel (jack_nframes_t frame) {
+ gulong frame_to_pixel (nframes_t frame) {
return (gulong) rint ((frame / (frames_per_unit * GNOME_CANVAS(track_canvas.gobj())->pixels_per_unit)));
}
PlaylistSelector& playlist_selector() const;
void route_name_changed (TimeAxisView *);
gdouble frames_per_unit;
- jack_nframes_t leftmost_frame;
+ nframes_t leftmost_frame;
void clear_playlist (ARDOUR::Playlist&);
void new_playlists ();
void toggle_waveforms_while_recording ();
void toggle_measure_visibility ();
- void set_meter_falloff (int);
- void set_meter_hold (int32_t);
-
/* SMPTE timecode & video sync */
void smpte_fps_chosen (ARDOUR::Session::SmpteFormat format);
void update_crossfade_model ();
void set_crossfade_model (ARDOUR::CrossfadeModel);
-
/* layers */
- void set_layer_model (ARDOUR::Session::LayerModel);
+ void set_layer_model (ARDOUR::LayerModel);
void update_layering_model ();
/* redirect shared ops menu. caller must free returned menu */
bool new_regionviews_display_gain () { return _new_regionviews_show_envelope; }
void prepare_for_cleanup ();
- void reposition_x_origin (jack_nframes_t sample);
+ void reposition_x_origin (nframes_t sample);
void maximise_editing_space();
void restore_editing_space();
protected:
void map_transport_state ();
- void map_position_change (jack_nframes_t);
+ void map_position_change (nframes_t);
void on_realize();
void hide();
void show ();
void set_name (const string&);
- void set_position (jack_nframes_t start, jack_nframes_t end = 0);
+ void set_position (nframes_t start, nframes_t end = 0);
void set_color_rgba (uint32_t);
};
void hide_marker (ArdourCanvas::Item*, GdkEvent*);
void clear_marker_display ();
- void mouse_add_new_marker (jack_nframes_t where);
+ void mouse_add_new_marker (nframes_t where);
TimeAxisView* clicked_axisview;
RouteTimeAxisView* clicked_routeview;
Gtk::Menu * track_edit_playlist_submenu;
Gtk::Menu * track_selection_edit_playlist_submenu;
- void popup_track_context_menu (int, int, ItemType, bool, jack_nframes_t);
- Gtk::Menu* build_track_context_menu (jack_nframes_t);
- Gtk::Menu* build_track_bus_context_menu (jack_nframes_t);
- Gtk::Menu* build_track_region_context_menu (jack_nframes_t frame);
- Gtk::Menu* build_track_crossfade_context_menu (jack_nframes_t);
- Gtk::Menu* build_track_selection_context_menu (jack_nframes_t);
+ void popup_track_context_menu (int, int, ItemType, bool, nframes_t);
+ Gtk::Menu* build_track_context_menu (nframes_t);
+ Gtk::Menu* build_track_bus_context_menu (nframes_t);
+ Gtk::Menu* build_track_region_context_menu (nframes_t frame);
+ Gtk::Menu* build_track_crossfade_context_menu (nframes_t);
+ Gtk::Menu* build_track_selection_context_menu (nframes_t);
void add_dstream_context_items (Gtk::Menu_Helpers::MenuList&);
void add_bus_context_items (Gtk::Menu_Helpers::MenuList&);
void add_region_context_items (AudioStreamView*, boost::shared_ptr<ARDOUR::Region>, Gtk::Menu_Helpers::MenuList&);
ArdourCanvas::Text* verbose_canvas_cursor;
bool verbose_cursor_visible;
- void session_control_changed (ARDOUR::Session::ControlType);
- void queue_session_control_changed (ARDOUR::Session::ControlType);
-
+ void parameter_changed (const char *);
bool track_canvas_motion (GdkEvent*);
void update_just_smpte ();
void update_fixed_rulers ();
void update_tempo_based_rulers ();
- void popup_ruler_menu (jack_nframes_t where = 0, ItemType type = RegionItem);
+ void popup_ruler_menu (nframes_t where = 0, ItemType type = RegionItem);
void update_ruler_visibility ();
void ruler_toggled (int);
gint ruler_label_button_release (GdkEventButton*);
Editor& editor;
ArdourCanvas::Points points;
ArdourCanvas::Line canvas_item;
- jack_nframes_t current_frame;
+ nframes_t current_frame;
double length;
Cursor (Editor&, const string& color, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
~Cursor ();
- void set_position (jack_nframes_t);
+ void set_position (nframes_t);
void set_length (double units);
void set_y_axis (double position);
};
void select_all_selectables_using_cursor (Cursor *, bool);
void select_all_selectables_between_cursors (Cursor *, Cursor *);
- boost::shared_ptr<ARDOUR::Region> find_next_region (jack_nframes_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
+ boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
- vector<jack_nframes_t> region_boundary_cache;
+ vector<nframes_t> region_boundary_cache;
void build_region_boundary_cache ();
Gtk::VBox trackview_vpacker;
double canvas_width;
double canvas_height;
- jack_nframes_t last_canvas_frame;
+ nframes_t last_canvas_frame;
bool track_canvas_map_handler (GdkEventAny*);
bool time_canvas_map_handler (GdkEventAny*);
Gtk::HBox edit_controls_hbox;
void control_scroll (float);
- bool deferred_control_scroll (jack_nframes_t);
+ bool deferred_control_scroll (nframes_t);
sigc::connection control_scroll_connection;
void tie_vertical_scrolling ();
void canvas_horizontally_scrolled ();
- void reposition_and_zoom (jack_nframes_t sample, double fpu);
- gint deferred_reposition_and_zoom (jack_nframes_t sample, double fpu);
+ void reposition_and_zoom (nframes_t sample, double fpu);
+ gint deferred_reposition_and_zoom (nframes_t sample, double fpu);
void end_location_changed (ARDOUR::Location*);
bool repos_zoom_queued;
}
Gtk::TreeModelColumn<Glib::ustring> name;
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Region> > region;
- Gtk::TreeModelColumn<Gdk::Color> color_;
+ Gtk::TreeModelColumn<Gdk::Color> color_;
};
- RegionListDisplayModelColumns region_list_columns;
- Gtkmm2ext::DnDTreeView region_list_display;
- Glib::RefPtr<Gtk::TreeStore> region_list_model;
- Glib::RefPtr<Gtk::ToggleAction> toggle_full_region_list_action;
- Glib::RefPtr<Gtk::ToggleAction> toggle_show_auto_regions_action;
+ RegionListDisplayModelColumns region_list_columns;
+ Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Region> > region_list_display;
+
+ Glib::RefPtr<Gtk::TreeStore> region_list_model;
+ Glib::RefPtr<Gtk::ToggleAction> toggle_full_region_list_action;
+ Glib::RefPtr<Gtk::ToggleAction> toggle_show_auto_regions_action;
void region_list_selection_changed ();
bool region_list_selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
NamedSelectionDisplayModelColumns named_selection_columns;
Glib::RefPtr<Gtk::TreeStore> named_selection_model;
- Gtkmm2ext::DnDTreeView named_selection_display;
+ Gtkmm2ext::DnDTreeView<ARDOUR::NamedSelection*> named_selection_display;
Gtk::ScrolledWindow named_selection_scroller;
void name_selection();
static void build_cursors ();
sigc::connection scroll_connection;
- jack_nframes_t last_update_frame;
- void center_screen (jack_nframes_t);
- void center_screen_internal (jack_nframes_t, float);
+ nframes_t last_update_frame;
+ void center_screen (nframes_t);
+ void center_screen_internal (nframes_t, float);
void update_current_screen ();
void session_going_away ();
- jack_nframes_t cut_buffer_start;
- jack_nframes_t cut_buffer_length;
+ nframes_t cut_buffer_start;
+ nframes_t cut_buffer_length;
bool typed_event (ArdourCanvas::Item*, GdkEvent*, ItemType);
bool button_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
void register_actions ();
- int ensure_cursor (jack_nframes_t* pos);
+ int ensure_cursor (nframes_t* pos);
void handle_new_region (boost::shared_ptr<ARDOUR::Region>);
void handle_region_removed (boost::shared_ptr<ARDOUR::Region>);
void cut_copy_ranges (Editing::CutCopyOp);
void mouse_paste ();
- void paste_internal (jack_nframes_t position, float times);
+ void paste_internal (nframes_t position, float times);
/* EDITING OPERATIONS */
void lower_region ();
void lower_region_to_bottom ();
void split_region ();
- void split_region_at (jack_nframes_t);
- void split_regions_at (jack_nframes_t, RegionSelection&);
+ void split_region_at (nframes_t);
+ void split_regions_at (nframes_t, RegionSelection&);
void crop_region_to_selection ();
- void set_a_regions_sync_position (boost::shared_ptr<ARDOUR::Region>, jack_nframes_t);
+ void set_a_regions_sync_position (boost::shared_ptr<ARDOUR::Region>, nframes_t);
void set_region_sync_from_edit_cursor ();
void remove_region_sync();
- void align_selection (ARDOUR::RegionPoint, jack_nframes_t position);
- void align_selection_relative (ARDOUR::RegionPoint point, jack_nframes_t position);
- void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, jack_nframes_t position);
- void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, jack_nframes_t position);
+ void align_selection (ARDOUR::RegionPoint, nframes_t position);
+ void align_selection_relative (ARDOUR::RegionPoint point, nframes_t position);
+ void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes_t position);
+ void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes_t position);
void remove_some_regions ();
void remove_clicked_region ();
void destroy_clicked_region ();
void temporal_zoom_selection ();
void temporal_zoom_session ();
void temporal_zoom (gdouble scale);
- void temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const string & op);
- void temporal_zoom_to_frame (bool coarser, jack_nframes_t frame);
+ void temporal_zoom_by_frame (nframes_t start, nframes_t end, const string & op);
+ void temporal_zoom_to_frame (bool coarser, nframes_t frame);
void amplitude_zoom (gdouble scale);
void amplitude_zoom_step (bool in);
void add_external_audio_action (Editing::ImportMode);
- void bring_in_external_audio (Editing::ImportMode mode, ARDOUR::AudioTrack*, jack_nframes_t& pos, bool prompt);
- void do_import (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, jack_nframes_t&, bool);
- void do_embed (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, jack_nframes_t&, bool);
- int import_sndfile (Glib::ustring path, Editing::ImportMode mode, ARDOUR::AudioTrack* track, jack_nframes_t& pos);
+ void bring_in_external_audio (Editing::ImportMode mode, ARDOUR::AudioTrack*, nframes_t& pos, bool prompt);
+ void do_import (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, nframes_t&, bool);
+ void do_embed (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, nframes_t&, bool);
+ int import_sndfile (Glib::ustring path, Editing::ImportMode mode, ARDOUR::AudioTrack* track, nframes_t& pos);
int embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
- ARDOUR::AudioTrack* track, jack_nframes_t& pos, bool prompt);
- int finish_bringing_in_audio (boost::shared_ptr<ARDOUR::AudioRegion> region, uint32_t, uint32_t, ARDOUR::AudioTrack* track, jack_nframes_t& pos, Editing::ImportMode mode);
+ ARDOUR::AudioTrack* track, nframes_t& pos, bool prompt);
+ int finish_bringing_in_audio (boost::shared_ptr<ARDOUR::AudioRegion> region, uint32_t, uint32_t, ARDOUR::AudioTrack* track, nframes_t& pos, Editing::ImportMode mode);
/* generic interthread progress window */
void keyboard_selection_begin ();
void keyboard_selection_finish (bool add);
bool have_pending_keyboard_selection;
- jack_nframes_t pending_keyboard_selection_start;
+ nframes_t pending_keyboard_selection_start;
boost::shared_ptr<ARDOUR::Region> select_region_for_operation (int dir, TimeAxisView **tv);
void extend_selection_to_end_of_region (bool next);
void remove_gain_control_point (ArdourCanvas::Item*, GdkEvent*);
void remove_control_point (ArdourCanvas::Item*, GdkEvent*);
- void mouse_brush_insert_region (RegionView*, jack_nframes_t pos);
- void brush (jack_nframes_t);
+ void mouse_brush_insert_region (RegionView*, nframes_t pos);
+ void brush (nframes_t);
- void show_verbose_time_cursor (jack_nframes_t frame, double offset = 0, double xpos=-1, double ypos=-1);
- void show_verbose_duration_cursor (jack_nframes_t start, jack_nframes_t end, double offset = 0, double xpos=-1, double ypos=-1);
+ void show_verbose_time_cursor (nframes_t frame, double offset = 0, double xpos=-1, double ypos=-1);
+ void show_verbose_duration_cursor (nframes_t start, nframes_t end, double offset = 0, double xpos=-1, double ypos=-1);
/* Canvas event handlers */
void new_tempo_section ();
- void mouse_add_new_tempo_event (jack_nframes_t where);
- void mouse_add_new_meter_event (jack_nframes_t where);
+ void mouse_add_new_tempo_event (nframes_t where);
+ void mouse_add_new_meter_event (nframes_t where);
void remove_tempo_marker (ArdourCanvas::Item*);
void remove_meter_marker (ArdourCanvas::Item*);
void tempo_map_changed (ARDOUR::Change);
void redisplay_tempo ();
- void snap_to (jack_nframes_t& first, int32_t direction = 0, bool for_mark = false);
+ void snap_to (nframes_t& first, int32_t direction = 0, bool for_mark = false);
uint32_t bbt_beat_subdivision;
/* toolbar */
void region_selection_op (void (ARDOUR::Region::*pmf)(void*), void*);
void region_selection_op (void (ARDOUR::Region::*pmf)(bool), bool);
- bool audio_region_selection_covers (jack_nframes_t where);
+ bool audio_region_selection_covers (nframes_t where);
/* transport range select process */
enum RangeMarkerOp {
void drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
void end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
- bool select_all_within (jack_nframes_t start, jack_nframes_t end, gdouble topy, gdouble boty, Selection::Operation op);
+ bool select_all_within (nframes_t start, nframes_t end, gdouble topy, gdouble boty, Selection::Operation op);
ArdourCanvas::SimpleRect *rubberband_rect;
void end_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event);
ArdourCanvas::SimpleRect *zoom_rect;
- void reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end);
+ void reposition_zoom_rect (nframes_t start, nframes_t end);
/* diskstream/route display management */
Glib::RefPtr<Gtk::TreeSelection> route_display_selection;
gint route_list_compare_func (Gtk::TreeModel::iterator, Gtk::TreeModel::iterator);
- Gtkmm2ext::DnDTreeView route_list_display;
- Gtk::ScrolledWindow route_list_scroller;
- Gtk::Menu* route_list_menu;
+ Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Route> > route_list_display;
+ Gtk::ScrolledWindow route_list_scroller;
+ Gtk::Menu* route_list_menu;
bool route_list_display_button_press (GdkEventButton*);
bool route_list_selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
/* autoscrolling */
+ bool autoscroll_active;
int autoscroll_timeout_tag;
int autoscroll_direction;
uint32_t autoscroll_cnt;
- jack_nframes_t autoscroll_distance;
+ nframes_t autoscroll_distance;
static gint _autoscroll_canvas (void *);
bool autoscroll_canvas ();
void start_trim (ArdourCanvas::Item*, GdkEvent*);
void point_trim (GdkEvent*);
void trim_motion_callback (ArdourCanvas::Item*, GdkEvent*);
- void single_contents_trim (RegionView&, jack_nframes_t, bool, bool, bool);
- void single_start_trim (RegionView&, jack_nframes_t, bool, bool);
- void single_end_trim (RegionView&, jack_nframes_t, bool, bool);
+ void single_contents_trim (RegionView&, nframes_t, bool, bool, bool);
+ void single_start_trim (RegionView&, nframes_t, bool, bool);
+ void single_end_trim (RegionView&, nframes_t, bool, bool);
void trim_finished_callback (ArdourCanvas::Item*, GdkEvent*);
void thaw_region_after_trim (RegionView& rv);
ExportDialog *export_dialog;
ExportDialog *export_range_markers_dialog;
- void export_range (jack_nframes_t start, jack_nframes_t end);
+ void export_range (nframes_t start, nframes_t end);
void export_range_markers ();
int write_region_selection(RegionSelection&);
Gtk::Menu* edit_menu;
bool edit_menu_map_handler (GdkEventAny*);
- jack_nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
+ nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
void time_fx_motion (ArdourCanvas::Item*, GdkEvent*);
void start_time_fx (ArdourCanvas::Item*, GdkEvent*);
Gtk::VBox nudge_vbox;
AudioClock nudge_clock;
- jack_nframes_t get_nudge_distance (jack_nframes_t pos, jack_nframes_t& next);
+ nframes_t get_nudge_distance (nframes_t pos, nframes_t& next);
/* audio filters */
#include "editing.h"
#include "actions.h"
#include "ardour_ui.h"
+#include "gui_thread.h"
#include "i18n.h"
using namespace Gtk;
ActionManager::register_action (editor_actions, X_("Layering"), _("Layering"));
ActionManager::register_action (editor_actions, X_("SMPTE"), _("SMPTE fps"));
ActionManager::register_action (editor_actions, X_("Pullup"), _("Pullup / Pulldown"));
- ActionManager::register_action (editor_actions, X_("Metering"), _("Metering"));
- ActionManager::register_action (editor_actions, X_("MeteringFallOffRate"), _("Fall off rate"));
- ActionManager::register_action (editor_actions, X_("MeteringHoldTime"), _("Hold Time"));
ActionManager::register_action (editor_actions, X_("addExistingAudioFiles"), _("Add Existing Audio"));
/* add named actions for the editor */
ActionManager::register_toggle_action (editor_actions, X_("ToggleWaveformsWhileRecording"), _("Show Waveforms While Recording"), mem_fun (*this, &Editor::toggle_waveforms_while_recording));
act = ActionManager::register_toggle_action (editor_actions, X_("ToggleMeasureVisibility"), _("Show Measures"), mem_fun (*this, &Editor::toggle_measure_visibility));
- RadioAction::Group meter_falloff_group;
- RadioAction::Group meter_hold_group;
-
- /*
- Slowest = 6.6dB/sec falloff at update rate of 40ms
- Slow = 6.8dB/sec falloff at update rate of 40ms
- */
-
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffOff"), _("Off"), bind (mem_fun (*this, &Editor::set_meter_falloff), 0));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffSlowest"), _("Slowest"), bind (mem_fun (*this, &Editor::set_meter_falloff), 1));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffSlow"), _("Slow"), bind (mem_fun (*this, &Editor::set_meter_falloff), 2));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffMedium"), _("Medium"), bind (mem_fun (*this, &Editor::set_meter_falloff), 3));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFast"), _("Fast"), bind (mem_fun (*this, &Editor::set_meter_falloff), 4));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFaster"), _("Faster"), bind (mem_fun (*this, &Editor::set_meter_falloff), 5));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFastest"), _("Fastest"), bind (mem_fun (*this, &Editor::set_meter_falloff), 6));
-
- ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldOff"), _("Off"), bind (mem_fun (*this, &Editor::set_meter_hold), 0));
- ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldShort"), _("Short"), bind (mem_fun (*this, &Editor::set_meter_hold), 40));
- ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldMedium"), _("Medium"), bind (mem_fun (*this, &Editor::set_meter_hold), 100));
- ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldLong"), _("Long"), bind (mem_fun (*this, &Editor::set_meter_hold), 200));
-
RadioAction::Group layer_model_group;
- ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerLaterHigher"), _("Later is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), Session::LaterHigher));
- ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerMoveAddHigher"), _("Most Recently Moved/Added is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), Session::MoveAddHigher));
- ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerAddHigher"), _("Most Recently Added is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), Session::AddHigher));
+ ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerLaterHigher"), _("Later is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), LaterHigher));
+ ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerMoveAddHigher"), _("Most Recently Moved/Added is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), MoveAddHigher));
+ ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerAddHigher"), _("Most Recently Added is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), AddHigher));
RadioAction::Group smpte_group;
}
void
-Editor::toggle_auto_xfade ()
+Editor::set_crossfade_model (CrossfadeModel model)
{
- Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-auto-xfades"));
+ RefPtr<Action> act;
+
+ /* this is driven by a toggle on a radio group, and so is invoked twice,
+ once for the item that became inactive and once for the one that became
+ active.
+ */
+
+ switch (model) {
+ case FullCrossfade:
+ act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
+ break;
+ case ShortCrossfade:
+ act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
+ break;
+ }
+
if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- Config->set_auto_xfade (tact->get_active());
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active()) {
+ Config->set_xfade_model (model);
+ }
}
}
void
-Editor::toggle_xfades_active ()
+Editor::update_crossfade_model ()
{
- Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-xfades-active"));
- if (session && act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- session->set_crossfades_active (tact->get_active());
+ RefPtr<Action> act;
+
+ switch (Config->get_xfade_model()) {
+ case FullCrossfade:
+ act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
+ break;
+ case ShortCrossfade:
+ act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
+ break;
+ }
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
}
}
void
-Editor::toggle_xfade_visibility ()
+Editor::update_smpte_mode ()
{
- Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-xfades-visible"));
- if (session && act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- // set_xfade_visibility (tact->get_active());
+ ENSURE_GUI_THREAD(mem_fun(*this, &Editor::update_smpte_mode));
+
+ RefPtr<Action> act;
+ const char* action = 0;
+
+ float frames = Config->get_smpte_frames_per_second();
+ bool drop = Config->get_smpte_drop_frames();
+
+ if ((frames < 23.976 * 1.0005) && !drop)
+ action = X_("Smpte23976");
+ else if ((frames < 24 * 1.0005) && !drop)
+ action = X_("Smpte24");
+ else if ((frames < 24.976 * 1.0005) && !drop)
+ action = X_("Smpte24976");
+ else if ((frames < 25 * 1.0005) && !drop)
+ action = X_("Smpte25");
+ else if ((frames < 29.97 * 1.0005) && !drop)
+ action = X_("Smpte2997");
+ else if ((frames < 29.97 * 1.0005) && drop)
+ action = X_("Smpte2997drop");
+ else if ((frames < 30 * 1.0005) && !drop)
+ action = X_("Smpte30");
+ else if ((frames < 30 * 1.0005) && drop)
+ action = X_("Smpte30drop");
+ else if ((frames < 59.94 * 1.0005) && !drop)
+ action = X_("Smpte5994");
+ else if ((frames < 60 * 1.0005) && !drop)
+ action = X_("Smpte60");
+ else {
+ fatal << string_compose (_("programming error: Unexpected SMPTE value (%1, drop = %2) in update_smpte_mode. Menu is probably wrong."),
+ frames, drop) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ act = ActionManager::get_action (X_("Editor"), action);
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
+ }
+}
+
+void
+Editor::update_video_pullup ()
+{
+ ENSURE_GUI_THREAD (mem_fun(*this, &Editor::update_video_pullup));
+
+ RefPtr<Action> act;
+ const char* action = 0;
+
+ float pullup = Config->get_video_pullup();
+
+ if ( pullup < (-4.1667 - 0.1) * 0.99) {
+ action = X_("PullupMinus4Minus1");
+ } else if ( pullup < (-4.1667) * 0.99 ) {
+ action = X_("PullupMinus4");
+ } else if ( pullup < (-4.1667 + 0.1) * 0.99 ) {
+ action = X_("PullupMinus4Plus1");
+ } else if ( pullup < (-0.1) * 0.99 ) {
+ action = X_("PullupMinus1");
+ } else if (pullup > (4.1667 + 0.1) * 0.99 ) {
+ action = X_("PullupPlus4Plus1");
+ } else if ( pullup > (4.1667) * 0.99 ) {
+ action = X_("PullupPlus4");
+ } else if ( pullup > (4.1667 - 0.1) * 0.99) {
+ action = X_("PullupPlus4Minus1");
+ } else if ( pullup > (0.1) * 0.99 ) {
+ action = X_("PullupPlus1");
+ } else {
+ action = X_("PullupNone");
+ }
+
+ act = ActionManager::get_action (X_("Editor"), action);
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
}
}
void
-Editor::set_layer_model (Session::LayerModel model)
+Editor::update_layering_model ()
+{
+ RefPtr<Action> act;
+
+ switch (Config->get_layer_model()) {
+ case LaterHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
+ break;
+ case MoveAddHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
+ break;
+ case AddHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
+ break;
+ }
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
+ }
+}
+
+void
+Editor::set_layer_model (LayerModel model)
{
/* this is driven by a toggle on a radio group, and so is invoked twice,
once for the item that became inactive and once for the one that became
RefPtr<Action> act;
- if (session) {
- switch (model) {
- case Session::LaterHigher:
- act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
- break;
- case Session::MoveAddHigher:
- act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
- break;
- case Session::AddHigher:
- act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
- break;
- }
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && ract->get_active()) {
- session->set_layer_model (model);
- }
+ switch (model) {
+ case LaterHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
+ break;
+ case MoveAddHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
+ break;
+ case AddHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
+ break;
+ }
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active() && Config->get_layer_model() != model) {
+ Config->set_layer_model (model);
}
}
}
active.
*/
- if (session) {
-
- RefPtr<Action> act;
-
- float pull = 0.0;
+ const char* action = 0;
- switch (pullup) {
- case Session::pullup_Plus4Plus1:{
- pull = 4.1667 + 0.1;
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4Plus1"));
- } break;
- case Session::pullup_Plus4:{
- pull = 4.1667;
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4"));
- } break;
- case Session::pullup_Plus4Minus1:{
- pull = 4.1667 - 0.1;
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4Minus1"));
- } break;
- case Session::pullup_Plus1:{
- pull = 0.1;
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus1"));
- } break;
- case Session::pullup_None:{
- pull = 0.0;
- act = ActionManager::get_action (X_("Editor"), X_("PullupNone"));
- } break;
- case Session::pullup_Minus1:{
- pull = -0.1;
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus1"));
- } break;
- case Session::pullup_Minus4Plus1:{
- pull = -4.1667 + 0.1;
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4Plus1"));
- } break;
- case Session::pullup_Minus4:{
- pull = -4.1667;
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4"));
- } break;
- case Session::pullup_Minus4Minus1:{
- pull = -4.1667 - 0.1;
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4Minus1"));
- } break;
- default:
- cerr << "Session received unexpected pullup type" << endl;
+ RefPtr<Action> act;
+
+ float pull = 0.0;
+
+ switch (pullup) {
+ case Session::pullup_Plus4Plus1:
+ pull = 4.1667 + 0.1;
+ action = X_("PullupPlus4Plus1");
+ break;
+ case Session::pullup_Plus4:
+ pull = 4.1667;
+ action = X_("PullupPlus4");
+ break;
+ case Session::pullup_Plus4Minus1:
+ pull = 4.1667 - 0.1;
+ action = X_("PullupPlus4Minus1");
+ break;
+ case Session::pullup_Plus1:
+ pull = 0.1;
+ action = X_("PullupPlus1");
+ break;
+ case Session::pullup_None:
+ pull = 0.0;
+ action = X_("PullupNone");
+ break;
+ case Session::pullup_Minus1:
+ pull = -0.1;
+ action = X_("PullupMinus1");
+ break;
+ case Session::pullup_Minus4Plus1:
+ pull = -4.1667 + 0.1;
+ action = X_("PullupMinus4Plus1");
+ break;
+ case Session::pullup_Minus4:
+ pull = -4.1667;
+ action = X_("PullupMinus4");
+ break;
+ case Session::pullup_Minus4Minus1:
+ pull = -4.1667 - 0.1;
+ action = X_("PullupMinus4Minus1");
+ break;
+ default:
+ fatal << string_compose (_("programming error: %1"), "Session received unexpected pullup type") << endmsg;
+ /*NOTREACHED*/
+ }
+
+ act = ActionManager::get_action (X_("Editor"), action);
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active()) {
+ Config->set_video_pullup ( pull );
}
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && ract->get_active()) {
- session->set_video_pullup ( pull );
- }
- } else cerr << "Editor::video_pullup_chosen could not find action to match pullup." << endl;
+ } else {
+ error << string_compose (_("programming error: %1"), "Editor::video_pullup_chosen could not find action to match pullup.") << endmsg;
}
}
+void
+Editor::toggle_auto_xfade ()
+{
+ ActionManager::toggle_config_state ("Editor", "toggle-auto-xfades", &Configuration::set_auto_xfade, &Configuration::get_auto_xfade);
+}
void
-Editor::set_crossfade_model (CrossfadeModel model)
+Editor::toggle_xfades_active ()
{
- RefPtr<Action> act;
+ ActionManager::toggle_config_state ("Editor", "toggle-xfades-active", &Configuration::set_crossfades_active, &Configuration::get_crossfades_active);
+}
- /* this is driven by a toggle on a radio group, and so is invoked twice,
- once for the item that became inactive and once for the one that became
- active.
- */
+void
+Editor::toggle_xfade_visibility ()
+{
+ ActionManager::toggle_config_state ("Editor", "toggle-xfades-visibility", &Configuration::set_crossfades_visible, &Configuration::get_crossfades_visible);
+}
- if (session) {
- switch (model) {
- case FullCrossfade:
- act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
- break;
- case ShortCrossfade:
- act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
- break;
- }
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && ract->get_active()) {
- session->set_xfade_model (model);
- }
- }
+void
+Editor::parameter_changed (const char* parameter_name)
+{
+#define PARAM_IS(x) (!strcmp (parameter_name, (x)))
+
+ ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::parameter_changed), parameter_name));
+
+ if (PARAM_IS ("auto-loop")) {
+ update_loop_range_view (true);
+ } else if (PARAM_IS ("punch-in")) {
+ update_punch_range_view (true);
+ } else if (PARAM_IS ("punch-out")) {
+ update_punch_range_view (true);
+ } else if (PARAM_IS ("layer-model")) {
+ update_layering_model ();
+ } else if (PARAM_IS ("smpte-frames-per-second") || PARAM_IS ("smpte-drop-frames")) {
+ update_smpte_mode ();
+ update_just_smpte ();
+ } else if (PARAM_IS ("video-pullup")) {
+ update_video_pullup ();
+ } else if (PARAM_IS ("crossfades-active")) {
+ ActionManager::map_some_state ("Editor", "toggle-xfades-active", &Configuration::get_crossfades_active);
+ } else if (PARAM_IS ("crossfades-visible")) {
+ ActionManager::map_some_state ("Editor", "toggle-xfades-visible", &Configuration::get_crossfades_visible);
+ } else if (PARAM_IS ("auto-xfade")) {
+ ActionManager::map_some_state ("Editor", "toggle-auto-xfades", &Configuration::get_auto_xfade);
+ } else if (PARAM_IS ("edit-mode")) {
+ edit_mode_selector.set_active_text (edit_mode_to_string (Config->get_edit_mode()));
}
+
+#undef PARAM_IS
}
void
Editor::add_external_audio_action (ImportMode mode)
{
- jack_nframes_t& pos = edit_cursor->current_frame;
+ nframes_t& pos = edit_cursor->current_frame;
AudioTrack* track = 0;
if (!selection->tracks.empty()) {
}
void
-Editor::bring_in_external_audio (ImportMode mode, AudioTrack* track, jack_nframes_t& pos, bool prompt)
+Editor::bring_in_external_audio (ImportMode mode, AudioTrack* track, nframes_t& pos, bool prompt)
{
if (session == 0) {
MessageDialog msg (0, _("You can't import or embed an audiofile until you have a session loaded."));
}
void
-Editor::do_import (vector<Glib::ustring> paths, bool split, ImportMode mode, AudioTrack* track, jack_nframes_t& pos, bool prompt)
+Editor::do_import (vector<Glib::ustring> paths, bool split, ImportMode mode, AudioTrack* track, nframes_t& pos, bool prompt)
{
/* SFDB sets "multichan" to true to indicate "split channels"
so reverse the setting to match the way libardour
}
void
-Editor::do_embed (vector<Glib::ustring> paths, bool split, ImportMode mode, AudioTrack* track, jack_nframes_t& pos, bool prompt)
+Editor::do_embed (vector<Glib::ustring> paths, bool split, ImportMode mode, AudioTrack* track, nframes_t& pos, bool prompt)
{
bool multiple_files = paths.size() > 1;
bool check_sample_rate = true;
}
int
-Editor::import_sndfile (Glib::ustring path, ImportMode mode, AudioTrack* track, jack_nframes_t& pos)
+Editor::import_sndfile (Glib::ustring path, ImportMode mode, AudioTrack* track, nframes_t& pos)
{
interthread_progress_window->set_title (string_compose (_("ardour: importing %1"), path));
interthread_progress_window->set_position (Gtk::WIN_POS_MOUSE);
int
Editor::embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool& check_sample_rate, ImportMode mode,
- AudioTrack* track, jack_nframes_t& pos, bool prompt)
+ AudioTrack* track, nframes_t& pos, bool prompt)
{
boost::shared_ptr<AudioFileSource> source;
SourceList sources;
input_chan = finfo.channels;
- if (session->get_output_auto_connect() & Session::AutoConnectMaster) {
+ if (Config->get_output_auto_connect() & AutoConnectMaster) {
output_chan = (session->master_out() ? session->master_out()->n_inputs().get(DataType::AUDIO) : input_chan);
} else {
output_chan = input_chan;
}
int
-Editor::finish_bringing_in_audio (boost::shared_ptr<AudioRegion> region, uint32_t in_chans, uint32_t out_chans, AudioTrack* track, jack_nframes_t& pos, ImportMode mode)
+Editor::finish_bringing_in_audio (boost::shared_ptr<AudioRegion> region, uint32_t in_chans, uint32_t out_chans, AudioTrack* track, nframes_t& pos, ImportMode mode)
{
switch (mode) {
case ImportAsRegion:
return;
}
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
Location* loc = transport_loop_location();
loc->set (start, end);
// enable looping, reposition and start rolling
- session->request_auto_loop (true);
+ session->request_play_loop (true);
session->request_locate (loc->start(), true);
}
using namespace Gtkmm2ext;
using namespace Editing;
-/* XXX this is a hack. it ought to be the maximum value of an jack_nframes_t */
+/* XXX this is a hack. it ought to be the maximum value of an nframes_t */
const double max_canvas_coordinate = (double) JACK_MAX_FRAMES;
canvas_width = alloc.get_width();
canvas_height = alloc.get_height();
- zoom_range_clock.set ((jack_nframes_t) floor ((canvas_width * frames_per_unit)));
+ zoom_range_clock.set ((nframes_t) floor ((canvas_width * frames_per_unit)));
edit_cursor->set_position (edit_cursor->current_frame);
playhead_cursor->set_position (playhead_cursor->current_frame);
vector<ustring> paths;
string spath;
GdkEvent ev;
- jack_nframes_t frame;
+ nframes_t frame;
if (convert_drop_to_paths (paths, context, x, y, data, info, time)) {
goto out;
/* drop onto canvas background: create new tracks */
- jack_nframes_t pos = 0;
+ nframes_t pos = 0;
do_embed (paths, false, ImportAsTrack, 0, pos, false);
} else if ((tv = dynamic_cast<RouteTimeAxisView*>(tvp)) != 0) {
const SelectionData& data,
guint info, guint time)
{
- const DnDTreeView::SerializedObjectPointers* sr = reinterpret_cast<const DnDTreeView::SerializedObjectPointers*> (data.get_data());
+ const SerializedObjectPointers<boost::shared_ptr<Region> >* sr =
+ reinterpret_cast<const SerializedObjectPointers<boost::shared_ptr<Region> > *> (data.get_data());
for (uint32_t i = 0; i < sr->cnt; ++i) {
- boost::shared_ptr<Region> r (reinterpret_cast<Region*> (sr->ptr[i]));
+ boost::shared_ptr<Region> r = sr->data[i];
insert_region_list_drag (r, x, y);
}
void
Editor::maybe_autoscroll (GdkEvent* event)
{
- jack_nframes_t rightmost_frame = leftmost_frame + current_page_frames();
- jack_nframes_t frame = drag_info.current_pointer_frame;
+ nframes_t rightmost_frame = leftmost_frame + current_page_frames();
+ nframes_t frame = drag_info.current_pointer_frame;
bool startit = false;
static int last_autoscroll_direction = 0;
bool
Editor::autoscroll_canvas ()
{
- jack_nframes_t new_frame;
- jack_nframes_t limit = max_frames - current_page_frames();
+ nframes_t new_frame;
+ nframes_t limit = max_frames - current_page_frames();
GdkEventMotion ev;
- jack_nframes_t target_frame;
+ nframes_t target_frame;
if (autoscroll_direction < 0) {
if (leftmost_frame < autoscroll_distance) {
/* after about a while, speed up a bit by changing the timeout interval */
- autoscroll_distance = (jack_nframes_t) floor (current_page_frames()/30.0f);
+ autoscroll_distance = (nframes_t) floor (current_page_frames()/30.0f);
} else if (autoscroll_cnt == 150) { /* 1.0 seconds */
- autoscroll_distance = (jack_nframes_t) floor (current_page_frames()/20.0f);
+ autoscroll_distance = (nframes_t) floor (current_page_frames()/20.0f);
} else if (autoscroll_cnt == 300) { /* 1.5 seconds */
/* after about another while, speed up by increasing the shift per callback */
- autoscroll_distance = (jack_nframes_t) floor (current_page_frames()/10.0f);
+ autoscroll_distance = (nframes_t) floor (current_page_frames()/10.0f);
}
void
Editor::start_canvas_autoscroll (int dir)
{
- if (!session) {
+ if (!session || autoscroll_active) {
return;
}
stop_canvas_autoscroll ();
+ autoscroll_active = true;
autoscroll_direction = dir;
- autoscroll_distance = (jack_nframes_t) floor (current_page_frames()/100.0);
+ autoscroll_distance = (nframes_t) floor (current_page_frames()/50.0);
autoscroll_cnt = 0;
/* do it right now, which will start the repeated callbacks */
g_source_remove (autoscroll_timeout_tag);
autoscroll_timeout_tag = -1;
}
+
+ autoscroll_active = false;
}
gint
event.button.x = wx;
event.button.y = wy;
- jack_nframes_t where = event_frame (&event, 0, 0);
+ nframes_t where = event_frame (&event, 0, 0);
temporal_zoom_to_frame (true, where);
return true;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
event.button.x = wx;
event.button.y = wy;
- jack_nframes_t where = event_frame (&event, 0, 0);
+ nframes_t where = event_frame (&event, 0, 0);
temporal_zoom_to_frame (false, where);
return true;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
}
void
-Editor::Cursor::set_position (jack_nframes_t frame)
+Editor::Cursor::set_position (nframes_t frame)
{
double new_pos = editor.frame_to_unit (frame);
Editor::export_session()
{
if (session) {
- export_range (0, session->current_end_frame());
+ export_range (session->current_start_frame(), session->current_end_frame());
}
}
}
void
-Editor::export_range (jack_nframes_t start, jack_nframes_t end)
+Editor::export_range (nframes_t start, nframes_t end)
{
if (session) {
if (export_dialog == 0) {
Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
{
boost::shared_ptr<AudioFileSource> fs;
- const jack_nframes_t chunk_size = 4096;
- jack_nframes_t to_read;
+ const nframes_t chunk_size = 4096;
+ nframes_t to_read;
Sample buf[chunk_size];
gain_t gain_buffer[chunk_size];
- jack_nframes_t pos;
+ nframes_t pos;
char s[PATH_MAX+1];
uint32_t cnt;
vector<boost::shared_ptr<AudioFileSource> > sources;
pos = region->position();
while (to_read) {
- jack_nframes_t this_time;
+ nframes_t this_time;
this_time = min (to_read, chunk_size);
Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list<AudioRange>& range)
{
boost::shared_ptr<AudioFileSource> fs;
- const jack_nframes_t chunk_size = 4096;
- jack_nframes_t nframes;
+ const nframes_t chunk_size = 4096;
+ nframes_t nframes;
Sample buf[chunk_size];
gain_t gain_buffer[chunk_size];
- jack_nframes_t pos;
+ nframes_t pos;
char s[PATH_MAX+1];
uint32_t cnt;
string path;
pos = (*i).start;
while (nframes) {
- jack_nframes_t this_time;
+ nframes_t this_time;
this_time = min (nframes, chunk_size);
while (nframes) {
- jack_nframes_t this_time = min (nframes, chunk_size);
+ nframes_t this_time = min (nframes, chunk_size);
memset (buf, 0, sizeof (Sample) * this_time);
for (uint32_t n=0; n < channels; ++n) {
Editor::scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item)
{
// GTK2FIX
- //jack_nframes_t offset = static_cast<jack_nframes_t>(frames_per_unit * (edit_hscroll_slider_width/2)) ;
- jack_nframes_t offset = 0;
+ //nframes_t offset = static_cast<nframes_t>(frames_per_unit * (edit_hscroll_slider_width/2)) ;
+ nframes_t offset = 0;
- jack_nframes_t x_pos = 0 ;
+ nframes_t x_pos = 0 ;
if(item->get_position() < offset)
{
x_pos = 0 ;
double cx, cy ;
MarkerView* mv = reinterpret_cast<MarkerView*>(drag_info.data) ;
- jack_nframes_t pending_region_position ;
- jack_nframes_t pointer_frame ;
+ nframes_t pending_region_position ;
+ nframes_t pointer_frame ;
pointer_frame = event_frame(event, &cx, &cy) ;
snap_to(pointer_frame) ;
- if (pointer_frame > (jack_nframes_t) drag_info.pointer_frame_offset)
+ if (pointer_frame > (nframes_t) drag_info.pointer_frame_offset)
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*>(drag_info.data) ;
- jack_nframes_t pending_region_position;
- jack_nframes_t pointer_frame;
+ nframes_t pending_region_position;
+ nframes_t pointer_frame;
pointer_frame = event_frame(event, &cx, &cy) ;
snap_to(pointer_frame) ;
- if (pointer_frame > (jack_nframes_t) drag_info.pointer_frame_offset)
+ if (pointer_frame > (nframes_t) drag_info.pointer_frame_offset)
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
void
Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* event)
{
- jack_nframes_t where ;
+ nframes_t where ;
TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
bool item_x_movement = (drag_info.last_frame_position != tavi->get_position()) ;
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
- jack_nframes_t start = 0 ;
- jack_nframes_t end = 0 ;
- jack_nframes_t pointer_frame = event_frame(event) ;
+ nframes_t start = 0 ;
+ nframes_t end = 0 ;
+ nframes_t pointer_frame = event_frame(event) ;
// chekc th eposition of the item is not locked
if(!ifv->get_position_locked()) {
}
// are we getting bigger or smaller?
- jack_nframes_t new_dur_val = end - start ;
+ nframes_t new_dur_val = end - start ;
// start handle, so a smaller pointer frame increases our component size
if(pointer_frame <= drag_info.grab_frame)
}
else
{
- jack_nframes_t temp = ifv->get_position() + ifv->get_duration() ;
+ nframes_t temp = ifv->get_position() + ifv->get_duration() ;
- ifv->set_position((jack_nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
- ifv->set_duration((jack_nframes_t) drag_info.cumulative_x_drag, this) ;
+ ifv->set_position((nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
+ ifv->set_duration((nframes_t) drag_info.cumulative_x_drag, this) ;
}
}
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
- jack_nframes_t start = 0 ;
- jack_nframes_t end = 0 ;
- jack_nframes_t pointer_frame = event_frame(event) ;
- jack_nframes_t new_dur_val = 0 ;
+ nframes_t start = 0 ;
+ nframes_t end = 0 ;
+ nframes_t pointer_frame = event_frame(event) ;
+ nframes_t new_dur_val = 0 ;
snap_to(pointer_frame) ;
}
else
{
- jack_nframes_t new_duration = (jack_nframes_t)drag_info.cumulative_x_drag ;
+ nframes_t new_duration = (nframes_t)drag_info.cumulative_x_drag ;
if((new_duration <= ifv->get_max_duration()) && (new_duration >= ifv->get_min_duration()))
{
ifv->set_duration(new_duration, this) ;
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
- jack_nframes_t start = 0 ;
- jack_nframes_t end = 0 ;
- jack_nframes_t pointer_frame = event_frame(event) ;
+ nframes_t start = 0 ;
+ nframes_t end = 0 ;
+ nframes_t pointer_frame = event_frame(event) ;
// chekc th eposition of the item is not locked
if(!mv->get_position_locked())
}
// are we getting bigger or smaller?
- jack_nframes_t new_dur_val = end - start ;
+ nframes_t new_dur_val = end - start ;
if(pointer_frame <= drag_info.grab_frame)
{
}
else
{
- jack_nframes_t temp = mv->get_position() + mv->get_duration() ;
+ nframes_t temp = mv->get_position() + mv->get_duration() ;
- mv->set_position((jack_nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
- mv->set_duration((jack_nframes_t) drag_info.cumulative_x_drag, this) ;
+ mv->set_position((nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
+ mv->set_duration((nframes_t) drag_info.cumulative_x_drag, this) ;
}
}
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
- jack_nframes_t start = 0 ;
- jack_nframes_t end = 0 ;
- jack_nframes_t pointer_frame = event_frame(event) ;
- jack_nframes_t new_dur_val = 0 ;
+ nframes_t start = 0 ;
+ nframes_t end = 0 ;
+ nframes_t pointer_frame = event_frame(event) ;
+ nframes_t new_dur_val = 0 ;
snap_to(pointer_frame) ;
{
// we cant extend beyond the item we are marking
ImageFrameView* marked_item = mv->get_marked_item() ;
- jack_nframes_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
+ nframes_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
if(mv->get_max_duration_active() && (new_dur_val > mv->get_max_duration()))
{
}
else
{
- jack_nframes_t new_duration = (jack_nframes_t)drag_info.cumulative_x_drag ;
+ nframes_t new_duration = (nframes_t)drag_info.cumulative_x_drag ;
mv->set_duration(new_duration, this) ;
}
}
void
Editor::kbd_do_split (GdkEvent* ev)
{
- jack_nframes_t where = event_frame (ev);
+ nframes_t where = event_frame (ev);
if (entered_regionview) {
if (selection->regions.find (entered_regionview) != selection->regions.end()) {
void
Editor::kbd_do_set_sync_position (GdkEvent* ev)
{
- jack_nframes_t where = event_frame (ev);
+ nframes_t where = event_frame (ev);
snap_to (where);
if (entered_regionview) {
}
void
-Editor::LocationMarkers::set_position (jack_nframes_t startf,
- jack_nframes_t endf)
+Editor::LocationMarkers::set_position (nframes_t startf,
+ nframes_t endf)
{
start->set_position (startf);
if (end) { end->set_position (endf); }
}
void
-Editor::mouse_add_new_marker (jack_nframes_t where)
+Editor::mouse_add_new_marker (nframes_t where)
{
if (session) {
Location *location = new Location (where, where, "mark", Location::IsMark);
l2->set (l->start(), l->end());
// enable looping, reposition and start rolling
- session->request_auto_loop(true);
+ session->request_play_loop(true);
session->request_locate (l2->start(), true);
}
}
Location* tll;
- if (session->get_auto_loop() && ((tll = transport_loop_location()) != 0)) {
+ if (Config->get_auto_loop() && ((tll = transport_loop_location()) != 0)) {
double x1 = frame_to_pixel (tll->start());
double x2 = frame_to_pixel (tll->end());
Location* tpl;
- if ((session->get_punch_in() || session->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
+ if ((Config->get_punch_in() || Config->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
double x1 = frame_to_pixel (tpl->start());
double x2 = frame_to_pixel (tpl->end());
{
if (session && engine.running()) {
- jack_nframes_t frame;
+ nframes_t frame;
frame = session->audible_frame();
using namespace Gtk;
using namespace Editing;
-jack_nframes_t
+nframes_t
Editor::event_frame (GdkEvent* event, double* pcx, double* pcy)
{
double cx, cy;
bool
Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{
- jack_nframes_t where = event_frame (event, 0, 0);
+ nframes_t where = event_frame (event, 0, 0);
track_canvas.grab_focus();
bool
Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{
- jack_nframes_t where = event_frame (event, 0, 0);
+ nframes_t where = event_frame (event, 0, 0);
/* no action if we're recording */
void
Editor::set_edit_cursor (GdkEvent* event)
{
- jack_nframes_t pointer_frame = event_frame (event);
+ nframes_t pointer_frame = event_frame (event);
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
if (snap_type != SnapToEditCursor) {
void
Editor::set_playhead_cursor (GdkEvent* event)
{
- jack_nframes_t pointer_frame = event_frame (event);
+ nframes_t pointer_frame = event_frame (event);
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
snap_to (pointer_frame);
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
- drag_info.pointer_frame_offset = drag_info.grab_frame - ((jack_nframes_t) arv->audio_region()->fade_in().back()->when + arv->region()->position());
+ drag_info.pointer_frame_offset = drag_info.grab_frame - ((nframes_t) arv->audio_region()->fade_in().back()->when + arv->region()->position());
}
void
Editor::fade_in_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
- jack_nframes_t pos;
- jack_nframes_t fade_length;
+ nframes_t pos;
+ nframes_t fade_length;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
pos = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
if (drag_info.first_move) return;
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
- jack_nframes_t pos;
- jack_nframes_t fade_length;
+ nframes_t pos;
+ nframes_t fade_length;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
pos = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
- drag_info.pointer_frame_offset = drag_info.grab_frame - (arv->region()->length() - (jack_nframes_t) arv->audio_region()->fade_out().back()->when + arv->region()->position());
+ drag_info.pointer_frame_offset = drag_info.grab_frame - (arv->region()->length() - (nframes_t) arv->audio_region()->fade_out().back()->when + arv->region()->position());
}
void
Editor::fade_out_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
- jack_nframes_t pos;
- jack_nframes_t fade_length;
+ nframes_t pos;
+ nframes_t fade_length;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
pos = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
if (drag_info.first_move) return;
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
- jack_nframes_t pos;
- jack_nframes_t fade_length;
+ nframes_t pos;
+ nframes_t fade_length;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
pos = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
Editor::cursor_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
Cursor* cursor = (Cursor *) drag_info.data;
- jack_nframes_t adjusted_frame;
+ nframes_t adjusted_frame;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
adjusted_frame = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
void
Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
- jack_nframes_t f_delta;
+ nframes_t f_delta;
Marker* marker = (Marker *) drag_info.data;
Location *real_location;
Location *copy_location;
bool move_both = false;
- jack_nframes_t newframe;
+ nframes_t newframe;
if (drag_info.pointer_frame_offset <= (long) drag_info.current_pointer_frame) {
newframe = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
}
newframe = 0;
}
- jack_nframes_t next = newframe;
+ nframes_t next = newframe;
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
snap_to (newframe, 0, true);
Editor::meter_marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
MeterMarker* marker = (MeterMarker *) drag_info.data;
- jack_nframes_t adjusted_frame;
+ nframes_t adjusted_frame;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
adjusted_frame = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
Editor::tempo_marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
TempoMarker* marker = (TempoMarker *) drag_info.data;
- jack_nframes_t adjusted_frame;
+ nframes_t adjusted_frame;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
adjusted_frame = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
cy = min ((double) cp->line.height(), cy);
//translate cx to frames
- jack_nframes_t cx_frames = unit_to_frame (cx);
+ nframes_t cx_frames = unit_to_frame (cx);
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier()) && !drag_info.x_constrained) {
snap_to (cx_frames);
{
double cx;
double cy;
- jack_nframes_t frame_within_region;
+ nframes_t frame_within_region;
/* need to get x coordinate in terms of parent (TimeAxisItemView)
origin.
cx = event->button.x;
cy = event->button.y;
line->parent_group().w2i (cx, cy);
- frame_within_region = (jack_nframes_t) floor (cx * frames_per_unit);
+ frame_within_region = (nframes_t) floor (cx * frames_per_unit);
if (!line->control_points_adjacent (frame_within_region, current_line_drag_info.before,
current_line_drag_info.after)) {
speed = tv->get_diskstream()->speed();
}
- drag_info.last_frame_position = (jack_nframes_t) (clicked_regionview->region()->position() / speed);
+ drag_info.last_frame_position = (nframes_t) (clicked_regionview->region()->position() / speed);
drag_info.pointer_frame_offset = drag_info.grab_frame - drag_info.last_frame_position;
drag_info.last_trackview = &clicked_regionview->get_time_axis_view();
// we want a move threshold
}
drag_info.last_trackview = &clicked_regionview->get_time_axis_view();
- drag_info.last_frame_position = (jack_nframes_t) (clicked_regionview->region()->position() / speed);
+ drag_info.last_frame_position = (nframes_t) (clicked_regionview->region()->position() / speed);
drag_info.pointer_frame_offset = drag_info.grab_frame - drag_info.last_frame_position;
// we want a move threshold
drag_info.want_move_threshold = true;
speed = tv->get_diskstream()->speed();
}
- drag_info.last_frame_position = (jack_nframes_t) (clicked_regionview->region()->position() / speed);
+ drag_info.last_frame_position = (nframes_t) (clicked_regionview->region()->position() / speed);
drag_info.pointer_frame_offset = drag_info.grab_frame - drag_info.last_frame_position;
drag_info.last_trackview = &clicked_regionview->get_time_axis_view();
// we want a move threshold
double x_delta;
double y_delta = 0;
RegionView* rv = reinterpret_cast<RegionView*> (drag_info.data);
- jack_nframes_t pending_region_position = 0;
+ nframes_t pending_region_position = 0;
int32_t pointer_y_span = 0, canvas_pointer_y_span = 0, original_pointer_order;
int32_t visible_y_high = 0, visible_y_low = 512; //high meaning higher numbered.. not the height on the screen
bool clamp_y_axis = false;
newregion->set_locked (false);
- to_playlist->add_region (newregion, (jack_nframes_t) (rv->region()->position() * rtv->get_diskstream()->speed()));
+ to_playlist->add_region (newregion, (nframes_t) (rv->region()->position() * rtv->get_diskstream()->speed()));
c.disconnect ();
if ((int32_t)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
- jack_nframes_t sync_frame;
- jack_nframes_t sync_offset;
+ nframes_t sync_frame;
+ nframes_t sync_offset;
int32_t sync_dir;
pending_region_position = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
void
Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
- jack_nframes_t where;
+ nframes_t where;
RegionView* rv = reinterpret_cast<RegionView *> (drag_info.data);
pair<set<Playlist*>::iterator,bool> insert_result;
bool nocommit = true;
speed = atv->get_diskstream()->speed();
}
- regionview_x_movement = (drag_info.last_frame_position != (jack_nframes_t) (rv->region()->position()/speed));
+ regionview_x_movement = (drag_info.last_frame_position != (nframes_t) (rv->region()->position()/speed));
regionview_y_movement = (drag_info.last_trackview != &rv->get_time_axis_view());
//printf ("last_frame: %s position is %lu %g\n", rv->get_time_axis_view().name().c_str(), drag_info.last_frame_position, speed);
latest_regionview = 0;
- where = (jack_nframes_t) (unit_to_frame (ix1) * speed);
+ where = (nframes_t) (unit_to_frame (ix1) * speed);
boost::shared_ptr<Region> new_region (RegionFactory::create ((*i)->region()));
from_playlist->remove_region (((*i)->region()));
rv->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
rv->get_canvas_group()->i2w (ix1, iy1);
- where = (jack_nframes_t) (unit_to_frame (ix1) * ownspeed);
+ where = (nframes_t) (unit_to_frame (ix1) * ownspeed);
} else {
if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Alt))) {
- align_region (rv.region(), SyncPoint, (jack_nframes_t) (edit_cursor->current_frame * speed));
+ align_region (rv.region(), SyncPoint, (nframes_t) (edit_cursor->current_frame * speed));
} else if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Shift))) {
- align_region (rv.region(), End, (jack_nframes_t) (edit_cursor->current_frame * speed));
+ align_region (rv.region(), End, (nframes_t) (edit_cursor->current_frame * speed));
} else {
- align_region (rv.region(), Start, (jack_nframes_t) (edit_cursor->current_frame * speed));
+ align_region (rv.region(), Start, (nframes_t) (edit_cursor->current_frame * speed));
}
}
}
void
-Editor::show_verbose_time_cursor (jack_nframes_t frame, double offset, double xpos, double ypos)
+Editor::show_verbose_time_cursor (nframes_t frame, double offset, double xpos, double ypos)
{
char buf[128];
SMPTE::Time smpte;
case AudioClock::MinSec:
/* XXX fix this to compute min/sec properly */
session->smpte_time (frame, smpte);
- secs = smpte.seconds + ((float) smpte.frames / session->smpte_frames_per_second);
+ secs = smpte.seconds + ((float) smpte.frames / Config->get_smpte_frames_per_second());
snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%.4f", smpte.hours, smpte.minutes, secs);
break;
}
void
-Editor::show_verbose_duration_cursor (jack_nframes_t start, jack_nframes_t end, double offset, double xpos, double ypos)
+Editor::show_verbose_duration_cursor (nframes_t start, nframes_t end, double offset, double xpos, double ypos)
{
char buf[128];
SMPTE::Time smpte;
case AudioClock::MinSec:
/* XXX fix this to compute min/sec properly */
session->smpte_duration (end - start, smpte);
- secs = smpte.seconds + ((float) smpte.frames / session->smpte_frames_per_second);
+ secs = smpte.seconds + ((float) smpte.frames / Config->get_smpte_frames_per_second());
snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%.4f", smpte.hours, smpte.minutes, secs);
break;
void
Editor::start_selection_op (ArdourCanvas::Item* item, GdkEvent* event, SelectionOp op)
{
- jack_nframes_t start = 0;
- jack_nframes_t end = 0;
+ nframes_t start = 0;
+ nframes_t end = 0;
if (session == 0) {
return;
void
Editor::drag_selection (ArdourCanvas::Item* item, GdkEvent* event)
{
- jack_nframes_t start = 0;
- jack_nframes_t end = 0;
- jack_nframes_t length;
- jack_nframes_t pending_position;
+ nframes_t start = 0;
+ nframes_t end = 0;
+ nframes_t length;
+ nframes_t pending_position;
if ((int32_t) drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
pending_position = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
speed = tv->get_diskstream()->speed();
}
- jack_nframes_t region_start = (jack_nframes_t) (clicked_regionview->region()->position() / speed);
- jack_nframes_t region_end = (jack_nframes_t) (clicked_regionview->region()->last_frame() / speed);
- jack_nframes_t region_length = (jack_nframes_t) (clicked_regionview->region()->length() / speed);
+ nframes_t region_start = (nframes_t) (clicked_regionview->region()->position() / speed);
+ nframes_t region_end = (nframes_t) (clicked_regionview->region()->last_frame() / speed);
+ nframes_t region_length = (nframes_t) (clicked_regionview->region()->length() / speed);
motion_frozen_playlists.clear();
Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
RegionView* rv = clicked_regionview;
- jack_nframes_t frame_delta = 0;
+ nframes_t frame_delta = 0;
bool left_direction;
bool obey_snap = !Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier());
}
case EndTrim:
- if ((left_direction == true) && (drag_info.current_pointer_frame > (jack_nframes_t) (rv->region()->last_frame()/speed))) {
+ if ((left_direction == true) && (drag_info.current_pointer_frame > (nframes_t) (rv->region()->last_frame()/speed))) {
break;
} else {
for (list<RegionView*>::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ++i) {
switch (trim_op) {
case StartTrim:
- show_verbose_time_cursor((jack_nframes_t) (rv->region()->position()/speed), 10);
+ show_verbose_time_cursor((nframes_t) (rv->region()->position()/speed), 10);
break;
case EndTrim:
- show_verbose_time_cursor((jack_nframes_t) (rv->region()->last_frame()/speed), 10);
+ show_verbose_time_cursor((nframes_t) (rv->region()->last_frame()/speed), 10);
break;
case ContentsTrim:
show_verbose_time_cursor(drag_info.current_pointer_frame, 10);
}
void
-Editor::single_contents_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_direction, bool swap_direction, bool obey_snap)
+Editor::single_contents_trim (RegionView& rv, nframes_t frame_delta, bool left_direction, bool swap_direction, bool obey_snap)
{
boost::shared_ptr<Region> region (rv.region());
return;
}
- jack_nframes_t new_bound;
+ nframes_t new_bound;
double speed = 1.0;
TimeAxisView* tvp = clicked_axisview;
if (left_direction) {
if (swap_direction) {
- new_bound = (jack_nframes_t) (region->position()/speed) + frame_delta;
+ new_bound = (nframes_t) (region->position()/speed) + frame_delta;
} else {
- new_bound = (jack_nframes_t) (region->position()/speed) - frame_delta;
+ new_bound = (nframes_t) (region->position()/speed) - frame_delta;
}
} else {
if (swap_direction) {
- new_bound = (jack_nframes_t) (region->position()/speed) - frame_delta;
+ new_bound = (nframes_t) (region->position()/speed) - frame_delta;
} else {
- new_bound = (jack_nframes_t) (region->position()/speed) + frame_delta;
+ new_bound = (nframes_t) (region->position()/speed) + frame_delta;
}
}
if (obey_snap) {
snap_to (new_bound);
}
- region->trim_start ((jack_nframes_t) (new_bound * speed), this);
+ region->trim_start ((nframes_t) (new_bound * speed), this);
rv.region_changed (StartChanged);
}
void
-Editor::single_start_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_direction, bool obey_snap)
+Editor::single_start_trim (RegionView& rv, nframes_t frame_delta, bool left_direction, bool obey_snap)
{
boost::shared_ptr<Region> region (rv.region());
return;
}
- jack_nframes_t new_bound;
+ nframes_t new_bound;
double speed = 1.0;
TimeAxisView* tvp = clicked_axisview;
}
if (left_direction) {
- new_bound = (jack_nframes_t) (region->position()/speed) - frame_delta;
+ new_bound = (nframes_t) (region->position()/speed) - frame_delta;
} else {
- new_bound = (jack_nframes_t) (region->position()/speed) + frame_delta;
+ new_bound = (nframes_t) (region->position()/speed) + frame_delta;
}
if (obey_snap) {
snap_to (new_bound, (left_direction ? 0 : 1));
}
- region->trim_front ((jack_nframes_t) (new_bound * speed), this);
+ region->trim_front ((nframes_t) (new_bound * speed), this);
rv.region_changed (Change (LengthChanged|PositionChanged|StartChanged));
}
void
-Editor::single_end_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_direction, bool obey_snap)
+Editor::single_end_trim (RegionView& rv, nframes_t frame_delta, bool left_direction, bool obey_snap)
{
boost::shared_ptr<Region> region (rv.region());
return;
}
- jack_nframes_t new_bound;
+ nframes_t new_bound;
double speed = 1.0;
TimeAxisView* tvp = clicked_axisview;
}
if (left_direction) {
- new_bound = (jack_nframes_t) ((region->last_frame() + 1)/speed) - frame_delta;
+ new_bound = (nframes_t) ((region->last_frame() + 1)/speed) - frame_delta;
} else {
- new_bound = (jack_nframes_t) ((region->last_frame() + 1)/speed) + frame_delta;
+ new_bound = (nframes_t) ((region->last_frame() + 1)/speed) + frame_delta;
}
if (obey_snap) {
snap_to (new_bound);
}
- region->trim_end ((jack_nframes_t) (new_bound * speed), this);
+ region->trim_end ((nframes_t) (new_bound * speed), this);
rv.region_changed (LengthChanged);
}
Editor::point_trim (GdkEvent* event)
{
RegionView* rv = clicked_regionview;
- jack_nframes_t new_bound = drag_info.current_pointer_frame;
+ nframes_t new_bound = drag_info.current_pointer_frame;
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
snap_to (new_bound);
void
Editor::drag_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
{
- jack_nframes_t start = 0;
- jack_nframes_t end = 0;
+ nframes_t start = 0;
+ nframes_t end = 0;
ArdourCanvas::SimpleRect *crect = (range_marker_op == CreateRangeMarker) ? range_bar_drag_rect: transport_bar_drag_rect;
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
if (Keyboard::no_modifier_keys_pressed (&event->button)) {
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
start = session->locations()->first_mark_before (drag_info.grab_frame);
end = session->locations()->first_mark_after (drag_info.grab_frame);
void
Editor::drag_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event)
{
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
snap_to (drag_info.current_pointer_frame);
}
void
-Editor::reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end)
+Editor::reposition_zoom_rect (nframes_t start, nframes_t end)
{
double x1 = frame_to_pixel (start);
double x2 = frame_to_pixel (end);
void
Editor::drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event)
{
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
double y1;
double y2;
return;
}
- jack_nframes_t newlen = drag_info.last_pointer_frame - clicked_regionview->region()->position();
+ nframes_t newlen = drag_info.last_pointer_frame - clicked_regionview->region()->position();
float percentage = (float) ((double) newlen - (double) clicked_regionview->region()->length()) / ((double) newlen) * 100.0f;
begin_reversible_command (_("timestretch"));
}
void
-Editor::mouse_brush_insert_region (RegionView* rv, jack_nframes_t pos)
+Editor::mouse_brush_insert_region (RegionView* rv, nframes_t pos)
{
/* no brushing without a useful snap setting */
double speed = atv->get_diskstream()->speed();
XMLNode &before = playlist->get_state();
- playlist->add_region (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (arv->audio_region())), (jack_nframes_t) (pos * speed));
+ playlist->add_region (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (arv->audio_region())), (nframes_t) (pos * speed));
XMLNode &after = playlist->get_state();
session->add_command(new MementoCommand<Playlist>(*playlist, &before, &after));
}
}
-void
-Editor::set_meter_hold (int32_t cnt)
-{
- Config->set_meter_hold_off(false);
- Config->set_meter_hold_short(false);
- Config->set_meter_hold_medium(false);
- Config->set_meter_hold_long(false);
-
- switch (cnt)
- {
- case 0:
- Config->set_meter_hold_off(true);
- break;
- case 40:
- Config->set_meter_hold_short(true);
- break;
- case 100:
- Config->set_meter_hold_medium(true);
- break;
- case 200:
- Config->set_meter_hold_long(true);
- break;
- }
-
- if (session) {
- session->set_meter_hold (cnt);
- }
-}
-
-void
-Editor::set_meter_falloff (int intval)
-{
- float val = 0.0f; /* off */
- std::string str;
-
- Config->set_meter_falloff_off(false);
- Config->set_meter_falloff_slowest(false);
- Config->set_meter_falloff_slow(false);
- Config->set_meter_falloff_medium(false);
- Config->set_meter_falloff_fast(false);
- Config->set_meter_falloff_faster(false);
- Config->set_meter_falloff_fastest(false);
-
- switch (intval)
- {
- case 0:
- val = 0.0f;
- Config->set_meter_falloff_off(true);
- break;
- case 1:
- val = 0.125f;
- Config->set_meter_falloff_slowest(true);
- break;
- case 2:
- val = 0.250f;
- Config->set_meter_falloff_slow(true);
- break;
- case 3:
- val = 0.375f;
- Config->set_meter_falloff_medium(true);
- break;
- case 4:
- val = 0.500f;
- Config->set_meter_falloff_fast(true);
- break;
- case 5:
- val = 0.750f;
- Config->set_meter_falloff_faster(true);
- break;
- case 6:
- val = 0.875f;
- Config->set_meter_falloff_fastest(true);
- break;
- }
-
- if (session) {
- session->set_meter_falloff (val);
- }
-}
-
-
int
-Editor::ensure_cursor (jack_nframes_t *pos)
+Editor::ensure_cursor (nframes_t *pos)
{
*pos = edit_cursor->current_frame;
return 0;
}
void
-Editor::split_region_at (jack_nframes_t where)
+Editor::split_region_at (nframes_t where)
{
split_regions_at (where, selection->regions);
}
void
-Editor::split_regions_at (jack_nframes_t where, RegionSelection& regions)
+Editor::split_regions_at (nframes_t where, RegionSelection& regions)
{
begin_reversible_command (_("split"));
{
RegionView* rv;
boost::shared_ptr<Region> region;
- jack_nframes_t start = 0;
+ nframes_t start = 0;
if (selection->time.start () == selection->time.end_frame ()) {
{
TimeAxisView *tv;
boost::shared_ptr<Region> region;
- jack_nframes_t start;
+ nframes_t start;
if ((region = select_region_for_operation (next ? 1 : 0, &tv)) == 0) {
return;
{
TimeAxisView *tv;
boost::shared_ptr<Region> region;
- jack_nframes_t end;
+ nframes_t end;
if ((region = select_region_for_operation (previous ? -1 : 0, &tv)) == 0) {
return;
void
Editor::nudge_forward (bool next)
{
- jack_nframes_t distance;
- jack_nframes_t next_distance;
+ nframes_t distance;
+ nframes_t next_distance;
if (!session) return;
void
Editor::nudge_backward (bool next)
{
- jack_nframes_t distance;
- jack_nframes_t next_distance;
+ nframes_t distance;
+ nframes_t next_distance;
if (!session) return;
void
Editor::nudge_forward_capture_offset ()
{
- jack_nframes_t distance;
+ nframes_t distance;
if (!session) return;
void
Editor::nudge_backward_capture_offset ()
{
- jack_nframes_t distance;
+ nframes_t distance;
if (!session) return;
void
Editor::build_region_boundary_cache ()
{
- jack_nframes_t pos = 0;
+ nframes_t pos = 0;
RegionPoint point;
boost::shared_ptr<Region> r;
TrackViewList tracks;
}
}
- jack_nframes_t rpos;
+ nframes_t rpos;
switch (snap_type) {
case SnapToRegionStart:
}
boost::shared_ptr<Region>
-Editor::find_next_region (jack_nframes_t frame, RegionPoint point, int32_t dir, TrackViewList& tracks, TimeAxisView **ontrack)
+Editor::find_next_region (nframes_t frame, RegionPoint point, int32_t dir, TrackViewList& tracks, TimeAxisView **ontrack)
{
TrackViewList::iterator i;
- jack_nframes_t closest = max_frames;
+ nframes_t closest = max_frames;
boost::shared_ptr<Region> ret;
- jack_nframes_t rpos = 0;
+ nframes_t rpos = 0;
float track_speed;
- jack_nframes_t track_frame;
+ nframes_t track_frame;
AudioTimeAxisView *atav;
for (i = tracks.begin(); i != tracks.end(); ++i) {
- jack_nframes_t distance;
+ nframes_t distance;
boost::shared_ptr<Region> r;
track_speed = 1.0f;
Editor::cursor_to_region_point (Cursor* cursor, RegionPoint point, int32_t dir)
{
boost::shared_ptr<Region> r;
- jack_nframes_t pos = cursor->current_frame;
+ nframes_t pos = cursor->current_frame;
if (!session) {
return;
void
Editor::cursor_to_selection_start (Cursor *cursor)
{
- jack_nframes_t pos = 0;
+ nframes_t pos = 0;
switch (mouse_mode) {
case MouseObject:
if (!selection->regions.empty()) {
void
Editor::cursor_to_selection_end (Cursor *cursor)
{
- jack_nframes_t pos = 0;
+ nframes_t pos = 0;
switch (mouse_mode) {
case MouseObject:
void
Editor::playhead_backward ()
{
- jack_nframes_t pos;
- jack_nframes_t cnt;
+ nframes_t pos;
+ nframes_t cnt;
float prefix;
bool was_floating;
cnt = 1;
} else {
if (was_floating) {
- cnt = (jack_nframes_t) floor (prefix * session->frame_rate ());
+ cnt = (nframes_t) floor (prefix * session->frame_rate ());
} else {
- cnt = (jack_nframes_t) prefix;
+ cnt = (nframes_t) prefix;
}
}
pos = playhead_cursor->current_frame;
- if ((jack_nframes_t) pos < cnt) {
+ if ((nframes_t) pos < cnt) {
pos = 0;
} else {
pos -= cnt;
void
Editor::playhead_forward ()
{
- jack_nframes_t pos;
- jack_nframes_t cnt;
+ nframes_t pos;
+ nframes_t cnt;
bool was_floating;
float prefix;
cnt = 1;
} else {
if (was_floating) {
- cnt = (jack_nframes_t) floor (prefix * session->frame_rate ());
+ cnt = (nframes_t) floor (prefix * session->frame_rate ());
} else {
- cnt = (jack_nframes_t) floor (prefix);
+ cnt = (nframes_t) floor (prefix);
}
}
void
Editor::edit_cursor_backward ()
{
- jack_nframes_t pos;
- jack_nframes_t cnt;
+ nframes_t pos;
+ nframes_t cnt;
float prefix;
bool was_floating;
cnt = 1;
} else {
if (was_floating) {
- cnt = (jack_nframes_t) floor (prefix * session->frame_rate ());
+ cnt = (nframes_t) floor (prefix * session->frame_rate ());
} else {
- cnt = (jack_nframes_t) prefix;
+ cnt = (nframes_t) prefix;
}
}
pos = edit_cursor->current_frame;
- if ((jack_nframes_t) pos < cnt) {
+ if ((nframes_t) pos < cnt) {
pos = 0;
} else {
pos -= cnt;
void
Editor::edit_cursor_forward ()
{
- jack_nframes_t pos;
- jack_nframes_t cnt;
+ nframes_t pos;
+ nframes_t cnt;
bool was_floating;
float prefix;
cnt = 1;
} else {
if (was_floating) {
- cnt = (jack_nframes_t) floor (prefix * session->frame_rate ());
+ cnt = (nframes_t) floor (prefix * session->frame_rate ());
} else {
- cnt = (jack_nframes_t) floor (prefix);
+ cnt = (nframes_t) floor (prefix);
}
}
{
float prefix;
bool was_floating;
- jack_nframes_t frame;
+ nframes_t frame;
if (get_prefix (prefix, was_floating)) {
return;
}
if (was_floating) {
- frame = (jack_nframes_t) floor (prefix * session->frame_rate());
+ frame = (nframes_t) floor (prefix * session->frame_rate());
} else {
- frame = (jack_nframes_t) floor (prefix);
+ frame = (nframes_t) floor (prefix);
}
session->request_locate (frame);
void
Editor::scroll_backward (float pages)
{
- jack_nframes_t frame;
- jack_nframes_t one_page = (jack_nframes_t) rint (canvas_width * frames_per_unit);
+ nframes_t frame;
+ nframes_t one_page = (nframes_t) rint (canvas_width * frames_per_unit);
bool was_floating;
float prefix;
- jack_nframes_t cnt;
+ nframes_t cnt;
if (get_prefix (prefix, was_floating)) {
- cnt = (jack_nframes_t) floor (pages * one_page);
+ cnt = (nframes_t) floor (pages * one_page);
} else {
if (was_floating) {
- cnt = (jack_nframes_t) floor (prefix * session->frame_rate());
+ cnt = (nframes_t) floor (prefix * session->frame_rate());
} else {
- cnt = (jack_nframes_t) floor (prefix * one_page);
+ cnt = (nframes_t) floor (prefix * one_page);
}
}
void
Editor::scroll_forward (float pages)
{
- jack_nframes_t frame;
- jack_nframes_t one_page = (jack_nframes_t) rint (canvas_width * frames_per_unit);
+ nframes_t frame;
+ nframes_t one_page = (nframes_t) rint (canvas_width * frames_per_unit);
bool was_floating;
float prefix;
- jack_nframes_t cnt;
+ nframes_t cnt;
if (get_prefix (prefix, was_floating)) {
- cnt = (jack_nframes_t) floor (pages * one_page);
+ cnt = (nframes_t) floor (pages * one_page);
} else {
if (was_floating) {
- cnt = (jack_nframes_t) floor (prefix * session->frame_rate());
+ cnt = (nframes_t) floor (prefix * session->frame_rate());
} else {
- cnt = (jack_nframes_t) floor (prefix * one_page);
+ cnt = (nframes_t) floor (prefix * one_page);
}
}
- if (ULONG_MAX - cnt < leftmost_frame) {
- frame = ULONG_MAX - cnt;
+ if (max_frames - cnt < leftmost_frame) {
+ frame = max_frames - cnt;
} else {
frame = leftmost_frame + cnt;
}
{
if (!session) return;
- jack_nframes_t current_page = current_page_frames();
- jack_nframes_t current_leftmost = leftmost_frame;
- jack_nframes_t current_rightmost;
- jack_nframes_t current_center;
- jack_nframes_t new_page;
- jack_nframes_t leftmost_after_zoom = 0;
+ nframes_t current_page = current_page_frames();
+ nframes_t current_leftmost = leftmost_frame;
+ nframes_t current_rightmost;
+ nframes_t current_center;
+ nframes_t new_page;
+ nframes_t leftmost_after_zoom = 0;
double nfpu;
nfpu = fpu;
- new_page = (jack_nframes_t) floor (canvas_width * nfpu);
+ new_page = (nframes_t) floor (canvas_width * nfpu);
switch (zoom_focus) {
case ZoomFocusLeft:
return;
}
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
temporal_zoom_by_frame (start, end, "zoom to selection");
}
}
void
-Editor::temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const string & op)
+Editor::temporal_zoom_by_frame (nframes_t start, nframes_t end, const string & op)
{
if (!session) return;
return;
}
- jack_nframes_t range = end - start;
+ nframes_t range = end - start;
double new_fpu = (double)range / (double)canvas_width;
// double p2 = 1.0;
// }
// new_fpu = p2;
- jack_nframes_t new_page = (jack_nframes_t) floor (canvas_width * new_fpu);
- jack_nframes_t middle = (jack_nframes_t) floor( (double)start + ((double)range / 2.0f ));
- jack_nframes_t new_leftmost = (jack_nframes_t) floor( (double)middle - ((double)new_page/2.0f));
+ nframes_t new_page = (nframes_t) floor (canvas_width * new_fpu);
+ nframes_t middle = (nframes_t) floor( (double)start + ((double)range / 2.0f ));
+ nframes_t new_leftmost = (nframes_t) floor( (double)middle - ((double)new_page/2.0f));
if (new_leftmost > middle) new_leftmost = 0;
}
void
-Editor::temporal_zoom_to_frame (bool coarser, jack_nframes_t frame)
+Editor::temporal_zoom_to_frame (bool coarser, nframes_t frame)
{
if (!session) return;
if (new_fpu == frames_per_unit) return;
- jack_nframes_t new_leftmost = frame - (jack_nframes_t)range_before;
+ nframes_t new_leftmost = frame - (nframes_t)range_before;
if (new_leftmost > frame) new_leftmost = 0;
return;
}
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
Location *location = new Location (start, end, "selection");
void
Editor::add_location_from_playhead_cursor ()
{
- jack_nframes_t where = session->audible_frame();
+ nframes_t where = session->audible_frame();
Location *location = new Location (where, where, "mark", Location::IsMark);
session->begin_reversible_command (_("add marker"));
}
bool
-Editor::select_all_within (jack_nframes_t start, jack_nframes_t end, double top, double bot, Selection::Operation op)
+Editor::select_all_within (nframes_t start, nframes_t end, double top, double bot, Selection::Operation op)
{
list<Selectable *> touched;
return;
}
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
if (end - start < 1) {
return;
void
Editor::select_all_selectables_using_cursor (Cursor *cursor, bool after)
{
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
list<Selectable *> touched;
if (after) {
void
Editor::select_all_selectables_between_cursors (Cursor *cursor, Cursor *other_cursor)
{
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
list<Selectable *> touched;
bool other_cursor_is_first = cursor->current_frame > other_cursor->current_frame;
void
Editor::set_mark ()
{
- jack_nframes_t pos;
+ nframes_t pos;
float prefix;
bool was_floating;
pos = session->audible_frame ();
} else {
if (was_floating) {
- pos = (jack_nframes_t) floor (prefix * session->frame_rate ());
+ pos = (nframes_t) floor (prefix * session->frame_rate ());
} else {
- pos = (jack_nframes_t) floor (prefix);
+ pos = (nframes_t) floor (prefix);
}
}
double wx, wy;
double cx, cy;
TimeAxisView *tv;
- jack_nframes_t where;
+ nframes_t where;
AudioTimeAxisView *atv = 0;
Playlist *playlist;
return;
}
- TreeModel::iterator i = region_list_display.get_selection()->get_selected();
- boost::shared_ptr<Region> region = (*i)[region_list_columns.region];
+ TreeView::Selection::ListHandle_Path rows = selected->get_selected_rows ();
- begin_reversible_command (_("insert region"));
- XMLNode &before = playlist->get_state();
- playlist->add_region ((RegionFactory::create (region)), edit_cursor->current_frame, times);
- session->add_command(new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
- commit_reversible_command ();
-}
+ /* only one row selected, so rows.begin() is it */
+
+ TreeIter iter;
+
+ if ((iter = region_list_model->get_iter (*rows.begin()))) {
+ boost::shared_ptr<Region> region = (*iter)[region_list_columns.region];
+
+ begin_reversible_command (_("insert region"));
+ XMLNode &before = playlist->get_state();
+ playlist->add_region ((RegionFactory::create (region)), edit_cursor->current_frame, times);
+ session->add_command(new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
+ commit_reversible_command ();
+ }
+}
/* BUILT-IN EFFECTS */
return;
}
- switch (session->slave_source()) {
- case Session::None:
- case Session::JACK:
+ switch (Config->get_slave_source()) {
+ case None:
+ case JACK:
break;
default:
/* transport controlled by the master */
if (session->transport_rolling()) {
session->request_stop (with_abort);
- if (session->get_auto_loop()) {
- session->request_auto_loop (false);
+ if (Config->get_auto_loop()) {
+ session->request_play_loop (false);
}
} else {
session->request_transport_speed (1.0f);
// enable looping, reposition and start rolling
- session->request_auto_loop (true);
+ session->request_play_loop (true);
session->request_locate (tll->start(), false);
session->request_transport_speed (1.0f);
}
tll->set (location.start(), location.end());
// enable looping, reposition and start rolling
- session->request_auto_loop (true);
+ session->request_play_loop (true);
session->request_locate (tll->start(), true);
}
}
return;
}
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
- jack_nframes_t selection_cnt = end - start + 1;
+ nframes_t selection_cnt = end - start + 1;
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
boost::shared_ptr<AudioRegion> current;
boost::shared_ptr<Region> current_r;
Playlist *pl;
- jack_nframes_t internal_start;
+ nframes_t internal_start;
string new_name;
if ((pl = (*i)->playlist()) == 0) {
return;
}
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
boost::shared_ptr<AudioRegion> current;
boost::shared_ptr<Region> current_r;
Playlist* playlist;
- jack_nframes_t internal_start;
+ nframes_t internal_start;
string new_name;
if ((playlist = (*i)->playlist()) == 0) {
double speed = atv->get_diskstream()->speed();
for (list<AudioRange>::iterator t = selection->time.begin(); t != selection->time.end(); ++t) {
- playlist->partition ((jack_nframes_t)((*t).start * speed), (jack_nframes_t)((*t).end * speed), true);
+ playlist->partition ((nframes_t)((*t).start * speed), (nframes_t)((*t).end * speed), true);
}
if (doing_undo)
double speed = atv->get_diskstream()->speed();
- playlist->partition ((jack_nframes_t)(loc.start() * speed), (jack_nframes_t)(loc.end() * speed), true);
+ playlist->partition ((nframes_t)(loc.start() * speed), (nframes_t)(loc.end() * speed), true);
if (doing_undo)
session->add_command(new MementoCommand<Playlist>(*playlist, before, &playlist->get_state()));
}
if (!playlists.empty()) {
- jack_nframes_t start;
- jack_nframes_t end;
- jack_nframes_t cnt;
+ nframes_t start;
+ nframes_t end;
+ nframes_t cnt;
begin_reversible_command (_("trim to selection"));
void
Editor::region_fill_track ()
{
- jack_nframes_t end;
+ nframes_t end;
if (!session || selection->regions.empty()) {
return;
TreeModel::iterator i = region_list_display.get_selection()->get_selected();
boost::shared_ptr<Region> region = (*i)[region_list_columns.region];
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
Playlist *playlist;
return;
}
- jack_nframes_t selection_length = end - start;
+ nframes_t selection_length = end - start;
float times = (float)selection_length / region->length();
begin_reversible_command (_("fill selection"));
}
void
-Editor::set_a_regions_sync_position (boost::shared_ptr<Region> region, jack_nframes_t position)
+Editor::set_a_regions_sync_position (boost::shared_ptr<Region> region, nframes_t position)
{
if (!region->covers (position)) {
};
void
-Editor::align_selection_relative (RegionPoint point, jack_nframes_t position)
+Editor::align_selection_relative (RegionPoint point, nframes_t position)
{
if (selection->regions.empty()) {
return;
}
- jack_nframes_t distance;
- jack_nframes_t pos = 0;
+ nframes_t distance;
+ nframes_t pos = 0;
int dir;
list<RegionView*> sorted;
}
void
-Editor::align_selection (RegionPoint point, jack_nframes_t position)
+Editor::align_selection (RegionPoint point, nframes_t position)
{
if (selection->regions.empty()) {
return;
}
void
-Editor::align_region (boost::shared_ptr<Region> region, RegionPoint point, jack_nframes_t position)
+Editor::align_region (boost::shared_ptr<Region> region, RegionPoint point, nframes_t position)
{
begin_reversible_command (_("align region"));
align_region_internal (region, point, position);
}
void
-Editor::align_region_internal (boost::shared_ptr<Region> region, RegionPoint point, jack_nframes_t position)
+Editor::align_region_internal (boost::shared_ptr<Region> region, RegionPoint point, nframes_t position)
{
XMLNode &before = region->playlist()->get_state();
TrackViewList *views = get_valid_views (selection->time.track, selection->time.group);
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
- jack_nframes_t cnt = end - start + 1;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
+ nframes_t cnt = end - start + 1;
begin_reversible_command (_("bounce range"));
{
typedef std::map<AudioPlaylist*,AudioPlaylist*> PlaylistMapping;
PlaylistMapping pmap;
- jack_nframes_t first_position = max_frames;
+ nframes_t first_position = max_frames;
set<Playlist*> freezelist;
pair<set<Playlist*>::iterator,bool> insert_result;
event.button.x = wx;
event.button.y = wy;
- jack_nframes_t where = event_frame (&event, 0, 0);
+ nframes_t where = event_frame (&event, 0, 0);
snap_to (where);
paste_internal (where, 1);
}
void
-Editor::paste_internal (jack_nframes_t position, float times)
+Editor::paste_internal (nframes_t position, float times)
{
bool commit = false;
Editor::nudge_track (bool use_edit_cursor, bool forwards)
{
Playlist *playlist;
- jack_nframes_t distance;
- jack_nframes_t next_distance;
- jack_nframes_t start;
+ nframes_t distance;
+ nframes_t next_distance;
+ nframes_t start;
if (use_edit_cursor) {
start = edit_cursor->current_frame;
}
void
-Editor::brush (jack_nframes_t pos)
+Editor::brush (nframes_t pos)
{
RegionSelection sel;
snap_to (pos);
for (list<boost::shared_ptr<Region> >::iterator r = tmp_region_list.begin(); r != tmp_region_list.end(); ++r) {
add_region_to_region_display (*r);
}
+ tmp_region_list.clear();
region_list_display.set_model (region_list_model);
}
vector<ustring> paths;
if (convert_drop_to_paths (paths, context, x, y, data, info, time) == 0) {
- jack_nframes_t pos = 0;
+ nframes_t pos = 0;
do_embed (paths, false, ImportAsRegion, 0, pos, true);
context->drag_finish (true, false, time);
}
hide_verbose_canvas_cursor();
stop_canvas_autoscroll();
- jack_nframes_t where = leftmost_frame + pixel_to_frame (x);
+ nframes_t where = leftmost_frame + pixel_to_frame (x);
switch (ev->button) {
case 1:
track_canvas.c2w (x, y, wcx, wcy);
track_canvas.w2c (wcx, wcy, cx, cy);
- jack_nframes_t where = leftmost_frame + pixel_to_frame (x);
+ nframes_t where = leftmost_frame + pixel_to_frame (x);
/// ripped from maybe_autoscroll
- jack_nframes_t one_page = (jack_nframes_t) rint (canvas_width * frames_per_unit);
- jack_nframes_t rightmost_frame = leftmost_frame + one_page;
+ nframes_t one_page = (nframes_t) rint (canvas_width * frames_per_unit);
+ nframes_t rightmost_frame = leftmost_frame + one_page;
jack_nframes_t frame = pixel_to_frame (cx);
void
-Editor::popup_ruler_menu (jack_nframes_t where, ItemType t)
+Editor::popup_ruler_menu (nframes_t where, ItemType t)
{
using namespace Menu_Helpers;
an uint32_t (or larger) to a float ... what to do ?
*/
- jack_nframes_t page = (jack_nframes_t) floor (canvas_width * frames_per_unit);
- jack_nframes_t rightmost_frame = leftmost_frame + page;
+ nframes_t page = (nframes_t) floor (canvas_width * frames_per_unit);
+ nframes_t rightmost_frame = leftmost_frame + page;
if (ruler_shown[ruler_metric_smpte]) {
gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_smpte_ruler), leftmost_frame, rightmost_frame,
void
Editor::update_fixed_rulers ()
{
- jack_nframes_t rightmost_frame;
+ nframes_t rightmost_frame;
if (session == 0) {
return;
an uint32_t (or larger) to a float ... what to do ?
*/
- jack_nframes_t page = (jack_nframes_t) floor (canvas_width * frames_per_unit);
+ nframes_t page = (nframes_t) floor (canvas_width * frames_per_unit);
ruler_metrics[ruler_metric_smpte].units_per_pixel = frames_per_unit;
ruler_metrics[ruler_metric_frames].units_per_pixel = frames_per_unit;
an uint32_t (or larger) to a float ... what to do ?
*/
- jack_nframes_t page = (jack_nframes_t) floor (canvas_width * frames_per_unit);
+ nframes_t page = (nframes_t) floor (canvas_width * frames_per_unit);
ruler_metrics[ruler_metric_bbt].units_per_pixel = frames_per_unit;
if (ruler_shown[ruler_metric_bbt]) {
gint
Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint maxchars)
{
- jack_nframes_t range;
- jack_nframes_t pos;
- jack_nframes_t spacer;
- jack_nframes_t fr;
+ nframes_t range;
+ nframes_t pos;
+ nframes_t spacer;
+ nframes_t fr;
SMPTE::Time smpte;
gchar buf[16];
gint nmarks = 0;
fr = session->frame_rate();
- if (lower > (spacer = (jack_nframes_t)(128 * Editor::get_current_zoom ()))) {
+ if (lower > (spacer = (nframes_t)(128 * Editor::get_current_zoom ()))) {
lower = lower - spacer;
} else {
lower = 0;
}
upper = upper + spacer;
- range = (jack_nframes_t) floor (upper - lower);
+ range = (nframes_t) floor (upper - lower);
if (range < (2 * session->frames_per_smpte_frame())) { /* 0 - 2 frames */
show_bits = true;
} else if (range <= (fr / 4)) { /* 2 frames - 0.250 second */
show_frames = true;
mark_modulo = 1;
- nmarks = 1 + (range / (jack_nframes_t)session->frames_per_smpte_frame());
+ nmarks = 1 + (range / (nframes_t)session->frames_per_smpte_frame());
} else if (range <= (fr / 2)) { /* 0.25-0.5 second */
show_frames = true;
mark_modulo = 2;
- nmarks = 1 + (range / (jack_nframes_t)session->frames_per_smpte_frame());
+ nmarks = 1 + (range / (nframes_t)session->frames_per_smpte_frame());
} else if (range <= fr) { /* 0.5-1 second */
show_frames = true;
mark_modulo = 5;
- nmarks = 1 + (range / (jack_nframes_t)session->frames_per_smpte_frame());
+ nmarks = 1 + (range / (nframes_t)session->frames_per_smpte_frame());
} else if (range <= 2 * fr) { /* 1-2 seconds */
show_frames = true;
mark_modulo = 10;
- nmarks = 1 + (range / (jack_nframes_t)session->frames_per_smpte_frame());
+ nmarks = 1 + (range / (nframes_t)session->frames_per_smpte_frame());
} else if (range <= 8 * fr) { /* 2-8 seconds */
show_seconds = true;
mark_modulo = 1;
nmarks = 1 + 24;
} else {
- /* not possible if jack_nframes_t is a 32 bit quantity */
+ /* not possible if nframes_t is a 32 bit quantity */
show_hours = true;
mark_modulo = 4;
nmarks = 1 + 24;
}
- pos = (jack_nframes_t) floor (lower);
+ pos = (nframes_t) floor (lower);
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * nmarks);
gint nmarks;
char buf[64];
gint n;
- jack_nframes_t pos;
+ nframes_t pos;
bool bar_helper_on = true;
BBT_Time next_beat;
- jack_nframes_t next_beat_pos;
- jack_nframes_t ilower = (jack_nframes_t) floor (lower);
+ nframes_t next_beat_pos;
+ nframes_t ilower = (nframes_t) floor (lower);
if ((desirable_marks = maxchars / 7) == 0) {
return 0;
uint32_t tick = 0;
uint32_t skip;
uint32_t t;
- jack_nframes_t frame_skip;
+ nframes_t frame_skip;
double frame_skip_error;
double accumulated_error;
double position_of_helper;
next_beat_pos = session->tempo_map().frame_time(next_beat);
- frame_skip = (jack_nframes_t) floor (frame_skip_error = (session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
+ frame_skip = (nframes_t) floor (frame_skip_error = (session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
frame_skip_error -= frame_skip;
skip = (uint32_t) (Meter::ticks_per_beat / bbt_beat_subdivision);
(*marks)[n].label = g_strdup (buf);
- /* Error compensation for float to jack_nframes_t*/
+ /* Error compensation for float to nframes_t*/
accumulated_error += frame_skip_error;
if (accumulated_error > 1) {
pos += 1;
gint
Editor::metric_get_frames (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint maxchars)
{
- jack_nframes_t mark_interval;
- jack_nframes_t pos;
- jack_nframes_t ilower = (jack_nframes_t) floor (lower);
- jack_nframes_t iupper = (jack_nframes_t) floor (upper);
+ nframes_t mark_interval;
+ nframes_t pos;
+ nframes_t ilower = (nframes_t) floor (lower);
+ nframes_t iupper = (nframes_t) floor (upper);
gchar buf[16];
gint nmarks;
gint n;
}
static void
-sample_to_clock_parts ( jack_nframes_t sample,
- jack_nframes_t sample_rate,
+sample_to_clock_parts ( nframes_t sample,
+ nframes_t sample_rate,
long *hrs_p,
long *mins_p,
long *secs_p,
long *millisecs_p)
{
- jack_nframes_t left;
+ nframes_t left;
long hrs;
long mins;
long secs;
gint
Editor::metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint maxchars)
{
- jack_nframes_t range;
- jack_nframes_t fr;
- jack_nframes_t mark_interval;
- jack_nframes_t pos;
- jack_nframes_t spacer;
+ nframes_t range;
+ nframes_t fr;
+ nframes_t mark_interval;
+ nframes_t pos;
+ nframes_t spacer;
long hrs, mins, secs, millisecs;
gchar buf[16];
gint nmarks;
bool show_seconds = false;
bool show_minutes = false;
bool show_hours = false;
- jack_nframes_t ilower = (jack_nframes_t) floor (lower);
- jack_nframes_t iupper = (jack_nframes_t) floor (upper);
+ nframes_t ilower = (nframes_t) floor (lower);
+ nframes_t iupper = (nframes_t) floor (upper);
if (session == 0) {
return 0;
fr = session->frame_rate();
/* to prevent 'flashing' */
- if (lower > (spacer = (jack_nframes_t)(128 * Editor::get_current_zoom ()))) {
+ if (lower > (spacer = (nframes_t)(128 * Editor::get_current_zoom ()))) {
lower = lower - spacer;
} else {
lower = 0;
mark_modulo = 2;
} else {
- /* not possible if jack_nframes_t is a 32 bit quantity */
+ /* not possible if nframes_t is a 32 bit quantity */
mark_interval = 4 * 60 * 60 * fr; /* show 4 hrs */
}
#include "rgb_macros.h"
#include "gui_thread.h"
#include "color.h"
+#include "time_axis_view.h"
#include "i18n.h"
}
track_canvas.get_scroll_region (x1, y1, x2, y2);
+ y2 = TimeAxisView::hLargest*5000; // five thousand largest tracks should be enough.. :)
/* get the first bar spacing */
beat_density = (beats * 10.0f) / track_canvas.get_width ();
- if (beat_density > 2.0f) {
- /* if the lines are too close together, they become useless */
+ if (beat_density > 4.0f) {
+ /* if the lines are too close together, they become useless
+ */
return;
}
} else {
color = color_map[cMeasureLineBar];
- /* only draw beat lines if the gaps between beats are large. */
-
- if (beat_density > 0.25) {
- break;
+ if (beat_density > 2.0) {
+ /* only draw beat lines if the gaps between beats are large.
+ */
+ break;
}
}
}
void
-Editor::mouse_add_new_tempo_event (jack_nframes_t frame)
+Editor::mouse_add_new_tempo_event (nframes_t frame)
{
if (session == 0) {
return;
}
void
-Editor::mouse_add_new_meter_event (jack_nframes_t frame)
+Editor::mouse_add_new_meter_event (nframes_t frame)
{
if (session == 0) {
return;
}
void
-ExportDialog::set_range (jack_nframes_t start, jack_nframes_t end)
+ExportDialog::set_range (nframes_t start, nframes_t end)
{
spec.start_frame = start;
spec.end_frame = end;
}
void
-frames_to_cd_frames_string (char* buf, jack_nframes_t when, jack_nframes_t fr)
+frames_to_cd_frames_string (char* buf, nframes_t when, nframes_t fr)
{
long unsigned int remainder;
ExportDialog::sample_rate_chosen ()
{
string sr_str = sample_rate_combo.get_active_text();
- jack_nframes_t rate;
+ nframes_t rate;
if (sr_str == N_("22.05kHz")) {
rate = 22050;
~ExportDialog ();
void connect_to_session (ARDOUR::Session*);
- virtual void set_range (jack_nframes_t start, jack_nframes_t end);
+ virtual void set_range (nframes_t start, nframes_t end);
void start_export ();
protected:
// flush vector
range_markers_durations_aggregated.resize(0);
- jack_nframes_t duration_before_current_location = 0;
+ nframes_t duration_before_current_location = 0;
Locations::LocationList::iterator locationIter;
for (locationIter = locations.begin(); locationIter != locations.end(); ++locationIter) {
range_markers_durations_aggregated.push_back(
duration_before_current_location);
- jack_nframes_t duration =
+ nframes_t duration =
currentLocation->end() - currentLocation->start();
range_markers_durations.push_back(duration);
private:
// keeps the duration of all range_markers before the current
- vector<jack_nframes_t> range_markers_durations_aggregated;
- vector<jack_nframes_t> range_markers_durations;
+ vector<nframes_t> range_markers_durations_aggregated;
+ vector<nframes_t> range_markers_durations;
// duration of all range markers
- jack_nframes_t total_duration;
+ nframes_t total_duration;
// index of range marker, that get's exported right now
unsigned int current_range_marker_index;
void
-ExportSessionDialog::set_range (jack_nframes_t start, jack_nframes_t end)
+ExportSessionDialog::set_range (nframes_t start, nframes_t end)
{
ExportDialog::set_range (start, end);
{
public:
ExportSessionDialog (PublicEditor&);
- void set_range (jack_nframes_t start, jack_nframes_t end);
+ void set_range (nframes_t start, nframes_t end);
protected:
void export_audio_data();
}
void
-GainAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
+GainAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
{
double x = 0;
~GainAutomationTimeAxisView();
- void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double);
+ void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
private:
ARDOUR::Curve& curve;
gain_adjustment.signal_value_changed().connect (mem_fun(*this, &GainMeter::gain_adjusted));
peak_display.signal_button_release_event().connect (mem_fun(*this, &GainMeter::peak_button_release));
- _session.MeterHoldChanged.connect (mem_fun(*this, &GainMeter::meter_hold_changed));
+ Config->ParameterChanged.connect (mem_fun (*this, &GainMeter::parameter_changed));
gain_changed (0);
update_gain_sensitive ();
}
void
-GainMeter::meter_hold_changed()
+GainMeter::parameter_changed(const char* parameter_name)
{
- ENSURE_GUI_THREAD(mem_fun(*this, &GainMeter::meter_hold_changed));
-
- vector<MeterInfo>::iterator i;
- uint32_t n;
+#define PARAM_IS(x) (!strcmp (parameter_name, (x)))
+
+ ENSURE_GUI_THREAD (bind (mem_fun(*this, &GainMeter::parameter_changed), parameter_name));
+
+ if (PARAM_IS ("meter-hold")) {
- for (n = 0, i = meters.begin(); i != meters.end(); ++i, ++n) {
+ vector<MeterInfo>::iterator i;
+ uint32_t n;
- (*i).meter->set_hold_count ((uint32_t) floor(_session.meter_hold()));
+ for (n = 0, i = meters.begin(); i != meters.end(); ++i, ++n) {
+
+ (*i).meter->set_hold_count ((uint32_t) floor(Config->get_meter_hold()));
+ }
}
+
+#undef PARAM_IS
}
void
for (uint32_t n = 0; n < nmeters; ++n) {
if (meters[n].width != width) {
delete meters[n].meter;
- meters[n].meter = new FastMeter ((uint32_t) floor (_session.meter_hold()), width, FastMeter::Vertical);
+ meters[n].meter = new FastMeter ((uint32_t) floor (Config->get_meter_hold()), width, FastMeter::Vertical);
meters[n].width = width;
meters[n].meter->add_events (Gdk::BUTTON_RELEASE_MASK);
bool wait_for_release;
ARDOUR::MeterPoint old_meter_point;
- void meter_hold_changed();
+ void parameter_changed (const char*);
void reset_peak_display ();
void reset_group_peak_display (ARDOUR::RouteGroup*);
--- /dev/null
+/* XPM */
+static char * tool_object_xpm[] = {
+"16 12 39 1",
+" c None",
+". c #000000",
+"+ c #0C0C0C",
+"@ c #151515",
+"# c #D1D1D1",
+"$ c #121212",
+"% c #161616",
+"& c #DADADA",
+"* c #131313",
+"= c #D6D6D6",
+"- c #0F0F0F",
+"; c #050505",
+"> c #D3D3D3",
+", c #0A0A0A",
+"' c #070707",
+") c #E5E5E5",
+"! c #292929",
+"~ c #B0B0B0",
+"{ c #262626",
+"] c #5C5C5C",
+"^ c #333333",
+"/ c #0E0E0E",
+"( c #111111",
+"_ c #3D3D3D",
+": c #F4F4F4",
+"< c #FFFFFF",
+"[ c #EBEBEB",
+"} c #D0D0D0",
+"| c #030303",
+"1 c #F1F1F1",
+"2 c #FDFDFD",
+"3 c #C3C3C3",
+"4 c #101010",
+"5 c #141414",
+"6 c #F2F2F2",
+"7 c #4E4E4E",
+"8 c #686868",
+"9 c #0B0B0B",
+"0 c #020202",
+" .+. ",
+" @#$ ",
+" %&* ",
+" +=-.. ",
+" ;>.,,-.. ",
+" .')!~{]^/ ",
+" (_:<<<[}| ",
+" '12<<<<<| ",
+" -~<<<<<34 ",
+" .56<<<<7| ",
+" /8<<<),. ",
+" .9|||0- "};
* @param item the time axis item whos position has changed
*/
void
-ImageFrameSocketHandler::send_imageframe_view_position_change(jack_nframes_t pos, void* src, ImageFrameView* item)
+ImageFrameSocketHandler::send_imageframe_view_position_change(nframes_t pos, void* src, ImageFrameView* item)
{
// ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_position_change), pos, src, item));
* @param item the item which has had a duration change
*/
void
-ImageFrameSocketHandler::send_imageframe_view_duration_change(jack_nframes_t dur, void* src, ImageFrameView* item)
+ImageFrameSocketHandler::send_imageframe_view_duration_change(nframes_t dur, void* src, ImageFrameView* item)
{
// ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_duration_change), dur, src, item));
* @param item the time axis item whos position has changed
*/
void
-ImageFrameSocketHandler::send_marker_view_position_change(jack_nframes_t pos, void* src, MarkerView* item)
+ImageFrameSocketHandler::send_marker_view_position_change(nframes_t pos, void* src, MarkerView* item)
{
if(this == src || src == 0)
{
* @param item the time axis item whos position has changed
*/
void
-ImageFrameSocketHandler::send_marker_view_duration_change(jack_nframes_t dur, void* src, MarkerView* item)
+ImageFrameSocketHandler::send_marker_view_duration_change(nframes_t dur, void* src, MarkerView* item)
{
if(this == src || src == 0)
{
position += image_id_size ;
// get the start frame value
- jack_nframes_t start = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
+ nframes_t start = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
position += 10 ;
// get the duration value
- jack_nframes_t duration = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
+ nframes_t duration = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
position += 10 ;
//get the named time axis view we about to add an image to
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
- jack_nframes_t start_frame = strtoul(get_message_part(position, ardourvis::TIME_VALUE_CHARS, msg).c_str(), 0, 10) ;
+ nframes_t start_frame = strtoul(get_message_part(position, ardourvis::TIME_VALUE_CHARS, msg).c_str(), 0, 10) ;
position += ardourvis::TIME_VALUE_CHARS ;
// get the named time axis
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
- jack_nframes_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
+ nframes_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
// get the named time axis
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
- jack_nframes_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
+ nframes_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
int errcode ;
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
- jack_nframes_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
+ nframes_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
int errcode ;
* @param src the identity of the object that initiated the change
* @param item the time axis item whos position has changed
*/
- void send_imageframe_view_position_change(jack_nframes_t pos, void* src, ImageFrameView* item) ;
+ void send_imageframe_view_position_change(nframes_t pos, void* src, ImageFrameView* item) ;
/**
* Send a Image Frame View item duration changed message
* @param src the identity of the object that initiated the change
* @param item the item which has had a duration change
*/
- void send_imageframe_view_duration_change(jack_nframes_t dur, void* src, ImageFrameView* item) ;
+ void send_imageframe_view_duration_change(nframes_t dur, void* src, ImageFrameView* item) ;
/**
* Send a message indicating that an ImageFrameView has been renamed
* @param src the identity of the object that initiated the change
* @param item the time axis item whos position has changed
*/
- void send_marker_view_position_change(jack_nframes_t pos, void* src, MarkerView* item) ;
+ void send_marker_view_position_change(nframes_t pos, void* src, MarkerView* item) ;
/**
* Send a Marker View item duration changed message
* @param src the identity of the object that initiated the change
* @param item the time axis item whos position has changed
*/
- void send_marker_view_duration_change(jack_nframes_t dur, void* src, MarkerView* item) ;
+ void send_marker_view_duration_change(nframes_t dur, void* src, MarkerView* item) ;
/**
* Send a message indicating that a MarkerView has been renamed
* @param src the identity of the object that initiated the change
*/
ImageFrameView*
-ImageFrameTimeAxisGroup::add_imageframe_item(const string & frame_id, jack_nframes_t start, jack_nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src)
+ImageFrameTimeAxisGroup::add_imageframe_item(const string & frame_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src)
{
ImageFrameView* ifv = 0 ;
* @param num_channels the number of channles within the rgb_data
* @param src the identity of the object that initiated the change
*/
- ImageFrameView* add_imageframe_item(const string & item_id, jack_nframes_t start, jack_nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src) ;
+ ImageFrameView* add_imageframe_item(const string & item_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src) ;
/**
* Returns the named ImageFrameView or 0 if the named view does not exist on this view helper
{
if(selected_imageframe_group && selected_imageframe_view)
{
- selected_imageframe_view->set_duration((jack_nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
+ selected_imageframe_view->set_duration((nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
}
}
ImageFrameTimeAxisGroup* item_group,
double spu,
Gdk::Color& basic_color,
- jack_nframes_t start,
- jack_nframes_t duration,
+ nframes_t start,
+ nframes_t duration,
unsigned char* rgb_data,
uint32_t width,
uint32_t height,
* @return true if the position change was a success, false otherwise
*/
bool
-ImageFrameView::set_position(jack_nframes_t pos, void* src, double* delta)
+ImageFrameView::set_position(nframes_t pos, void* src, double* delta)
{
- jack_nframes_t old_pos = frame_position ;
+ nframes_t old_pos = frame_position ;
// do the standard stuff
bool ret = TimeAxisViewItem::set_position(pos, src, delta) ;
{
// calculate the offset of the marker
MarkerView* mv = (MarkerView*)*i ;
- jack_nframes_t marker_old_pos = mv->get_position() ;
+ nframes_t marker_old_pos = mv->get_position() ;
mv->set_position(pos + (marker_old_pos - old_pos), src) ;
}
* @return true if the duration change was succesful, false otherwise
*/
bool
-ImageFrameView::set_duration(jack_nframes_t dur, void* src)
+ImageFrameView::set_duration(nframes_t dur, void* src)
{
/* do the standard stuff */
bool ret = TimeAxisViewItem::set_duration(dur, src) ;
ImageFrameTimeAxisGroup* group,
double spu,
Gdk::Color& base_color,
- jack_nframes_t start,
- jack_nframes_t duration,
+ nframes_t start,
+ nframes_t duration,
unsigned char* rgb_data,
uint32_t width,
uint32_t height,
* @param src the identity of the object that initiated the change
* @return true if the position change was a success, false otherwise
*/
- virtual bool set_position(jack_nframes_t pos, void* src, double* delta = 0) ;
+ virtual bool set_position(nframes_t pos, void* src, double* delta = 0) ;
/**
* Sets the duration of this item
* @param src the identity of the object that initiated the change
* @return true if the duration change was succesful, false otherwise
*/
- virtual bool set_duration(jack_nframes_t dur, void* src) ;
+ virtual bool set_duration(nframes_t dur, void* src) ;
//---------------------------------------------------------------------------------------//
// Parent Component Methods
LocationUI::add_new_location()
{
if (session) {
- jack_nframes_t where = session->audible_frame();
+ nframes_t where = session->audible_frame();
Location *location = new Location (where, where, "mark", Location::IsMark);
session->begin_reversible_command (_("add marker"));
XMLNode &before = session->locations()->get_state();
LocationUI::add_new_range()
{
if (session) {
- jack_nframes_t where = session->audible_frame();
+ nframes_t where = session->audible_frame();
Location *location = new Location (where, where, "unnamed",
Location::IsRangeMarker);
session->begin_reversible_command (_("add range marker"));
cout << _("Ardour/GTK ")
<< VERSIONSTRING
<< _("\n (built using ")
- << gtk_ardour_major_version << '.'
- << gtk_ardour_minor_version << '.'
- << gtk_ardour_micro_version
- << _(" with libardour ")
- << libardour_major_version << '.'
- << libardour_minor_version << '.'
- << libardour_micro_version
+ << ARDOUR::get_ardour_revision ()
#ifdef __GNUC__
<< _(" and GCC version ") << __VERSION__
#endif
try {
ARDOUR::init (*engine, use_vst, try_hw_optimization);
+ Config->set_current_owner (ConfigVariableBase::Interface);
ui->set_engine (*engine);
} catch (failed_constructor& err) {
error << _("could not initialize Ardour.") << endmsg;
#include "i18n.h"
Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, const string& annotation,
- Type type, jack_nframes_t frame, bool handle_events)
+ Type type, nframes_t frame, bool handle_events)
: editor (ed), _type(type)
{
}
void
-Marker::set_position (jack_nframes_t frame)
+Marker::set_position (nframes_t frame)
{
double new_unit_position = editor.frame_to_unit (frame);
new_unit_position -= shift;
Marker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, Type,
- jack_nframes_t frame = 0, bool handle_events = true);
+ nframes_t frame = 0, bool handle_events = true);
virtual ~Marker ();
ArdourCanvas::Item& the_item() const;
- void set_position (jack_nframes_t);
+ void set_position (nframes_t);
void set_name (const string&);
void set_color_rgba (uint32_t rgba);
ArdourCanvas::Points *points;
double unit_position;
- jack_nframes_t frame_position;
+ nframes_t frame_position;
unsigned char shift; /* should be double, but its always small and integral */
Type _type;
* @param src the identity of the object that initiated the change
*/
MarkerView*
-MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, jack_nframes_t start, jack_nframes_t dur, void* src)
+MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, nframes_t start, nframes_t dur, void* src)
{
if(ifv->has_marker_view_item(mark_id))
{
{
if(get_selected_time_axis_item() != 0)
{
- get_selected_time_axis_item()->set_duration((jack_nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
+ get_selected_time_axis_item()->set_duration((nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
}
}
* @param duration the duration the new item should be placed upon the timeline
* @param src the identity of the object that initiated the change
*/
- MarkerView* add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, jack_nframes_t start, jack_nframes_t dur, void* src) ;
+ MarkerView* add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, nframes_t start, nframes_t dur, void* src) ;
/**
* Returns the named MarkerView or 0 if the named marker does not exist
Gdk::Color& basic_color,
std::string mark_type,
std::string mark_id,
- jack_nframes_t start,
- jack_nframes_t duration)
+ nframes_t start,
+ nframes_t duration)
: TimeAxisViewItem(mark_id, *parent,*tv,spu,basic_color,start,duration)
{
mark_type_text = mark_type ;
Gdk::Color& base_color,
std::string mark_type,
std::string mark_id,
- jack_nframes_t start,
- jack_nframes_t duration) ;
+ nframes_t start,
+ nframes_t duration) ;
/**
* Destructor
Session& s,
Route& r,
string name,
- jack_nframes_t long_over,
- jack_nframes_t short_over,
- jack_nframes_t meter_hold)
+ nframes_t long_over,
+ nframes_t short_over,
+ nframes_t meter_hold)
: engine (eng),
session (s),
_route (r),
ARDOUR::Session&,
ARDOUR::Route&,
string label,
- jack_nframes_t long_over,
- jack_nframes_t short_over,
- jack_nframes_t meter_hold);
+ nframes_t long_over,
+ nframes_t short_over,
+ nframes_t meter_hold);
void update (); /* called by meter timeout handler from ARDOUR_UI */
#include "opts.h"
NewSessionDialog::NewSessionDialog()
- : ArdourDialog ("New Session Dialog")
+ : ArdourDialog ("session control")
{
- session_name_label = Gtk::manage(new class Gtk::Label(_("New Session Name :")));
+ session_name_label = Gtk::manage(new class Gtk::Label(_("Name :")));
m_name = Gtk::manage(new class Gtk::Entry());
m_name->set_text(GTK_ARDOUR::session_name);
- session_location_label = Gtk::manage(new class Gtk::Label(_("Create Session Directory In :")));
+ chan_count_label_1 = Gtk::manage(new class Gtk::Label(_("channels")));
+ chan_count_label_2 = Gtk::manage(new class Gtk::Label(_("channels")));
+ chan_count_label_3 = Gtk::manage(new class Gtk::Label(_("channels")));
+ chan_count_label_4 = Gtk::manage(new class Gtk::Label(_("channels")));
+
+ chan_count_label_1->set_alignment(0,0.5);
+ chan_count_label_1->set_padding(0,0);
+ chan_count_label_1->set_line_wrap(false);
+
+ chan_count_label_2->set_alignment(0,0.5);
+ chan_count_label_2->set_padding(0,0);
+ chan_count_label_2->set_line_wrap(false);
+
+ chan_count_label_3->set_alignment(0,0.5);
+ chan_count_label_3->set_padding(0,0);
+ chan_count_label_3->set_line_wrap(false);
+
+ chan_count_label_4->set_alignment(0,0.5);
+ chan_count_label_4->set_padding(0,0);
+ chan_count_label_4->set_line_wrap(false);
+
+ bus_label = Gtk::manage(new class Gtk::Label(_("<b>Busses</b>")));
+ input_label = Gtk::manage(new class Gtk::Label(_("<b>Inputs</b>")));
+ output_label = Gtk::manage(new class Gtk::Label(_("<b>Outputs</b>")));
+
+ session_location_label = Gtk::manage(new class Gtk::Label(_("Create Folder In :")));
m_folder = Gtk::manage(new class Gtk::FileChooserButton(Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
- session_template_label = Gtk::manage(new class Gtk::Label(_("Use Session Template :")));
+ session_template_label = Gtk::manage(new class Gtk::Label(_("Template :")));
m_template = Gtk::manage(new class Gtk::FileChooserButton());
- chan_count_label = Gtk::manage(new class Gtk::Label(_("Channel Count")));
m_create_control_bus = Gtk::manage(new class Gtk::CheckButton(_("Create Monitor Bus")));
Gtk::Adjustment *m_control_bus_channel_count_adj = Gtk::manage(new class Gtk::Adjustment(2, 0, 100, 1, 10, 10));
m_master_bus_channel_count = Gtk::manage(new class Gtk::SpinButton(*m_master_bus_channel_count_adj, 1, 0));
m_create_master_bus = Gtk::manage(new class Gtk::CheckButton(_("Create Master Bus")));
advanced_table = Gtk::manage(new class Gtk::Table(2, 2, true));
- m_connect_inputs = Gtk::manage(new class Gtk::CheckButton(_("Automatically Connect Inputs")));
- m_limit_input_ports = Gtk::manage(new class Gtk::CheckButton(_("Port Limit")));
+ m_connect_inputs = Gtk::manage(new class Gtk::CheckButton(_("Automatically Connect to Physical Inputs")));
+ m_limit_input_ports = Gtk::manage(new class Gtk::CheckButton(_("Use only")));
Gtk::Adjustment *m_input_limit_count_adj = Gtk::manage(new class Gtk::Adjustment(1, 0, 100, 1, 10, 10));
m_input_limit_count = Gtk::manage(new class Gtk::SpinButton(*m_input_limit_count_adj, 1, 0));
input_port_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
input_table = Gtk::manage(new class Gtk::Table(2, 2, false));
- input_label = Gtk::manage(new class Gtk::Label(_("<b>Track/Bus Inputs</b>")));
+ bus_frame = Gtk::manage(new class Gtk::Frame());
+ bus_table = Gtk::manage (new Gtk::Table (2, 3, false));
+
input_frame = Gtk::manage(new class Gtk::Frame());
m_connect_outputs = Gtk::manage(new class Gtk::CheckButton(_("Automatically Connect Outputs")));
- m_limit_output_ports = Gtk::manage(new class Gtk::CheckButton(_("Port Limit")));
+ m_limit_output_ports = Gtk::manage(new class Gtk::CheckButton(_("Use only")));
Gtk::Adjustment *m_output_limit_count_adj = Gtk::manage(new class Gtk::Adjustment(1, 0, 100, 1, 10, 10));
m_output_limit_count = Gtk::manage(new class Gtk::SpinButton(*m_output_limit_count_adj, 1, 0));
output_port_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
Gtk::RadioButton::Group _RadioBGroup_m_connect_outputs_to_master;
- m_connect_outputs_to_master = Gtk::manage(new class Gtk::RadioButton(_RadioBGroup_m_connect_outputs_to_master, _("Connect to Master Bus")));
- m_connect_outputs_to_physical = Gtk::manage(new class Gtk::RadioButton(_RadioBGroup_m_connect_outputs_to_master, _("Connect to Physical Outputs")));
+ m_connect_outputs_to_master = Gtk::manage(new class Gtk::RadioButton(_RadioBGroup_m_connect_outputs_to_master, _("... to Master Bus")));
+ m_connect_outputs_to_physical = Gtk::manage(new class Gtk::RadioButton(_RadioBGroup_m_connect_outputs_to_master, _("... to Physical Outputs")));
output_conn_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
output_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
- output_label = Gtk::manage(new class Gtk::Label(_("<b>Track/Bus Outputs</b>")));
output_frame = Gtk::manage(new class Gtk::Frame());
advanced_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
advanced_label = Gtk::manage(new class Gtk::Label(_("Advanced Options")));
m_treeview = Gtk::manage(new class Gtk::TreeView());
recent_scrolledwindow = Gtk::manage(new class Gtk::ScrolledWindow());
- recent_sesion_label = Gtk::manage(new class Gtk::Label(_("Open Recent Session")));
+ recent_sesion_label = Gtk::manage(new class Gtk::Label(_("Recent:")));
recent_frame = Gtk::manage(new class Gtk::Frame());
open_session_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
m_notebook = Gtk::manage(new class Gtk::Notebook());
session_name_label->set_alignment(0, 0.5);
- session_name_label->set_padding(0,0);
+ session_name_label->set_padding(6,0);
session_name_label->set_line_wrap(false);
session_name_label->set_selectable(false);
m_name->set_editable(true);
m_name->set_max_length(0);
m_name->set_has_frame(true);
m_name->set_activates_default(true);
+ m_name->set_width_chars (40);
session_location_label->set_alignment(0,0.5);
- session_location_label->set_padding(0,0);
+ session_location_label->set_padding(6,0);
session_location_label->set_line_wrap(false);
session_location_label->set_selectable(false);
session_template_label->set_alignment(0,0.5);
- session_template_label->set_padding(0,0);
+ session_template_label->set_padding(6,0);
session_template_label->set_line_wrap(false);
session_template_label->set_selectable(false);
m_create_control_bus->set_flags(Gtk::CAN_FOCUS);
m_master_bus_channel_count->set_numeric(true);
m_master_bus_channel_count->set_digits(0);
m_master_bus_channel_count->set_wrap(false);
- open_session_file_label = Gtk::manage(new class Gtk::Label(_("Open Session File :")));
+ open_session_file_label = Gtk::manage(new class Gtk::Label(_("Browse:")));
open_session_file_label->set_alignment(0, 0.5);
m_create_master_bus->set_flags(Gtk::CAN_FOCUS);
m_create_master_bus->set_relief(Gtk::RELIEF_NORMAL);
m_create_master_bus->set_border_width(0);
advanced_table->set_row_spacings(0);
advanced_table->set_col_spacings(0);
- advanced_table->attach(*chan_count_label, 1, 2, 0, 1, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
- advanced_table->attach(*m_create_control_bus, 0, 1, 2, 3, Gtk::FILL, Gtk::AttachOptions(), 0, 0);
- advanced_table->attach(*m_control_bus_channel_count, 1, 2, 2, 3, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
- advanced_table->attach(*m_master_bus_channel_count, 1, 2, 1, 2, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
- advanced_table->attach(*m_create_master_bus, 0, 1, 1, 2, Gtk::FILL, Gtk::AttachOptions(), 0, 0);
m_connect_inputs->set_flags(Gtk::CAN_FOCUS);
m_connect_inputs->set_relief(Gtk::RELIEF_NORMAL);
m_input_limit_count->set_wrap(false);
m_input_limit_count->set_sensitive(false);
+ bus_hbox = Gtk::manage (new Gtk::HBox (false, 0));
+ bus_hbox->pack_start (*bus_table, Gtk::PACK_SHRINK, 18);
+
+ bus_label->set_alignment(0, 0.5);
+ bus_label->set_padding(0,0);
+ bus_label->set_line_wrap(false);
+ bus_label->set_selectable(false);
+ bus_label->set_use_markup(true);
+ bus_frame->set_shadow_type(Gtk::SHADOW_NONE);
+ bus_frame->set_label_align(0,0.5);
+ bus_frame->add(*bus_hbox);
+ bus_frame->set_label_widget(*bus_label);
+
+ bus_table->set_row_spacings (0);
+ bus_table->set_col_spacings (0);
+ bus_table->attach (*m_create_master_bus, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ bus_table->attach (*m_master_bus_channel_count, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ bus_table->attach (*chan_count_label_1, 2, 3, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 6, 0);
+ bus_table->attach (*m_create_control_bus, 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ bus_table->attach (*m_control_bus_channel_count, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ bus_table->attach (*chan_count_label_2, 2, 3, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 6, 0);
+
input_port_limit_hbox->pack_start(*m_limit_input_ports, Gtk::PACK_SHRINK, 6);
- input_port_limit_hbox->pack_start(*m_input_limit_count, Gtk::PACK_EXPAND_PADDING, 0);
+ input_port_limit_hbox->pack_start(*m_input_limit_count, Gtk::PACK_SHRINK, 0);
+ input_port_limit_hbox->pack_start(*chan_count_label_3, Gtk::PACK_SHRINK, 6);
input_port_vbox->pack_start(*m_connect_inputs, Gtk::PACK_SHRINK, 0);
input_port_vbox->pack_start(*input_port_limit_hbox, Gtk::PACK_EXPAND_PADDING, 0);
input_table->set_row_spacings(0);
input_table->set_col_spacings(0);
input_table->attach(*input_port_vbox, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 6, 6);
+ input_hbox = Gtk::manage (new Gtk::HBox (false, 0));
+ input_hbox->pack_start (*input_table, Gtk::PACK_SHRINK, 18);
+
input_label->set_alignment(0, 0.5);
input_label->set_padding(0,0);
input_label->set_line_wrap(false);
input_label->set_use_markup(true);
input_frame->set_shadow_type(Gtk::SHADOW_NONE);
input_frame->set_label_align(0,0.5);
- input_frame->add(*input_table);
+ input_frame->add(*input_hbox);
input_frame->set_label_widget(*input_label);
+
m_connect_outputs->set_flags(Gtk::CAN_FOCUS);
m_connect_outputs->set_relief(Gtk::RELIEF_NORMAL);
m_connect_outputs->set_mode(true);
m_output_limit_count->set_wrap(false);
m_output_limit_count->set_sensitive(false);
output_port_limit_hbox->pack_start(*m_limit_output_ports, Gtk::PACK_SHRINK, 6);
- output_port_limit_hbox->pack_start(*m_output_limit_count, Gtk::PACK_EXPAND_PADDING, 0);
- output_port_vbox->pack_start(*m_connect_outputs, Gtk::PACK_SHRINK, 0);
- output_port_vbox->pack_start(*output_port_limit_hbox, Gtk::PACK_EXPAND_PADDING, 0);
+ output_port_limit_hbox->pack_start(*m_output_limit_count, Gtk::PACK_SHRINK, 0);
+ output_port_limit_hbox->pack_start(*chan_count_label_4, Gtk::PACK_SHRINK, 6);
m_connect_outputs_to_master->set_flags(Gtk::CAN_FOCUS);
m_connect_outputs_to_master->set_relief(Gtk::RELIEF_NORMAL);
m_connect_outputs_to_master->set_mode(true);
m_connect_outputs_to_physical->set_mode(true);
m_connect_outputs_to_physical->set_active(false);
m_connect_outputs_to_physical->set_border_width(0);
+ output_conn_vbox->pack_start(*m_connect_outputs, Gtk::PACK_SHRINK, 0);
output_conn_vbox->pack_start(*m_connect_outputs_to_master, Gtk::PACK_SHRINK, 0);
output_conn_vbox->pack_start(*m_connect_outputs_to_physical, Gtk::PACK_SHRINK, 0);
output_vbox->set_border_width(6);
- output_vbox->pack_start(*output_port_vbox);
+
+ output_port_vbox->pack_start(*output_port_limit_hbox, Gtk::PACK_SHRINK, 0);
+
output_vbox->pack_start(*output_conn_vbox);
+ output_vbox->pack_start(*output_port_vbox);
output_label->set_alignment(0, 0.5);
output_label->set_padding(0,0);
output_label->set_use_markup(true);
output_frame->set_shadow_type(Gtk::SHADOW_NONE);
output_frame->set_label_align(0,0.5);
- output_frame->add(*output_vbox);
+
+ output_hbox = Gtk::manage (new Gtk::HBox (false, 0));
+ output_hbox->pack_start (*output_vbox, Gtk::PACK_SHRINK, 18);
+
+ output_frame->add(*output_hbox);
output_frame->set_label_widget(*output_label);
+
advanced_vbox->pack_start(*advanced_table, Gtk::PACK_SHRINK, 0);
- advanced_vbox->pack_start(*input_frame, Gtk::PACK_SHRINK, 12);
+ advanced_vbox->pack_start(*bus_frame, Gtk::PACK_SHRINK, 6);
+ advanced_vbox->pack_start(*input_frame, Gtk::PACK_SHRINK, 6);
advanced_vbox->pack_start(*output_frame, Gtk::PACK_SHRINK, 0);
advanced_label->set_padding(0,0);
advanced_label->set_line_wrap(false);
advanced_expander->add(*advanced_vbox);
advanced_expander->set_label_widget(*advanced_label);
new_session_table->set_border_width(12);
- new_session_table->set_row_spacings(0);
+ new_session_table->set_row_spacings(6);
new_session_table->set_col_spacings(0);
new_session_table->attach(*session_name_label, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL, 0, 0);
new_session_table->attach(*m_name, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::FILL, 0, 0);
new_session_table->attach(*m_folder, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::FILL, 0, 0);
new_session_table->attach(*session_template_label, 0, 1, 2, 3, Gtk::FILL, Gtk::FILL, 0, 0);
new_session_table->attach(*m_template, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::FILL, 0, 0);
- new_session_table->attach(*advanced_expander, 0, 2, 3, 4, Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 12);
- chan_count_label->set_padding(0,0);
- chan_count_label->set_line_wrap(false);
- chan_count_label->set_selectable(false);
- open_session_hbox->pack_start(*open_session_file_label, true, true, 12);
+ new_session_table->attach(*advanced_expander, 0, 2, 3, 4, Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 6);
+
+ open_session_hbox->pack_start(*open_session_file_label, false, false, 12);
open_session_hbox->pack_start(*m_open_filechooser, true, true, 12);
m_treeview->set_flags(Gtk::CAN_FOCUS);
m_treeview->set_headers_visible(true);
recent_sesion_label->set_line_wrap(false);
recent_sesion_label->set_selectable(false);
recent_frame->set_border_width(12);
- recent_frame->set_shadow_type(Gtk::SHADOW_IN);
+ recent_frame->set_shadow_type(Gtk::SHADOW_NONE);
recent_frame->add(*recent_scrolledwindow);
recent_frame->set_label_widget(*recent_sesion_label);
- open_session_vbox->pack_start(*open_session_hbox, Gtk::PACK_SHRINK, 12);
open_session_vbox->pack_start(*recent_frame, Gtk::PACK_EXPAND_WIDGET, 0);
+ open_session_vbox->pack_start(*open_session_hbox, Gtk::PACK_SHRINK, 12);
m_notebook->set_flags(Gtk::CAN_FOCUS);
m_notebook->set_scrollable(true);
m_notebook->append_page(*new_session_table, _("New Session"));
Gtk::Label * session_name_label;
Gtk::Label * session_location_label;
Gtk::Label * session_template_label;
- Gtk::Label * chan_count_label;
+ Gtk::Label * chan_count_label_1;
+ Gtk::Label * chan_count_label_2;
+ Gtk::Label * chan_count_label_3;
+ Gtk::Label * chan_count_label_4;
Gtk::Table * advanced_table;
Gtk::HBox * input_port_limit_hbox;
Gtk::VBox * input_port_vbox;
Gtk::Table * input_table;
+ Gtk::HBox * input_hbox;
+
+ Gtk::Label * bus_label;
+ Gtk::Frame * bus_frame;
+ Gtk::Table * bus_table;
+ Gtk::HBox * bus_hbox;
Gtk::Label * input_label;
Gtk::Frame * input_frame;
Gtk::VBox * output_port_vbox;
Gtk::VBox * output_conn_vbox;
Gtk::VBox * output_vbox;
+ Gtk::HBox * output_hbox;
Gtk::Label * output_label;
Gtk::Frame * output_frame;
click_emphasis_path_entry.set_sensitive (true);
session_raid_entry.set_sensitive (true);
- if (session->click_sound.length() == 0) {
+ if (Config->get_click_sound().empty()) {
click_path_entry.set_text (_("internal"));
} else {
- click_path_entry.set_text (session->click_sound);
+ click_path_entry.set_text (Config->get_click_sound());
}
- if (session->click_emphasis_sound.length() == 0) {
+ if (Config->get_click_emphasis_sound().empty()) {
click_emphasis_path_entry.set_text (_("internal"));
} else {
- click_emphasis_path_entry.set_text (session->click_emphasis_sound);
+ click_emphasis_path_entry.set_text (Config->get_click_emphasis_sound());
}
session_raid_entry.set_text(session->raid_path());
/* val is in msecs */
- Crossfade::set_short_xfade_length ((jack_nframes_t) floor (session->frame_rate() * (val / 1000.0)));
+ Crossfade::set_short_xfade_length ((nframes_t) floor (session->frame_rate() * (val / 1000.0)));
}
}
OptionEditor::smpte_offset_chosen()
{
if (session) {
- jack_nframes_t frames = smpte_offset_clock.current_duration();
+ nframes_t frames = smpte_offset_clock.current_duration();
session->set_smpte_offset (frames);
}
}
OptionEditor::raid_path_changed ()
{
if (session) {
- session->set_raid_path (session_raid_entry.get_text());
+ Config->set_raid_path (session_raid_entry.get_text());
}
}
if (session) {
string path = click_path_entry.get_text();
- if (path == session->click_sound) {
+ if (path == Config->get_click_sound()) {
return;
}
- if (path.length() == 0) {
+ if (path.empty()) {
- session->set_click_sound ("");
+ Config->set_click_sound ("");
} else {
strip_whitespace_edges (path);
if (path == _("internal")) {
- session->set_click_sound ("");
+ Config->set_click_sound ("");
} else {
- session->set_click_sound (path);
+ Config->set_click_sound (path);
}
}
}
if (session) {
string path = click_emphasis_path_entry.get_text();
- if (path == session->click_emphasis_sound) {
+ if (path == Config->get_click_emphasis_sound()) {
return;
}
- if (path.length() == 0) {
+ if (path.empty()) {
- session->set_click_emphasis_sound ("");
+ Config->set_click_emphasis_sound ("");
} else {
strip_whitespace_edges (path);
if (path == _("internal")) {
- session->set_click_emphasis_sound ("");
+ Config->set_click_emphasis_sound ("");
} else {
- session->set_click_emphasis_sound (path);
+ Config->set_click_emphasis_sound (path);
}
}
}
}
void
-PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
+PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
{
if (lines.empty()) {
/* no data, possibly caused by no outputs/inputs */
~PanAutomationTimeAxisView();
- void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double);
+ void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
void clear_lines ();
void add_line (AutomationLine&);
virtual void separate_region_from_selection () = 0;
virtual void toggle_playback (bool with_abort) = 0;
virtual void set_edit_menu (Gtk::Menu&) = 0;
- virtual jack_nframes_t unit_to_frame (double unit) = 0;
- virtual double frame_to_unit (jack_nframes_t frame) = 0;
+ virtual nframes_t unit_to_frame (double unit) = 0;
+ virtual double frame_to_unit (nframes_t frame) = 0;
virtual double frame_to_unit (double frame) = 0;
- virtual jack_nframes_t pixel_to_frame (double pixel) = 0;
- virtual gulong frame_to_pixel (jack_nframes_t frame) = 0;
+ virtual nframes_t pixel_to_frame (double pixel) = 0;
+ virtual gulong frame_to_pixel (nframes_t frame) = 0;
virtual Selection& get_selection() const = 0;
virtual Selection& get_cut_buffer() const = 0;
virtual void play_selection () = 0;
virtual void ensure_float (Gtk::Window&) = 0;
virtual void show_window () = 0;
virtual TrackViewList* get_valid_views (TimeAxisView*, ARDOUR::RouteGroup* grp = 0) = 0;
- virtual jack_nframes_t leftmost_position() const = 0;
- virtual jack_nframes_t current_page_frames() const = 0;
+ virtual nframes_t leftmost_position() const = 0;
+ virtual nframes_t current_page_frames() const = 0;
virtual void temporal_zoom_step (bool coarser) = 0;
virtual void scroll_tracks_down_line () = 0;
virtual void scroll_tracks_up_line () = 0;
virtual bool new_regionviews_display_gain () = 0;
virtual void prepare_for_cleanup () = 0;
- virtual void reposition_x_origin (jack_nframes_t frame) = 0;
+ virtual void reposition_x_origin (nframes_t frame) = 0;
virtual void remove_last_capture () = 0;
virtual void maximise_editing_space() = 0;
virtual void restore_editing_space() = 0;
}
void
-RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
+RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
{
double x = 0;
~RedirectAutomationTimeAxisView();
- void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double);
+ void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
guint32 show_at (double y, int& nth, Gtk::VBox *parent);
void hide ();
}
void
-RedirectBox::object_drop (string type, uint32_t cnt, void** ptr)
+RedirectBox::object_drop (string type, uint32_t cnt, const boost::shared_ptr<Redirect>* ptr)
{
- if (type != "redirects" || cnt == 0 || ptr == 0) {
+ if (type != "redirects" || cnt == 0 || !ptr) {
return;
}
list<boost::shared_ptr<Redirect> > redirects;
for (uint32_t n = 0; n < cnt; ++n) {
- redirects.push_back (boost::shared_ptr<Redirect> ((Redirect*) ptr[n]));
+ redirects.push_back (ptr[n]);
}
paste_redirect_list (redirects);
Gtk::EventBox redirect_eventbox;
Gtk::HBox redirect_hpacker;
- Gtkmm2ext::DnDTreeView redirect_display;
+ Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Redirect> > redirect_display;
Gtk::ScrolledWindow redirect_scroller;
- void object_drop (std::string type, uint32_t cnt, void**);
+ void object_drop (std::string type, uint32_t cnt, const boost::shared_ptr<ARDOUR::Redirect>*);
Width _width;
/* reset current start */
- jack_nframes_t ref = max_frames;
+ nframes_t ref = max_frames;
for (i = begin (); i != end(); ++i) {
if (region->first_frame() < ref) {
/* reset current end */
- jack_nframes_t ref = 0;
+ nframes_t ref = 0;
for (i = begin (); i != end(); ++i) {
if (region->first_frame() > ref) {
void clear_all();
- jack_nframes_t start () const {
+ nframes_t start () const {
return _current_start;
}
/* collides with list<>::end */
- jack_nframes_t end_frame () const {
+ nframes_t end_frame () const {
return _current_end;
}
void add_to_layer (RegionView *);
- jack_nframes_t _current_start;
- jack_nframes_t _current_end;
+ nframes_t _current_start;
+ nframes_t _current_end;
list<RegionView *> _bylayer;
};
set_height (trackview.height);
- region_muted ();
- region_sync_changed ();
- region_resized (BoundsChanged);
- region_locked ();
-
_region->StateChanged.connect (mem_fun(*this, &RegionView::region_changed));
group->signal_event().connect (bind (mem_fun (PublicEditor::instance(), &PublicEditor::canvas_region_view_event), group, this));
unit_length = _region->length() / samples_per_unit;
- reset_width_dependent_items (unit_length);
-
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
(*i)->set_duration (unit_length);
}
bool
-RegionView::set_position (jack_nframes_t pos, void* src, double* ignored)
+RegionView::set_position (nframes_t pos, void* src, double* ignored)
{
double delta;
bool ret;
}
bool
-RegionView::set_duration (jack_nframes_t frames, void *src)
+RegionView::set_duration (nframes_t frames, void *src)
{
if (!TimeAxisViewItem::set_duration (frames, src)) {
return false;
}
int sync_dir;
- jack_nframes_t sync_offset;
+ nframes_t sync_offset;
sync_offset = _region->sync_offset (sync_dir);
virtual void set_height (double);
virtual void set_samples_per_unit (double);
- virtual bool set_duration (jack_nframes_t, void*);
+ virtual bool set_duration (nframes_t, void*);
void move (double xdelta, double ydelta);
void lower ();
void lower_to_bottom ();
- bool set_position(jack_nframes_t pos, void* src, double* delta = 0);
+ bool set_position(nframes_t pos, void* src, double* delta = 0);
virtual void show_region_editor () = 0;
virtual void hide_region_editor();
void
-RouteTimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
+RouteTimeAxisView::show_timestretch (nframes_t start, nframes_t end)
{
double x1;
double x2;
}
void
-RouteTimeAxisView::get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results)
+RouteTimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& results)
{
double speed = 1.0;
speed = get_diskstream()->speed();
}
- jack_nframes_t start_adjusted = session_frame_to_track_frame(start, speed);
- jack_nframes_t end_adjusted = session_frame_to_track_frame(end, speed);
+ nframes_t start_adjusted = session_frame_to_track_frame(start, speed);
+ nframes_t end_adjusted = session_frame_to_track_frame(end, speed);
if (_view && ((top < 0.0 && bot < 0.0)) || touched (top, bot)) {
_view->get_selectables (start_adjusted, end_adjusted, results);
}
boost::shared_ptr<Region>
-RouteTimeAxisView::find_next_region (jack_nframes_t pos, RegionPoint point, int32_t dir)
+RouteTimeAxisView::find_next_region (nframes_t pos, RegionPoint point, int32_t dir)
{
boost::shared_ptr<Diskstream> stream;
Playlist *playlist;
}
bool
-RouteTimeAxisView::paste (jack_nframes_t pos, float times, Selection& selection, size_t nth)
+RouteTimeAxisView::paste (nframes_t pos, float times, Selection& selection, size_t nth)
{
if (!is_track()) {
return false;
void set_samples_per_unit (double);
void set_height (TimeAxisView::TrackHeight);
- void show_timestretch (jack_nframes_t start, jack_nframes_t end);
+ void show_timestretch (nframes_t start, nframes_t end);
void hide_timestretch ();
void selection_click (GdkEventButton*);
void set_selected_points (PointSelection&);
void set_selected_regionviews (RegionSelection&);
- void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable *>&);
+ void get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable *>&);
void get_inverted_selectables (Selection&, list<Selectable*>&);
- boost::shared_ptr<ARDOUR::Region> find_next_region (jack_nframes_t pos, ARDOUR::RegionPoint, int32_t dir);
+ boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t pos, ARDOUR::RegionPoint, int32_t dir);
/* Editing operations */
bool cut_copy_clear (Selection&, Editing::CutCopyOp);
- bool paste (jack_nframes_t, float times, Selection&, size_t nth);
+ bool paste (nframes_t, float times, Selection&, size_t nth);
list<TimeAxisView*> get_child_list();
virtual void show_existing_automation ();
virtual void hide_all_automation ();
- void timestretch (jack_nframes_t start, jack_nframes_t end);
+ void timestretch (nframes_t start, nframes_t end);
void visual_click ();
void hide_click ();
#include <ardour/route_group.h>
#include <pbd/memento_command.h>
+#include <pbd/stacktrace.h>
+#include <pbd/shiva.h>
#include "route_ui.h"
#include "keyboard.h"
using namespace ARDOUR;
using namespace PBD;
-
RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt, ARDOUR::Session& sess, const char* m_name,
const char* s_name, const char* r_name)
: AxisView(sess),
set_color (unique_random_color());
}
- _route->GoingAway.connect (mem_fun (*this, &RouteUI::route_removed));
+ new Shiva<Route,RouteUI> (*_route, *this);
+
_route->active_changed.connect (mem_fun (*this, &RouteUI::route_active_changed));
mute_button = manage (new BindableToggleButton (_route->mute_control(), m_name ));
RouteUI::~RouteUI()
{
+ GoingAway (); /* EMIT SIGNAL */
delete mute_menu;
}
_session.commit_reversible_command ();
}
-void
-RouteUI::reversibly_apply_audio_track_boolean (string name, void (AudioTrack::*func)(bool, void *), bool yn, void *arg)
-{
- _session.begin_reversible_command (name);
- XMLNode &before = audio_track()->get_state();
- bind (mem_fun (*audio_track(), func), yn, arg)();
- XMLNode &after = audio_track()->get_state();
- _session.add_command (new MementoCommand<AudioTrack>(*audio_track(), &before, &after));
- _session.commit_reversible_command ();
-}
-
void
RouteUI::reversibly_apply_track_boolean (string name, void (Track::*func)(bool, void *), bool yn, void *arg)
{
return FALSE;
}
-void
-RouteUI::route_removed ()
-{
- ENSURE_GUI_THREAD(mem_fun (*this, &RouteUI::route_removed));
- delete this;
-}
-
void
RouteUI::route_rename ()
{
void set_remote_control_id (uint32_t id, Gtk::CheckMenuItem* item);
void reversibly_apply_route_boolean (string name, void (ARDOUR::Route::*func)(bool, void*), bool, void *);
- void reversibly_apply_audio_track_boolean (string name, void (ARDOUR::AudioTrack::*func)(bool, void*), bool, void *);
void reversibly_apply_track_boolean (string name, void (ARDOUR::Track::*func)(bool, void*), bool, void *);
+
+ sigc::signal<void> GoingAway;
};
#endif /* __ardour_route_ui__ */
}
long
-Selection::toggle (jack_nframes_t start, jack_nframes_t end)
+Selection::toggle (nframes_t start, nframes_t end)
{
AudioRangeComparator cmp;
}
long
-Selection::add (jack_nframes_t start, jack_nframes_t end)
+Selection::add (nframes_t start, nframes_t end)
{
AudioRangeComparator cmp;
}
void
-Selection::replace (uint32_t sid, jack_nframes_t start, jack_nframes_t end)
+Selection::replace (uint32_t sid, nframes_t start, nframes_t end)
{
for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
if ((*i).id == sid) {
}
void
-Selection::remove (jack_nframes_t start, jack_nframes_t end)
+Selection::remove (nframes_t start, nframes_t end)
{
}
}
long
-Selection::set (TimeAxisView* track, jack_nframes_t start, jack_nframes_t end)
+Selection::set (TimeAxisView* track, nframes_t start, nframes_t end)
{
if ((start == 0 && end == 0) || end < start) {
return 0;
void set (const list<TimeAxisView*>&);
void set (RegionView*);
void set (std::vector<RegionView*>&);
- long set (TimeAxisView*, jack_nframes_t, jack_nframes_t);
+ long set (TimeAxisView*, nframes_t, nframes_t);
void set (ARDOUR::AutomationList*);
void set (ARDOUR::Playlist*);
void set (const list<ARDOUR::Playlist*>&);
void toggle (const list<TimeAxisView*>&);
void toggle (RegionView*);
void toggle (std::vector<RegionView*>&);
- long toggle (jack_nframes_t, jack_nframes_t);
+ long toggle (nframes_t, nframes_t);
void toggle (ARDOUR::AutomationList*);
void toggle (ARDOUR::Playlist*);
void toggle (const list<ARDOUR::Playlist*>&);
void add (const list<TimeAxisView*>&);
void add (RegionView*);
void add (std::vector<RegionView*>&);
- long add (jack_nframes_t, jack_nframes_t);
+ long add (nframes_t, nframes_t);
void add (ARDOUR::AutomationList*);
void add (ARDOUR::Playlist*);
void add (const list<ARDOUR::Playlist*>&);
void remove (const list<TimeAxisView*>&);
void remove (RegionView*);
void remove (uint32_t selection_id);
- void remove (jack_nframes_t, jack_nframes_t);
+ void remove (nframes_t, nframes_t);
void remove (ARDOUR::AutomationList*);
void remove (ARDOUR::Playlist*);
void remove (const list<ARDOUR::Playlist*>&);
void remove (boost::shared_ptr<ARDOUR::Redirect>);
- void replace (uint32_t time_index, jack_nframes_t start, jack_nframes_t end);
+ void replace (uint32_t time_index, nframes_t start, nframes_t end);
void clear_regions();
void clear_tracks ();
}
}
-void
-SendUI::send_going_away ()
-{
- ENSURE_GUI_THREAD (mem_fun (*this, &SendUI::send_going_away))
-
- delete this;
-}
-
void
SendUI::update ()
{
void
SendUI::fast_update ()
{
- if (_session.meter_falloff() > 0.0f) {
+ if (Config->get_meter_falloff() > 0.0f) {
gpm.update_meters ();
}
}
SendUIWindow::send_going_away ()
{
ENSURE_GUI_THREAD (mem_fun (*this, &SendUIWindow::send_going_away));
-
- delete this;
+ delete_when_idle (this);
}
sigc::connection screen_update_connection;
sigc::connection fast_screen_update_connection;
- void send_going_away ();
void ins_changed (ARDOUR::IOChange, void*);
void outs_changed (ARDOUR::IOChange, void*);
};
// this needs to be kept in sync with the ImportMode enum defined in editing.h and editing_syms.h.
static const char *import_mode_strings[] = {
- X_("Add to Region list"),
- X_("Add to selected Track(s)"),
- X_("Add as new Track(s)"),
- X_("Add as new Tape Track(s)"),
+ N_("Add to Region list"),
+ N_("Add to selected Track(s)"),
+ N_("Add as new Track(s)"),
+ N_("Add as new Tape Track(s)"),
0
};
+++ /dev/null
-P6
-# CREATOR: The GIMP's PNM Filter Version 1.0
-321 216
-255
-fffUUUffffffDDDDDDDDDUUUfffUUUUUUUUUUUUUUUDDDUUU333DDDDDDUUUUUUDDDDDDDDD333333333DDDDDDDDDDDDUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUUUUUUUDDD333UUUUUUDDDDDDDDD333DDDDDDDDDUUUUUUUUUUUUDDDUUUDDDUUUUUUUUUDDDUUUUUUDDDUUUUUUUUUUUUUUUUUUDDDDDDUUUDDDDDDDDDUUUDDDfffUUUUUUUUUDDDDDDDDDDDDDDDDDDUUUDDDUUUUUUffffffUUUDDD333UUUUUUUUUDDDDDDUUUUUUUUUDDDDDDUUUUUUUUUUUUfffUUUUUUUUUDDDDDDDDDDDDDDDUUUDDDUUUffffffUUUffffffDDDDDDDDDUUUfffUUUUUUUUUUUUUUUDDDUUU333DDDDDDUUUUUUDDDDDDDDD333333333DDDDDDDDDDDDUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUUUUUUUDDD333UUUUUUDDDDDDDDD333DDDDDDDDDUUUUUUUUUUUUDDDUUUDDDUUUUUUUUUDDDUUUUUUDDDUUUUUUUUUUUUUUUUUUDDDDDDUUUDDDDDDDDDUUUDDDf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D333UUU333333"""DDD333UUUDDDDDDDDDDDD333DDD333UUUUUUUUUDDDUUUUUUUUUUUUUUU333UUU333333DDDUUUDDDDDDUUUDDDUUUDDDDDDDDDDDDUUUDDDUUUUUUUUUUUUUUUDDD333DDDUUUDDD333DDDDDD333DDDDDDDDDfffUUUUUUUUUUUUffffffUUUUUUUUUUUUUUUUUUUUUUUUUUUfffUUUUUUDDDUUUUUUUUU333DDDUUUDDDUUUDDDffffffUUUUUUUUUUUUfffDDDUUUUUUDDDUUUDDDUUUDDDDDDDDDUUUDDDDDDUUUDDDUUUUUUDDDDDDDDDUUUUUUfffDDDDDDUUUUUUDDDDDDDDDDDDUUUDDDDDD333UUU333333"""DDD333UUUDDDDDDDDDDDD333DDD333UUUUUUUUUDDDUUUUUUUUUUUUUUU333UUU333333DDDUUUDDDDDDUUUDDDUUUDDDDDDDDDDDDUUUDDDUUUUUUUUUUUUUUUDDD333DDDUUUDDD333DDDDDD333DDDDDDDDDfffUUUUUUUUUUUUffffffUUUUUUUUUUUUUUUUUUUUUUUUUUUfffUUUUUUDDDUUUUUUUUU333DDDUUUDDDUUUDDDffffffUUUUUUUUUUUUfffDDDUUUUUUDDDUUUDDDUUUDDDDDDDDDUUUDDDDDDUUUDDDUUUUUUDDDDDDDDDUUUUUUfffDDDDDDUUUUUUDDDDDDDDDDDDUUUDDDDDD333UUU333333"""DDD333UUUDDDDDDDDDDDD333DDD333UUUUUUUUUDDDUUUUUUUUUUUUUUU333UUU333333DDDUUUDDDDDDUUUUUUUUUDDDUUUDDDDDD333DDDUUU333UUUfffUUUUUUUUUDDDUUUUUUDDDUUUDDDDDDfffUUUfffUUUUUUDDDUUUUUUUUUDDDDDDDDDDDD333DDDUUUDDDUUUUUU333DDDDDDDDD333DDDDDDDDDDDDUUUUUUUUUDDDDDD333UUUDDDDDDUUUDDDUUUDDDDDDDDDUUUUUUDDD333UUUDDDDDDUUUfffDDDDDDUUU333DDDDDDDDDUUUDDDUUUUUU333DDDfffUUUfffUUU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UUUUUUDDDUUUDDDUUUUUUDDDDDDDDDDDDUUUDDDUUUDDDUUUUUUUUUUUUDDDUUUDDDUUUDDDDDDUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUDDDUUU333DDDUUU333333DDDUUUDDDDDDDDDDDDUUUDDDDDDDDD333DDDDDD333UUUDDDUUUUUUUUUDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDUUUDDDDDDUUUUUUDDDUUUDDDUUUDDDDDD333333UUUiiiuuuqqqoooppp���������������DDDDDDUUU333DDD333DDDDDDDDDDDDDDDDDDDDDUUUDDDUUUDDDDDDDDD333333DDDDDDDDDDDDDDDfffDDDUUUUUUDDD333DDDUUUUUUDDDUUUDDDUUUUUUDDDDDDDDDDDDUUUDDDUUUDDDUUUUUUUUUUUUDDDUUUDDDUUUDDDDDDUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUDDDUUU333DDDUUU333333DDDUUUDDDDDDDDDDDDUUUDDDDDDDDD333DDDDDD333UUUDDDUUUUUUUUUDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDUUUDDDDDDUUUUUUDDDUUUDDDUUUDDDDDD333333UUUUUUUUUDDDUUUDDDUUUUUUDDDDDDUUUDDDDDDUUU333DDD333DDDDDDDDDDDDDDDDDDDDDUUUDDDUUUDDDDDDDDD333333DDDDDDDDDDDDDDDfffDDDUUUUUUDDD333DDDUUUUUUDDDUUUDDDUUUUUUDDDDDDDDDUUUDDDUUUDDDDDDUUUDDD333333DDDDDDUUUUUUDDDDDDDDDUUUDDDDDDDDD333UUUUUUUUUUUUDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUUUUDDDDDDDDDDDDDDD333DDDDDDDDD333333UUUUUUfffUUUDDD333DDDDDDUUUDDDDDDUUUDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDUUUUUUDDDUUUDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDfffDDDDDDDDDUUUUUUDDDDDDDDDUUUDDDDDDDDD333DDD333UUUUUU333DDDDDD333UUUUUUffffffDDDDDDDDDDDDDDDUUUDDDDDDUUUUUUDDDDDDDDDUUUDDDUUUDDDDDDUUUDDD333333DDDWWWrrr���sssWWW///444�����������߿��UUUUUUUUUDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUUUUDDDDDDDDDDDDDDD333DDDDDDDDD333333UUUUUUfffUUUDDD333DDDDDDUUUDDDDDDUUUDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDUUUUUUDDDUUUDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDfffDDDDDDDDDUUUUUUDDDDDDDDDUUUDDDDDDDDD333DDD333UUUUUU333DDDDDD333UUUUUUffffffDDDDDDDDDDDDDDDUUUDDDDDDUUUUUUDDDDDDDDDUUUDDDUUUDDDDDDUUUDDD333333DDDDDDUUUUUUDDDDDDDDDUUUDDDDDDDDD333UUUUUUUUUUUUDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUUUUDDDDDDDDDDDDDDD333DDDDDDDDD333333UUUUUUfffUUUDDD333DDDDDDUUUDDDDDDUUUDDDUUUUUUUUUDDDDDDUUUUUUDDDDDDDDD333DDDDDDDDDDDDUUUfffUUUUUUUUUUUUDDDDDDDDD333UUUUUUUUUDDD333DDDDDDUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUDDDUUUDDDDDDDDDUUUDDDDDDDDDUUUUUUDDDUUUUUUDDDDDD333UUUUUUDDDUUUUUUUUUUUUUUUUUUUUUDDDUUUDDDUUU333UUUDDDDDDUUUUUU333DDDUUUDDDDDDDDD333DDDUUUUUUUUUUUU333DDDDDDUUUDDDfffUUUfffDDDDDDUUUDDDUUUUUUDDDUUUUUUUUUUUUDDDDDDUUUUUUDDDDDDDDD333DDDDDDDDDDDDUUUfffUUUUUUUUUUUU\12\12\12mmm��������UUUDDD333DDDDDD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UU333UUUUUUUUU333DDDUUUUUUUUUDDDDDDUUUUUUUUUfffUUUDDDUUUDDDUUUUUUUUUUUUUUUDDDDDDDDDDDDUUU\0\0\0���������gggDDDDDDUUUDDDDDDDDDUUU333333DDDUUUDDDDDDDDD333333DDD333DDD333DDDDDDDDDDDDDDDUUUUUUDDDDDDUUUUUUUUU333UUUfffUUUUUUDDD333333DDD333UUUUUUDDDDDDDDDUUUfffUUUUUUDDDDDDDDDDDDUUUUUUDDDfffDDDDDDUUUUUUDDDDDDUUUDDDDDD333UUUUUUUUUDDDDDDUUUUUUUUUUUUDDDDDD333DDDDDDUUUDDDUUUUUUUUUDDDDDDUUUUUUDDDUUU333UUUUUUUUU333DDDUUUUUUUUUDDDDDDUUUUUUUUUfffUUUDDDUUUDDDUUUUUUUUUUUUUUUDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDDDDUUU333333DDDUUUDDDDDDDDD333333DDD333DDD333DDDDDDDDDDDDDDDUUUUUUDDDDDDUUUUUUUUU333UUUfffUUUUUUDDD333333UUUUUUUUUUUUUUUDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUDDDDDDDDDUUUDDDDDDDDDUUUDDDUUUDDDDDDDDDDDDDDDUUUDDD333DDDDDDDDDDDDDDDDDDDDD333DDDDDD333DDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDUUUUUUfffUUUUUUDDDDDDDDDDDDDDDUUUUUUDDDUUUDDDDDDUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUUDDDUUU333DDDUUUDDD333UUUDDDDDDDDDDDDUUUUUUUUUDDDDDDDDDDDDDDDUUUUUUDDDUUUDDDUUUUUUUUUDDDDDDDDDDDDUUUDDDUUUDDD333UUUDDDDDDDDDDDDUUUUUUUUUUUUUUUDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUDDDDDDDDDUUUDDD\0\0\0���������UUUDDDDDDDDDDDDDDDUUUDDD333DDDDDDDDDDDDD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UUUUUUUDDDUUUDDDUUUDDDDDDDDDDDDDDDSSSUUUDDDUUUDDDUUUDDDUUUUUUYYYhhh���sssDDDDDDUUUDDDUUUUUU333UUUUUUDDDUUUUUUDDDDDDUUUDDDDDDTTTeeesssvvv\7f\7f\7f>>>===�����ܼ��333DDDDDDDDDDDDUUUUUUDDD333UUUUUUUUUDDDUUUDDDDDDDDDDDDUUUDDDDDD333YYYVVVmmmsss|||vvv���ppp___UUUUUUfffUUUDDDUUUDDDUUUDDDDDDDDDUUUUUUDDDDDDUUUUUUUUUDDDDDDDDDDDDUUUUUUUUUfffDDDUUUUUUffffffDDDDDDUUUDDD333DDD333DDDDDDWWWDDDUUUUUUUUUUUUUUUUUUDDDUUUDDDUUUDDDDDDDDDDDDDDDDDDUUUDDDUUUUUUUUUDDDUUUUUUUUUDDDUUUWWW___yyy���DDDUUUUUU333UUUUUUDDDUUUUUUDDDDDDUUUDDDDDDDDDDDDDDDDDDDDD333UUUUUUUUUDDD333DDDDDDDDDDDDUUUUUUDDD333UUUUUUUUUDDDUUUDDDDDDDDDDDDUUUDDDDDD333UUUDDDUUUDDDUUUDDDUUUUUUUUUUUUUUUfffUUUDDDUUUDDDUUUDDDDDDDDD333DDDDDDUUUDDDDDDDDDUUUUUUUUUDDDDDDUUUDDDUUUUUUUUUDDDUUUDDDDDDUUUUUUDDD333DDDUUUDDDUUUUUUUUUDDDUUUUUUDDDDDDDDDUUUDDD333UUUDDDDDDUUU333fffUUUUUUDDDDDDUUUDDDDDDUUUDDDUUUDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDDDD333DDDDDDDDDUUUUUUUUUUUUUUUUUUUUUDDDGGGfff���������qqqlll�����������������DDDDDDDDDfffUUUDDDDDDDDD333DDDDDDDDDDDDDDDKKK```ppp������UUUfffUUUUUUUUUDDDEEERRRmmm���������gggUUUUUUDDD333DDDDDDUUUDDDDDDDDDUUUUUUUUUMMMwww���������tttkkk}}}sss������������DDD333DDDUUUDDDUUUUUUUUUDDDUUUUUUDDDDDDDDDUUUDDD333UUUDDDDDD[[[~~~���������qqqnnnggg�����������cccDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDDDD333DDDDDDDDDUUU```iiirrr����UUUDDDDDDDDD333DDDUUUDDDDDDDDDDDDDDDDDDCCCRRReee������DDDfffUUUDDDDDDDDD333DDDDDDDDDDDDDDDDDDUUUfffUUUTTTiiivvv����UUUDDDDDDDDDUUUDDDCCCeee��������ꔔ�333DDDDDDUUUDDDDDDDDDUUUUUUUUUDDDDDDUUUDDDUUUUUUUUUDDDUUUDDDDDDUUUUUUDDD333DDDUUUDDDUUUUUUUUUDDDUUUUUUDDDDDDDDDUUUDDD333UUUDDDDDDUUU333fffUUUUUUDDDDDDUUUDDDDDDUUUDDDUUUDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUDDDUUUDDDDDDUUU333UUUDDDUUUDDDUUUUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUDDDDDDUUUDDDUUUDDDDDDDDDUUUDDDUUUDDDDDDUUUUUUDDDDDD333UUUDDDDDDUUU333DDDDDDDDDDDDUUUUUUUUUfffUUUUUUUUUFFF\\\������hhh^^^UUUDDDPPP\1c\1c\1cbbb������������DDDDDDDDDffffffUUUDDDDDDDDDUUU```nnnnnn\\\ooo���������������fffUUUUUUDDDDDDCCCLLLlll������������UUUUUUDDDDDDDDDDDDDDDDDDDDDUUUDDDTTTvvv��Ŏ��aaaZZZUUUUUUUUU666***��������333UUUDDDUUUDDDUUUUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDFFFkkk������eeeMMMUUUDDDDDD999$$$[[[��������ڄ��UUUDDDDDD333UUUDDDDDDUUU333FFFZZZcccgggxxx\7f\7f\7f������������gggDDDDDDUUUUUUUUUUUUUUUDDD___ZZZiiilll}}}�����������릦�ffffffUUUDDDDDDDDDUUUDDDUUUDDDFFFoooooommmqqq{{{������������XXXDDDDDDDDDDDD444FFF[[[������������DDDDDDDDDDDDDDDDDDUUUDDDUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUDDDUUUDDDDDDUUU333UUUDDDUUUDDDUUUUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUDDDDDDUUUDDDUUUDDDDDDDDDUUUDDDUUUDDDDDDUUUUUUDDDDDD333UUUDDDDDDUUUDDDUUUDDDUUUDDDUUUUUUfffUUUDDDUUUUUUUUUUUUfffUUUfffUUUDDDUUUDDDUUUUUUDDDDDDUUUDDDUUUDDDUUUfffUUUUUUDDDUUUUUUUUUUUUUUUDDDUUUDDDDDDDDDDDDUUUUUUDDDDDDUUUDDDDDDUUUUUUUUUDDDDDDDDDDDDDDD333UUUDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDUUU333UUUDDD;;;}}}���yyy\\\DDDfffDDDDDDDDD"""666��������ؾ��DDDUUUDDDfffDDDUUUUUUDDDUUUPPP���~~~hhh<<<%%%�����������濿�DDDDDDUUUUUU===MMM������������������UUUDDD333DDDUUUDDDUUUDDDUUUUUU___������oooUUUUUUUUUfffUUUfffUUU\ f\ f\ f���������DDDDDDUUUDDDUUUDDDUUUfffUUUUUUDDDUUUUUUUUUUUUUUUDDDPPPccc��Ϗ��NNNUUUUUUDDDDDDUUUDDD>>>\1a\1a\1avvv���������kkkDDDDDD333UUUDDDDDDDDDDDDFFF���xxxGGG333xxx������������333333333DDDUUUDDDfffDDDGGGttt���\\\444PPP������������\7f\7f\7ffffDDDUUUUUUDDDUUUUUUUUUUUUSSS������eeeMMM'''ZZZ������������UUUDDDUUUUUUQQQ===�����������������뵵�DDDUUUDDDUUUDDDUUUUUUfffUUUDDDUUUUUUUUUUUUfffUUUfffUUUDDDUUUDDDUUUUUUDDDDDDUUUDDDUUUDDDUUUfffUUUUUUDDDUUUUUUUUUUUUUUUDDDUUUDDDDDDDDDDDDUUUUUUDDDDDDUUUDDDDDDUUUUUUUUUDDDDDDDDDDDDDDD333UUUDDDDDDDDDUUUDDDDDDDDDUUUUUUUUUDDDDDDfffUUUUUUUUUUUUUUUUUUDDDUUUDDDUUUDDDUUUUUUUUUDDDUUUDDDUUUDDDfffUUUUUUDDDUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDUUUDDD333DDDDDDUUU333DDDDDDDDD333DDDDDDDDDDDDDDDDDD333DDD333333DDDUUUDDDUUUUUUDDDUUUUUU:::������sssDDDUUUUUUUUUDDDDDDDDD---\1f\1f\1f���������DDDDDDUUUUUUfffDDDDDDDDDDDDUUUDDDDDDDDDUUU&&&RRR���������\7f\7f\7fDDDfffUUU>>>ttt���rrr^^^KKKEEENNN���fffDDDDDDUUUUUUDDDDDDDDDUUUUUUKKK������mmmUUUUUUUUUUUUUUUUUUDDDUUU\17\17\17���������UUUUUUDDDUUUDDDUUUDDDfffUUUUUUDDDUUUUUUUUUDDDDDDDDD999ddd��Λ��DDDUUUDDDUUUDDD333DDDDDDUUU\1c\1c\1c(((������������DDDDDDDDDDDDDDD333DDD333333DDDUUUDDD111666��������Ե��DDDDDDUUUDDDUUUUUUUUUDDDDDDDDDDDDDDD???\1a\1a\1a������������xxxUUUfffDDDDDDDDDDDDUUUDDDDDDDDDUUUUUUDDDDDDBBB\e\e\e��������ֿ��DDDDDDDDDQQQUUU������[[[TTTMMMBBB������UUUDDDDDDDDDUUUUUUUUUDDDDDDfffUUUUUUUUUUUUUUUUUUDDDUUUDDDUUUDDDUUUUUUUUUDDDUUUDDDUUUDDDfffUUUUUUDDDUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDUUUDDD333DDDDDDUUU333DDDDDDDDD333DDDDDDDDDDDDDDDDDD333DDD333DDDDDDUUUDDDDDDUUUUUUUUUDDDDDDUUUDDDUUUUUUDDDDDDUUUDDDDDDUUU333DDDDDDUUUDDDDDDUUUUUUfffUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUDDDUUUUUUUUUDDDDDDUUUUUU333DDDUUUDDDDDDDDDDDDUUUUUUDDDfffUUUfffDDDUUUUUUUUUDDDUUU999������yyyDDDUUUDDDUUUDDDDDDDDDUUU"""\1f\1f\1f���������kkkUUUDDDDDDfffUUUDDDUUUDDD333UUUUUUUUUDDDUUU---***���������xxxUUUDDDMMM������^^^DDDDDDUUUUUUCCC|||DDDDDDDDDDDD333DDDDDDUUUDDD555������bbbDDDDDDUUUDDDUUUUUUDDDDDDUUU\0\0\0���������DDDDDDUUUDDDDDDUUUUUUfffUUUDDDDDDDDDDDDDDDUUUDDD222FFF��ӵ��DDDDDDDDDUUUUUUDDDUUUUUUUUUDDDDDD\0\0\0������������mmmDDDDDDDDDUUUUUUDDDfffUUUfffDDDUUULLL\ 2\ 2\ 2��������뵵�DDDUUUDDDUUUDDDUUUDDDDDDDDDUUU333DDDDDD\1c\1c\1cttt���������DDDfffUUUDDDUUUDDD333UUUUUUUUUDDDUUUDDDDDDUUUDDD\0\0\0���������UUUDDDUUUXXX���jjjUUUDDDUUUDDDCCCmmmDDD333DDDDDDUUUDDDDDDUUUUUUUUUDDDDDDUUUDDDUUUUUUDDDDDDUUUDDDDDDUUU333DDDDDDUUUDDDDDDUUUUUUfffUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUDDDUUUUUUUUUDDDDDDUUUUUU333DDDUUUDDDDDDDDDDDDUUUUUUDDDDDDDDDDDDUUUDDDUUUfffUUUDDDDDDUUUUUUUUU333DDDDDDfff333DDDDDD333UUUUUUDDDUUUUUUUUUUUUfffUUUDDD333DDDDDD333DDDDDD333DDDUUUDDDUUUUUUUUUUUUUUUDDDUUUUUUUUUUUUDDDUUUDDDUUUDDDUUUUUUUUUDDDUUUDDDUUUUUUUUUUUUUUUUUUDDDUUUUUUUUUDDD555}}}���{{{UUUUUUDDDUUUDDDDDD333DDDDDD---'''���������DDDDDDDDDUUUUUUDDDDDDDDDDDDDDDUUUDDDDDDUUUDDD---\1f\1f\1f���������UUUUUURRRxxx���333DDDDDDUUUUUUDDDDDDDDDDDD333DDDDDDDDDDDDDDDUUU555}}}���qqqDDDDDDUUUUUUUUU333DDDDDDfff333\0\0\0���������UUUDDDUUUUUUUUUUUUfffUUUDDD333DDDDDD333DDDDDD+++888������dddUUUUUUUUUUUUDDDUUUUUUUUUUUUDDDUUU\17\17\17ZZZ���������DDDUUUDDDUUUUUUUUUUUUUUUUUUDDDUUUUUU\ 3\ 3\ 3���������\7f\7f\7fUUUUUUUUUDDDUUUDDDDDD333DDDDDDDDDDDDDDD\17\17\17eee���������UUUUUUDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDDDDUUUUUU\0\0\0��������UUU333HHH���___UUUDDDDDDDDDDDD333DDDDDDDDDDDDDDDUUUDDDUUUfffUUUDDDDDDUUUUUUUUU333DDDDDDfff333DDDDDD333UUUUUUDDDUUUUUUUUUUUUfffUUUDDD333DDDDDD333DDDDDD333DDDUUUDDDUUUUUUUUUUUUUUUDDDUUUUUUUUUUUUDDDUUUDDDUUUDDDUUUUUUUUUDDDUUUDDDUUUUUUUUUDDDUUUDDDDDDUUUUUUDDD333UUUUUUDDDUUUDDDDDDUUUDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDfffDDDDDDUUUDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDUUUUUUUUUUUUUUUDDDDDDDDDUUUDDDDDDDDDUUUUUUDDDDDDUUUDDDDDDUUUDDDDDDDDDUUUfffDDDDDD000ddd����DDDUUUUUUDDDDDD333UUUDDDDDDDDD&&&???�����ֹ��DDDUUUUUUDDDUUUDDDUUUDDDUUUDDDUUUDDDUUUDDDUUU999'''���������UUUUUUbbb���DDDUUUUUUUUUUUUDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUDDD)))ddd��؇��333UUUUUUDDDUUUDDDDDDUUUDDDDDDDDD\0\0\0�����似�DDDDDDDDDDDDDDDfffDDDDDDUUUDDDDDDUUUDDDDDD@@@\1c\1c\1c}}}��۟��DDDUUUDDDDDDUUUUUUUUUUUUUUUDDDDDDDDD999000������������DDDDDDUUUDDDDDDUUUDDDDDDDDDUUUfff---\ f\ f\ f���������\7f\7f\7fDDDUUUUUUDDDDDD333UUUDDDDDDDDDDDDUUUDDD"""eee���������DDDUUUDDDUUUDDDUUUDDDUUUDDDUUUDDDUUUUUUUUUDDDUUU\0\0\0���������XXXDDDQQQ���bbbUUUDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUDDDDDDUUUUUUDDD333UUUUUUDDDUUUDDDDDDUUUDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDfffDDDDDDUUUDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDUUUUUUUUUUUUUUUDDDDDDDDDUUUDDDDDDDDDUUUUUUDDDDDDUUUDDDDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUDDDDDDDDDDDDUUUUUUDDDDDDDDD333UUU333DDDDDDUUUDDDUUUDDDDDDUUU333DDDDDD333DDDDDDDDDUUUUUUDDDUUUDDDUUUfffDDDUUUUUUUUUDDD333DDDDDDDDD333UUUUUUDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUUUUUUUUUUDDD)))TTT��ӹ��UUUDDDUUUDDDDDDUUUDDDDDDDDD333DDD\17\17\17```������DDDUUUDDDDDDUUUUUUDDDDDDDDDDDDUUUUUUUUUUUUUUU///???���������UUUGGG���UUUDDDDDDDDDUUUUUU333DDDDDDDDDDDDDDDDDDUUUDDDDDD222???��ҿ��DDDUUUDDDDDDUUUDDDDDDDDDDDDUUUUUU---\ f\ f\ f������333DDDDDDUUUDDDUUUDDDDDDUUU333DDDDDD333DDD"""SSS������VVVUUUDDDUUUfffDDDUUUUUUUUUDDD333DDDDDD---\10\10\10������������DDDUUUDDDDDDUUUDDDDDDUUUUUUUUUUUU---\1f\1f\1f���������UUUDDDUUUDDDDDDUUUDDDDDDDDD333DDDDDDDDDDDD\1c\1c\1czzz�����DDDUUUUUUDDDDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUDDDLLL\ 4\ 4\ 4���������UUUAAA���UUUUUUUUU333DDDDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUDDDDDDDDDDDDUUUUUUDDDDDDDDD333UUU333DDDDDDUUUDDDUUUDDDDDDUUU333DDDDDD333DDDDDDDDDUUUUUUDDDUUUDDDUUUfffDDDUUUUUUUUUDDD333DDDDDDDDD333UUUUUUDDDDDDDDDUUUDDDDDDUUUDDDUUUDDDDDDDDDDDDUUUDDDUUUUUUUUUUUUUUUDDDDDDDDDDDDDDDUUUDDD333UUUDDDUUUDDDUUUUUUUUUUUUDDDDDDUUUUUUDDDUUUUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDfffDDDDDDDDDUUU333DDD333UUUDDDUUUUUUDDDDDD333222???������UUUDDDUUUDDDDDDDDDDDDDDDUUUDDDUUUDDD\ f\ f\ f���������\7f\7f\7fUUUDDDUUUUUUDDDDDDUUUUUUUUUDDDDDDDDDDDDDDDDDD\17\17\17WWW�����RRR���VVVUUUDDDUUUUUUUUUDDD333DDDDDDUUUUUUDDDDDDUUUUUU???%%%������vvvDDDUUUUUUUUUUUUUUUDDDDDDDDDDDDDDD999'''������UUUDDDUUUUUUUUUUUUDDDDDDUUUUUUDDDUUUUUUEEE"""�����ܡ��UUUUUUUUUUUUDDDUUUDDDDDDDDDDDDDDDDDDDDD===\0\0\0������������UUU333DDD333UUUDDDUUUUUUDDDDDD333---'''���������DDDUUUDDDDDDDDDDDDDDDUUUDDDUUUDDDDDDDDDDDD
-
-
-���������UUUDDDDDDUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDDDDD999\14\14\14���������UUUlll���UUUUUUDDD333DDDDDDUUUUUUDDDDDDUUUUUUDDDDDDDDDDDDUUUDDDUUUUUUUUUUUUUUUDDDDDDDDDDDDDDDUUUDDD333UUUDDDUUUDDDUUUUUUUUUUUUDDDDDDUUUUUUDDDUUUUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDfffDDDDDDDDDUUU333DDD333UUUDDDDDDDDDDDDUUUUUUUUUDDDDDDUUUUUUDDDUUUDDDDDDUUUUUUfff333DDDUUUUUUUUUDDDUUUfffUUUUUUUUU333ffffffDDDDDDUUUUUUUUUUUUUUUUUUUUUDDDUUUUUUDDDfff333DDDDDDUUUDDD333DDDDDDUUUDDDUUUDDDDDDUUUDDD333DDD333DDDDDDUUUDDDDDDDDD000%%%�����ڞ��333DDDUUUUUUUUUDDDUUUDDDDDDUUUDDDDDD\0\0\0���������vvvDDDUUUDDDUUUUUUUUUDDDUUUUUUDDDDDDUUUDDDUUUDDD\17\17\17eee������������UUUfffUUUUUUUUUUUUDDDDDDUUUDDDDDDDDDDDD333UUUDDD\15\15\15ccc������UUUDDDDDDUUUUUUDDDUUUDDDDDDUUUUUUfff\1c\1c\1c???������DDDUUUfffUUUUUUUUU333ffffffDDDDDDUUUUUU\1c\1c\1cccc������wwwDDDUUUUUUDDDfff333DDDDDDUUUDDD333DDDDDDUUU\0\0\0������������DDD333DDD333DDDDDDUUUDDDDDDDDD333&&&???�������DDDUUUUUUUUUDDDUUUDDDDDDUUUDDDDDDDDDDDDDDD\0\0\0���������XXXUUUUUUUUUDDDUUUUUUDDDDDDUUUDDDUUUDDDDDDDDDDDD999\1f\1f\1f�����㾾�������UUUUUUUUUDDDDDDUUUDDDDDDDDDDDD333UUUDDDDDDDDDUUUUUUUUUDDDDDDUUUUUUDDDUUUDDDDDDUUUUUUfff333DDDUUUUUUUUUDDDUUUfffUUUUUUUUU333ffffffDDDDDDUUUUUUUUUUUUUUUUUUUUUDDDUUUUUUDDDfff333DDDDDDUUUDDD333DDDDDDUUUDDDUUUDDDDDDUUUDDD333DDD333DDDDDDDDDDDDDDDUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUDDDUUUUUUDDDDDDUUUUUUUUUDDDUUUDDDUUUUUUDDD333UUUUUUUUUUUUDDDUUUDDDDDDUUUUUUUUUUUUDDDDDDDDDUUUUUUDDDUUUUUUUUUUUUUUUDDDDDDfffDDDUUUDDDDDDDDDUUUUUUDDDUUU333DDD\14\14\14ccc������DDDDDDUUUUUUDDDUUUDDDDDDDDDDDDDDDUUU===\ 4\ 4\ 4���������DDDDDD333UUUUUUDDDUUUUUUDDDDDDDDDUUUfffDDDDDDUUU\1c\1c\1czzz�����곳����DDDUUUUUUUUUDDDUUUUUUDDDDDDDDDDDDDDDUUU333DDDDDD...777������vvvUUUDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUUUU\17\17\17WWW������DDDUUUUUUUUUDDDUUUDDDUUUUUUDDD333UUUUUULLL\14\14\14���������DDDUUUUUUUUUUUUDDDDDDDDDUUUUUUDDDUUUUUUUUUUUU\0\0\0������������UUUDDDDDDDDDUUUUUUDDDUUU333DDDUUU\1c\1c\1cWWW������UUUUUUDDDUUUDDDDDDDDDDDDDDDUUUDDDDDDUUUUUU\0\0\0���������UUUUUUDDDUUUUUUDDDDDDDDDUUUfffDDDDDDUUUUUUDDDDDD999///�����ް�����wwwDDDUUUUUUDDDDDDDDDDDDDDDUUU333DDDDDDDDDDDDDDDUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUDDDUUUUUUDDDDDDUUUUUUUUUDDDUUUDDDUUUUUUDDD333UUUUUUUUUUUUDDDUUUDDDDDDUUUUUUUUUUUUDDDDDDDDDUUUUUUDDDUUUUUUUUUUUUUUUDDDDDDfffDDDUUUDDDDDDDDDUUUUUUDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDUUUUUUUUUUUUUUUDDDUUUDDDDDDDDDDDDUUUDDDfffUUUUUUDDDUUUUUUUUUUUUUUUUUUUUUDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDUUUDDDDDDUUUDDDUUUUUUUUUDDDUUUUUUUUUDDDDDDDDDDDDDDDUUUDDDUUUUUUUUUBBB(((�����ۡ��DDDDDDUUUDDDUUUDDDDDDDDDDDDDDDDDDDDD---\1c\1c\1c���������UUU333UUUDDDDDDUUUfffUUUDDDUUUfffUUUUUUDDDUUUUUU\b\b\b�����������풒�UUUDDDDDDDDDDDDDDDUUUDDDDDDDDDUUUDDDDDDDDDDDDDDD\11\11\11}}}������DDDDDDDDDDDDUUUDDDDDDDDDUUUUUUUUUUUUUUU\17\17\17���������DDDDDDUUUDDDfffUUUUUUDDDUUUUUUUUUUUUUUU&&&KKK������DDDDDDUUUDDDDDDUUUDDDUUUDDDDDDUUUDDDUUUUUUUUU\0\0\0������������DDDDDDDDDDDDUUUDDDUUUUUUUUUUUUDDD\17\17\17zzz������\7f\7f\7fUUUDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDfffUUU\0\0\0���������DDDDDDUUUfffUUUDDDUUUfffUUUUUUDDDUUUUUUDDDDDDUUU&&&GGG������������DDDDDDDDDUUUDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDUUUUUUUUUUUUUUUDDDUUUDDDDDDDDDDDDUUUDDDfffUUUUUUDDDUUUUUUUUUUUUUUUUUUUUUDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDUUUDDDDDDUUUDDDUUUUUUUUUDDDUUUUUUUUUDDDDDDDDDDDDDDDUUUDDDUUUfffDDDUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUUDDDDDDUUUUUUDDDUUUDDDUUUDDDUUU333DDDDDDDDDUUUDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUfffDDDDDDDDDDDDUUUUUUDDDUUUDDDDDDDDDDDDDDDUUUDDDUUU333DDDUUUDDDUUUUUUDDDUUUDDD\ f\ f\ fkkk������WWWDDDDDDUUUDDDUUUDDDDDDUUUUUUDDDUUUDDD&&&???���������UUUUUUUUUUUUUUUUUUDDDUUUUUUUUUDDDUUUDDDDDDUUUUUU\0\0\0������������WWWUUUUUUfffUUUUUUUUUUUUDDD333UUUDDDUUUDDDfffDDD&&&555�����㫫�UUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUU\0\0\0���������DDDUUUDDDUUUDDDUUU333DDDDDDDDDUUUDDDDDD\b\b\b���������UUUUUUUUUfffDDDDDDDDDDDDUUUUUUDDDUUUDDDDDDDDD\0\0\0������������333DDDUUUDDDUUUUUUDDDUUUDDDDDDDDD\b\b\b���������kkkUUUDDDUUUDDDDDDUUUUUUDDDUUUDDDDDDDDDDDDBBB ���������UUUUUUUUUDDDUUUUUUUUUDDDUUUDDDDDDUUUUUUUUUUUUUUU\1c\1c\1c^^^��������袢�UUUUUUUUUUUUDDD333UUUDDDUUUDDDfffDDDDDDUUUfffDDDUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUUDDDDDDUUUUUUDDDUUUDDDUUUDDDUUU333DDDDDDDDDUUUDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUfffDDDDDDDDDDDDUUUUUUDDDUUUDDDDDDDDDDDDDDDUUUDDDUUU333DDDUUUDDDUUUUUUUUUDDDUUUDDDUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUU333DDDUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUfffDDDDDDDDDUUUDDDUUUDDDUUUUUUUUUUUUUUUDDD333UUUUUUDDDDDDDDDUUUDDD333DDDUUUUUUUUUDDD333DDDDDDDDDDDDUUUUUUDDDDDD555(((���������DDDDDDUUUUUUUUUUUUUUUDDDUUUDDD333DDDDDD\17\17\17```������\7f\7f\7fDDDDDDUUUDDDDDDUUUUUUDDDDDDDDDDDDDDDDDDUUUUUUDDD\0\0\0��������ٻ��ffffffUUUDDDUUUDDDfffDDDDDDDDDDDDDDDUUUUUUDDDDDD\13\13\13|||������jjjUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUU333\0\0\0�����㽽�DDDDDDDDDUUUDDDDDDDDDDDDUUUfffDDDDDD===\f\f\f���������xxxUUUUUUUUUUUUDDD333UUUUUUDDDDDDDDDUUUDDD333DDD\0\0\0��������ܶ��DDDDDDDDDDDDUUUUUUDDDDDDDDDDDDDDD\0\0\0���������UUUUUUUUUUUUUUUDDDUUUDDD333DDDDDDDDDDDDDDD---\19\19\19�����DDDDDDUUUUUUDDDDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUDDD\1c\1c\1c������������DDDUUUDDDfffDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUUUUDDDUUUDDDUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUU333DDDUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUfffDDDDDDDDDUUUDDDUUUDDDUUUUUUUUUUUUUUUDDD333UUUUUUDDDDDDDDDUUUDDD333DDDUUUUUUUUUDDD333DDDDDDDDDDDDUUUUUUDDDDDDDDDDDDUUUUUUDDDDDDUUUUUUUUUUUUDDDUUUDDDDDDDDDfffUUUDDDDDDDDDUUUUUUUUUDDDDDDUUUUUUfffDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUDDDUUUDDDDDDDDD333DDDUUUUUUDDDDDD333333DDDDDDDDDUUUUUUUUU333DDD333\ f\ f\ fkkk�����采�DDDUUUDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDUUU\ f\ f\ f���������UUUDDDUUU333DDDUUUUUUDDDUUUUUUUUUUUUUUUUUUUUU999\ f\ f\ f���������ffffffDDDDDDDDDDDDUUUDDDDDDDDDUUUDDDDDDDDD333555\19\19\19���������DDDUUUUUUDDDDDDUUUUUUUUUUUUDDDUUUDDDDDD555 �����뻻�DDDUUUUUUUUUDDDDDDUUUUUUfffDDDDDDDDD&&&222���������UUUDDDDDDUUUDDDDDDUUUDDDUUUDDDDDDDDD333DDDUUUUUU\0\0\0��������뼼�DDDDDDUUUUUUUUU333DDD333DDDDDDDDD\0\0\0���������DDDUUUDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDUUU999888������333DDDUUUUUUDDDUUUUUUUUUUUUUUUUUUUUUUUUDDDUUUfff\0\0\0��������ٷ��DDDDDDDDDUUUDDDDDDDDDUUUDDDDDDDDD333DDDDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUUUUUUUUUUDDDUUUDDDDDDDDDfffUUUDDDDDDDDDUUUUUUUUUDDDDDDUUUUUUfffDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUDDDUUUDDDDDDDDD333DDDUUUUUUDDDDDD333333DDDDDDDDDUUUUUUUUU333DDDUUUDDDUUUfffDDDUUUUUUDDDUUUUUUUUUDDDUUUDDDDDDDDDUUUDDDDDDDDDUUUUUUUUUUUUDDDDDDDDDUUUUUUDDDDDDDDDDDDDDDDDDUUUDDDUUUDDDDDDDDDUUUDDDDDDDDD333DDDDDD333UUUDDDUUUUUUDDD333DDDDDDUUUDDD333UUUDDDDDD333DDD===
-
-
-���������WWWUUUDDDfffDDDDDDUUUDDDDDDUUUDDDDDDUUUUUU\0\0\0���������UUUUUUUUUUUUDDDDDDUUUUUUUUUffffffUUUDDDUUUUUUUUU---'''���������fffUUUUUUUUUUUUDDDUUUUUUDDDDDDDDDUUUDDDDDD333DDD&&&RRR������UUUfffDDDUUUUUUDDDUUUUUUUUUDDDUUUDDDDDD---!!!������\7f\7f\7fUUUUUUUUUUUUDDDDDDDDDUUUUUUDDDDDDDDD\17\17\17jjj���������UUUDDDDDDDDDUUUDDDDDDDDD333DDDDDD333UUUDDDUUUUUU\0\0\0��������DDD333UUUDDDDDD333DDDDDDDDDDDD---\ f\ f\ f�������fffDDDDDDUUUDDDDDDUUUDDDDDDUUUUUUUUUUUUDDD\1c\1c\1cPPP������xxxDDDDDDUUUUUUUUUffffffUUUDDDUUUUUUUUUDDDUUUffffff\0\0\0���������UUUDDDUUUUUUDDDDDDDDDUUUDDDDDD333DDDUUUDDDDDDUUUDDDUUUfffDDDUUUUUUDDDUUUUUUUUUDDDUUUDDDDDDDDDUUUDDDDDDDDDUUUUUUUUUUUUDDDDDDDDDUUUUUUDDDDDDDDDDDDDDDDDDUUUDDDUUUDDDDDDDDDUUUDDDDDDDDD333DDDDDD333UUUDDDUUUUUUDDD333DDDDDDUUUDDD333UUUDDDDDD333DDDDDDUUUUUUDDDDDDUUUDDDUUUDDDDDDDDDUUU333DDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDDDDDDDDDDDDDfffDDDfffUUUUUUDDDDDDUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUUUU&&&:::���������UUUDDDUUUDDDDDDDDDDDDDDDUUUDDDUUUUUUDDD===\ 4\ 4\ 4���������UUUDDDDDDDDDUUUUUUUUUDDDUUUUUUDDDDDDDDDUUUDDDUUU///???�����ظ��fffUUUDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDUUU
-
-
-���������UUUDDDDDDUUUDDDUUUDDDDDDDDDUUU333DDDDDD///???������DDDDDDDDDDDDDDDUUUUUUUUUDDDDDDDDDDDD\b\b\b������������UUUDDDDDDUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDD555 ���������\7f\7f\7fDDDUUUUUUDDDDDDUUUUUUDDDUUUUUU---///������DDDDDDDDDDDDDDDUUUDDDUUUUUUDDDDDDDDD333UUU\17\17\17���������DDDUUUUUUUUUDDDUUUUUUDDDDDDDDDUUUDDDUUUUUUfffUUULLL\ 4\ 4\ 4���������DDDDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUUUU333DDDDDDUUUUUUDDDDDDUUUDDDUUUDDDDDDDDDUUU333DDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDDDDDDDDDDDDDfffDDDfffUUUUUUDDDDDDUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUDDDDDDDDDUUUUUUUUUUUUDDDDDDUUUDDDDDDDDD333DDDUUUUUUDDDDDDDDDUUUDDD333DDDDDDDDDUUUDDDUUU333333333DDDUUUfffUUUUUUUUUUUUDDDDDDDDD333333DDDDDD333DDDUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDUUUUUUUUUUUUfffDDD\ f\ f\ f|||�����饥�DDDUUUUUUDDDUUUUUUUUUUUUUUUDDDUUUDDDDDD---\1c\1c\1c�����Ի��UUUDDDUUUUUUUUU333DDDDDDUUUDDDDDDDDDUUUUUUUUUUUU\1c\1c\1c```������fffDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDUUUBBB\18\18\18���������WWWUUUUUUUUUUUUDDDDDDUUUDDDDDDDDD333DDDUUU\1c\1c\1c```������xxxDDD333DDDDDDDDDUUUDDDUUU333333333DDD\0\0\0������������UUUDDDDDDDDD333333DDDDDD333DDDUUUDDDUUUDDDDDD---\19\19\19���������gggDDDUUUUUUUUUUUUfffDDDDDDUUUUUU&&&GGG������DDDUUUUUUUUUUUUUUUDDDUUUDDDDDDDDD333333UUU\0\0\0���������UUUUUU333DDDDDDUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUU---\1c\1c\1c���������DDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDUUUUUUDDDDDDDDDDDDDDDUUUUUUUUUUUUDDDDDDUUUDDDDDDDDD333DDDUUUUUUDDDDDDDDDUUUDDD333DDDDDDDDDUUUDDDUUU333333333DDDUUUfffUUUUUUUUUUUUDDDDDDDDD333333DDDDDD333DDDUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDUUUUUUUUUUUUfffDDDUUUDDDUUUUUU333UUU333DDDDDDDDDUUUUUUDDDDDDUUUUUUDDD333UUU333DDDDDDUUUDDDfffUUU333DDDDDDDDDUUUUUUUUUUUUDDDDDDUUU333DDDDDDDDDDDDDDDDDD333UUUfffUUUUUUDDDUUUUUUUUUUUUDDDDDDUUUUUUUUUDDDDDDUUUDDDDDD===\ 6\ 6\ 6��������UUUUUUDDDUUUDDDDDDUUUUUUUUUUUUDDDDDD333&&&???�����뼼�DDDDDDDDDDDDDDDUUUffffffUUUUUUDDDUUUfffUUUUUUDDD\ f\ f\ f���������fffDDDDDDUUUDDDUUUUUUDDDDDDDDDUUUDDDDDDDDDDDD\1e\1e\1eIII���������DDDUUUUUU333UUU333DDDDDDDDDUUUUUUDDDDDDUUU\13\13\13���������333DDDDDDUUUDDDfffUUU333DDDDDDDDDUUU999\ f\ f\ f���������333DDDDDDDDDDDDDDDDDD333UUUfffUUUUUUDDDUUUUUU999///���������UUUUUUDDDDDDUUUDDDDDDDDDUUUUUUDDD\11\11\11qqq������\7f\7f\7fUUUDDDDDDUUUUUUUUUUUUDDDDDD333DDDDDDDDD[[[\ 4\ 4\ 4���������DDDDDDUUUffffffUUUUUUDDDUUUfffUUUUUUDDDDDDUUUUUU///???�����饥�UUUDDDUUUUUUDDDDDDDDDUUUDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDUUUUUU333UUU333DDDDDDDDDUUUUUUDDDDDDUUUUUUDDD333UUU333DDDDDDUUUDDDfffUUU333DDDDDDDDDUUUUUUUUUUUUDDDDDDUUU333DDDDDDDDDDDDDDDDDD333UUUfffUUUUUUDDDUUUUUUUUUUUUDDDDDDUUUUUUUUUDDDDDDUUUDDDDDDDDDUUUDDDDDDDDDDDDUUU333DDDDDDUUUUUUDDDDDDUUUUUUDDDDDDDDDDDDDDDDDD333DDDUUUDDDDDDDDDUUUDDD333UUUUUUUUUUUUDDDUUUDDDDDDDDD333DDD333DDDDDDDDDfffDDDUUUDDDUUUUUUfffUUUDDDDDDUUUUUUDDDUUUDDDUUUUUUUUUUUU999+++���������UUUUUUDDDDDDUUUUUUUUUDDDUUUDDDUUU333DDDDDD\17\17\17sss�����DDDDDDDDDUUUUUUUUUUUUUUUDDDDDDUUUUUUUUUUUUDDDDDD\0\0\0���������UUUfffUUUUUUDDDUUUDDDDDDDDDUUUUUUDDDUUU333DDDDDD\ f\ f\ f������������DDDDDDDDDDDDUUU333DDDDDDUUUUUUDDDDDDUUUUUU\ 1\ 1\ 1���������DDDDDD333DDDUUUDDDDDDDDDUUUDDD333UUU999\1f\1f\1f���������DDDDDD333DDD333DDDDDDDDDfffDDDUUUDDDUUUUUUfff&&&GGG�����㫫�DDDUUUDDDUUUUUUUUUUUUUUUUUUUUUDDD\b\b\b���������DDDUUUUUUUUUDDDUUUDDDUUU333DDDDDDDDDDDDUUU---###�����㽽�UUUUUUUUUUUUUUUDDDDDDUUUUUUUUUUUUDDDDDDUUUUUUUUU\1c\1c\1cWWW�����DDDUUUDDDDDDDDDUUUUUUDDDUUU333DDDDDDDDDDDDUUUDDDUUUDDDDDDDDDDDDUUU333DDDDDDUUUUUUDDDDDDUUUUUUDDDDDDDDDDDDDDDDDD333DDDUUUDDDDDDDDDUUUDDD333UUUUUUUUUUUUDDDUUUDDDDDDDDD333DDD333DDDDDDDDDfffDDDUUUDDDUUUUUUfffUUUDDDDDDUUUUUUDDDUUUDDDUUUUUUUUUUUU333333333DDDDDDUUUUUUDDDDDDUUUDDDDDDDDDDDD333333DDDDDD333DDD333333DDDDDDDDDUUUDDDDDDDDD333DDDUUUUUUUUUDDDDDDDDDDDDDDD333DDD333DDDUUUDDDUUUDDDUUUDDDUUUUUUDDDDDD333DDDUUUUUUDDDDDD333UUUUUUUUUDDD333\1c\1c\1cYYY���������UUUDDDUUUUUUUUUDDDDDDUUUUUUDDDDDDDDDDDDUUU\0\0\0���������DDDUUUUUUUUUUUUUUUDDDDDDDDDUUUUUUUUUDDDUUUDDDUUU\0\0\0���������DDDDDD333UUUDDDDDDDDDDDDUUU333DDDDDD333DDD333UUU\0\0\0���������333DDDDDDUUUUUUDDDDDDUUUDDDDDDDDDDDD333"""\1e\1e\1e���������333333DDDDDDDDDUUUDDDDDDDDD333DDDUUU999888���������DDD333DDD333DDDUUUDDDUUUDDDUUUDDDUUUUUUDDDDDD\11\11\11qqq������jjjDDD333UUUUUUUUUDDD333UUUUUUDDDDDD\0\0\0���������UUUUUUDDDDDDUUUUUUDDDDDDDDDDDDUUUDDDUUUDDD\1e\1e\1eYYY���������UUUUUUUUUDDDDDDDDDUUUUUUUUUDDDUUUDDDUUUUUUUUUfff\17\17\17���������gggDDDDDDDDDDDDUUU333DDDDDD333DDD333UUUDDDDDDDDD333333333DDDDDDUUUUUUDDDDDDUUUDDDDDDDDDDDD333333DDDDDD333DDD333333DDDDDDDDDUUUDDDDDDDDD333DDDUUUUUUUUUDDDDDDDDDDDDDDD333DDD333DDDUUUDDDUUUDDDUUUDDDUUUUUUDDDDDD333DDDUUUUUUDDDDDD333UUUUUUUUUDDD333333DDDDDDUUUUUUUUUDDDDDDDDDDDD333UUUUUUDDDDDDDDDDDDDDDUUUDDD333UUUDDDDDDUUUUUUUUUDDD333DDDDDDDDDUUUDDDDDDDDDDDD333333DDD333333UUUUUUUUUUUUDDDUUUDDDDDDDDDUUUDDDDDDDDDDDD333DDD333DDDUUUUUUDDDDDDDDD\ f\ f\ f��������Ի��UUUUUUUUUUUUUUUDDDDDDUUUUUUDDDDDDDDD333555\10\10\10���������DDDDDDDDDfffDDDDDDDDDUUUUUUUUUUUUDDDUUUDDDUUU999\ f\ f\ f�����滻�UUUUUUUUUUUUDDDDDDUUUDDD333333DDD333333DDDUUU555 ���������DDDUUUUUUUUUDDDDDDDDDDDD333UUUUUUDDDDDD\1e\1e\1eYYY�����ܼ��333UUUDDDDDDUUUUUUUUUDDD333DDDDDDDDD\1c\1c\1cPPP���������uuu333DDD333333UUUUUUUUUUUUDDDUUUDDDDDDDDDUUUDDD\b\b\b���������DDD333DDDUUUUUUDDDDDDDDDDDD333DDD===\ 4\ 4\ 4���������UUUUUUDDDDDDUUUUUUDDDDDDDDD333DDDUUU333333
-
-
-���������\7f\7f\7ffffDDDDDDDDDUUUUUUUUUUUUDDDUUUDDDUUUUUUUUUUUUDDD\0\0\0���������UUUDDDDDDUUUDDD333333DDD333333DDDUUUDDDDDDUUUDDD333DDDDDDUUUUUUUUUDDDDDDDDDDDD333UUUUUUDDDDDDDDDDDDDDDUUUDDD333UUUDDDDDDUUUUUUUUUDDD333DDDDDDDDDUUUDDDDDDDDDDDD333333DDD333333UUUUUUUUUUUUDDDUUUDDDDDDDDDUUUDDDDDDDDDDDD333DDD333DDDUUUUUUDDDDDDDDD333UUUDDDUUUDDDDDDDDD333DDDDDDUUUDDDUUU333UUUUUUUUUUUUDDD333DDD333DDDDDDUUUUUUUUUDDDDDDDDDUUUDDDDDD333DDD333333DDDDDD333UUUDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUDDDUUUDDDUUUUUUDDDUUUUUUUUUfffDDDDDDUUUDDD\0\0\0��������귷�DDDUUUUUUUUUUUUDDDUUUUUUDDDDDDDDDUUUUUU///AAA���������UUUDDDDDDffffffDDDUUUUUUDDDUUUDDDUUUDDDUUUUUUDDD---888�����UUUUUUUUUDDDDDD333333DDD333333333333333333DDD"""111���������DDDUUUDDDDDDDDD333DDDDDDUUUDDDUUU333UUU
-
-
-��������踸�DDD333DDDDDDUUUUUUUUUDDDDDDDDDUUUDDD\17\17\17eee���������DDD333UUUDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUDDDLLL\ 5\ 5\ 5�����⢢�UUUUUUUUUfffDDDDDDUUUDDDDDDDDDDDD999###���������UUUUUUDDDUUUUUUDDDDDDDDDUUUUUUUUUDDD333555'''���������fffDDDUUUUUUDDDUUUDDDUUUDDDUUUUUUDDDDDDUUUfffUUU\0\0\0���������DDDDDD333333DDD333333333333333333DDD333DDDDDDDDD333UUUDDDUUUDDDDDDDDD333DDDDDDUUUDDDUUU333UUUUUUUUUUUUDDD333DDD333DDDDDDUUUUUUUUUDDDDDDDDDUUUDDDDDD333DDD333333DDDDDD333UUUDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUDDDUUUDDDUUUUUUDDDUUUUUUUUUfffDDDDDDUUUDDD333DDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDDDDUUUDDDDDDDDDDDDUUUUUUUUUDDD333333UUUDDDUUUDDDUUUDDDDDDDDD333DDD333DDDUUU333DDDDDDUUUDDDUUUUUUDDDDDDDDDUUUUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUDDDUUU555 ���������UUUUUUUUUUUU333DDDUUUUUUUUUUUUDDDDDDUUU\ f\ f\ f|||���������DDDUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUDDDUUUfffUUU\1c\1c\1cYYY������UUUUUUUUUDDDDDDDDD333DDDDDD333333DDDDDD333333\11\11\11PPP���������kkkUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUBBB\18\18\18��������뻻�DDDDDDUUUUUUUUUDDD333333UUUDDDUUUDDD\1c\1c\1ceee���������333DDDUUU333DDDDDDUUUDDDUUUUUUDDDDDDDDDUUU999+++������fffUUUUUUUUUUUUUUUDDDUUUDDDDDDUUUDDD\1e\1e\1eGGG���������UUU333DDDUUUUUUUUUUUUDDDDDDUUUDDDDDDDDD\14\14\14kkk���������DDDDDDDDDUUUUUUUUUUUUUUUDDDUUUfffUUUUUUfffUUU999\17\17\17���������DDDDDDDDD333DDDDDD333333DDDDDD333333333DDDDDD333333DDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDDDDUUUDDDDDDDDDDDDUUUUUUUUUDDD333333UUUDDDUUUDDDUUUDDDDDDDDD333DDD333DDDUUU333DDDDDDUUUDDDUUUUUUDDDDDDDDDUUUUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUDDDUUUDDDDDDUUUDDDDDDDDDDDDUUUDDDUUUUUUDDDDDDUUUDDDDDDDDDDDDDDD333DDD333DDDUUUDDDUUUDDDDDDUUUDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUDDD333UUUDDDDDDUUUUUUDDDDDDDDDDDDUUUUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDD333DDDDDD---\19\19\19���������UUUDDDUUU333DDDUUUUUUDDDDDD333UUUDDD555(((������������UUUUUUUUUUUUDDDUUUDDDUUUUUUUUUDDDDDDDDDDDDUUUDDD\ f\ f\ f���������UUUUUU333DDD333333UUUDDD333UUUDDDDDDDDDDDDDDD\17\17\17ooo���������UUUDDDDDDDDDDDDUUUDDDUUUUUUDDDDDDUUUDDD\1e\1e\1e[[[���������\7f\7f\7f333DDDUUUDDDUUUDDDDDDUUUDDDDDDDDDDDD\1c\1c\1ceee���������DDD333UUUDDDDDDUUUUUUDDDDDDDDDDDDUUUUUUUUU\1c\1c\1ckkk������DDDDDDDDDDDDDDD333DDDDDDDDDUUUUUUDDD\1c\1c\1cqqq������333DDDUUUUUUDDDDDD333UUUDDDDDDDDDDDD;;;777������������gggDDDUUUDDDUUUUUUUUUDDDDDDDDDDDDUUUDDDDDDUUUUUU///???�����뵵�DDD333333UUUDDD333UUUDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDUUUDDDDDDDDDDDDUUUDDDUUUUUUDDDDDDUUUDDDDDDDDDDDDDDD333DDD333DDDUUUDDDUUUDDDDDDUUUDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUDDD333UUUDDDDDDUUUUUUDDDDDDDDDDDDUUUUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDD333DDDDDDDDDUUUUUUUUUDDDDDDDDDfffDDDUUUUUUUUUUUUUUU333DDDUUUDDDDDDDDDDDDDDDUUUDDDUUU333DDDDDDDDD333DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDDDDUUUUUUUUUUUUDDDfffUUUUUUUUUUUUDDD333DDDDDDDDDDDDUUUDDDUUUUUU999888���������DDDUUUDDDDDDDDDUUUUUUDDDDDDUUUUUUUUU\ f\ f\ fkkk������������fffUUUUUUUUUUUUDDDDDDUUUDDDDDDDDDUUUDDDUUUUUUDDD\0\0\0���������UUUUUUDDDDDDUUU333DDDDDDUUUDDDDDD333DDDUUUUUUDDD\13\13\13������������UUUUUUDDDDDDDDDfffDDDUUUUUUUUUUUUUUU///\1c\1c\1c������������DDDUUUDDDUUU333DDDDDDDDD333DDDDDDDDD\17\17\17eee���������DDDUUUUUUUUUDDDDDDUUUUUUUUUUUUDDDfffUUULLL\ e\ e\ e������YYYDDDDDDDDDDDDUUUDDDUUUUUUUUUUUUDDDUUU
-
-
-���������DDDDDDUUUUUUDDDDDDUUUUUUUUUDDDDDDAAAAAA{{{������������UUUUUUDDDDDDUUUDDDDDDDDDUUUDDDUUUUUUDDDUUUUUUfff\1c\1c\1c```������\7f\7f\7fUUU333DDDDDDUUUDDDDDD333DDDUUUUUUDDDUUUUUUUUUDDDUUUUUUUUUDDDDDDDDDfffDDDUUUUUUUUUUUUUUU333DDDUUUDDDDDDDDDDDDDDDUUUDDDUUU333DDDDDDDDD333DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDDDDUUUUUUUUUUUUDDDfffUUUUUUUUUUUUDDD333DDDDDDDDDDDDUUUDDDUUUUUUUUUUUUDDDDDDDDDfffUUUUUUUUUDDDUUUUUUUUUDDD333DDDDDDUUUUUUDDD333DDDUUUUUUDDDDDDUUUDDDDDDDDDUUUUUUDDDDDDDDDDDDDDDDDDDDD333fffUUUUUUUUUUUUDDDUUUUUUDDDUUUUUUUUU333333DDDDDD333DDDDDDUUUDDDUUUUUUUUUUUU\1c\1c\1cPPP���������UUUDDDUUUDDDDDDDDDUUUDDDDDDUUUDDD888<<<���������������UUUDDDUUUDDDDDDUUUDDDUUUUUUfffUUUDDDUUUUUUUUU===\ 4\ 4\ 4���������DDDDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDUUUUUUDDDDDDUUU\0\0\0������������DDDDDDDDDfffUUUUUUUUUDDDUUUUUUUUUDDD\1f\1f\1fZZZ������������uuuDDDUUUUUUDDDDDDUUUDDDDDDDDDUUUUUUDDD\17\17\17eee���������333fffUUUUUUUUUUUUDDDUUUUUUDDDUUUUUUUUU\1c\1c\1cJJJ��ל��333DDDDDDUUUDDDUUUUUUUUUUUUUUUUUUUUUUUU\0\0\0���������DDDDDDDDDUUUDDDDDDUUUDDDDDDDDDRRR```���TTTZZZ���������DDDDDDUUUDDDUUUUUUfffUUUDDDUUUUUUUUUDDDUUUUUUUUU\ f\ f\ f���������DDDDDDDDDUUUDDDDDDDDDUUUUUUDDDDDDUUUDDDDDDUUUDDDUUUDDDDDDDDDfffUUUUUUUUUDDDUUUUUUUUUDDD333DDDDDDUUUUUUDDD333DDDUUUUUUDDDDDDUUUDDDDDDDDDUUUUUUDDDDDDDDDDDDDDDDDDDDD333fffUUUUUUUUUUUUDDDUUUUUUDDDUUUUUUUUU333333DDDDDD333DDDDDDUUUDDDUUUUUUUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUUDDD333DDDDDDUUUDDDDDD333DDDUUUDDDDDDDDDUUUUUUDDDDDDUUUDDDDDDDDD333DDDDDDDDD333DDDDDDUUUUUUDDDUUUUUUDDDUUUDDDDDDfffUUUUUUDDDDDDDDD333333DDDUUUDDDUUUUUUDDDDDDUUU\1c\1c\1ceee���������UUUDDDDDDUUUUUUDDDUUUDDDDDDDDDBBBgggzzzMMM������������DDDDDDDDDDDDUUUDDDUUUffffffDDDUUUUUUUUUDDDDDD999###���������DDDDDDUUUDDD333DDDDDDUUUDDDDDDUUUDDDDDDUUUDDDUUU\0\0\0������������DDDDDDUUUUUUUUUUUUUUUUUUUUUUUUDDD000���```FFF���������UUUDDDDDDDDDUUUUUUDDDDDDUUUDDDDDDDDD\11\11\11GGG��������翿�DDDUUUUUUDDDUUUUUUDDDUUUDDDDDDfffUUUUUU\11\11\11������FFF333DDDUUUDDDUUUUUUDDDDDDUUUUUUUUUDDDBBB ���������UUUUUUDDDUUUDDDDDDDDDDDDDDDCCCooo���bbbBBB000���������DDDUUUDDDUUUffffffDDDUUUUUUUUUDDDDDDUUUDDDUUUUUU\0\0\0���������333DDDDDDUUUDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUDDDDDDDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUUDDD333DDDDDDUUUDDDDDD333DDDUUUDDDDDDDDDUUUUUUDDDDDDUUUDDDDDDDDD333DDDDDDDDD333DDDDDDUUUUUUDDDUUUUUUDDDUUUDDDDDDfffUUUUUUDDDDDDDDD333333DDDUUUDDDUUUUUUDDDDDDUUUUUUDDDUUUUUUfffUUUUUUUUUUUUDDDDDDDDDUUUDDDDDDUUU333DDDDDDUUUDDDUUUDDDDDDUUU333333DDD333DDDDDDDDDDDDDDDDDDUUU333DDDUUUDDDUUUDDDUUUUUUDDDUUUUUUDDDUUUDDDDDDDDD333DDD333DDDUUUUUUUUUUUUfffDDDUUUUUUDDD\1c\1c\1ceee���������DDDDDDDDDUUUUUUDDDUUUDDDDDDCCCqqq���VVV%%%��������载�DDDUUUDDDDDDUUUUUUDDDDDDDDDUUUDDDDDDDDDDDDDDD&&&GGG���������UUUDDDUUUDDDDDDUUUDDDDDDDDDUUUUUU333DDDDDDDDDDDD\0\0\0������������UUUUUUfffUUUUUUUUUUUUDDDDDDDDDNNN������RRR"""���������UUUDDDDDDUUU333333DDD333DDDDDDDDDDDD---'''������������DDDUUUDDDUUUUUUDDDUUUUUUDDDUUUDDDDDD'''ccc���kkkDDDUUUUUUUUUUUUfffDDDUUUUUUDDDUUUDDDUUU"""!!!���������UUUUUUDDDUUUDDDDDDDDDUUUFFF������QQQUUU999888���������DDDUUUUUUDDDDDDDDDUUUDDDDDDDDDDDDDDDUUUUUUUUUBBB ���������DDDUUUDDDDDDDDDUUUUUU333DDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUfffUUUUUUUUUUUUDDDDDDDDDUUUDDDDDDUUU333DDDDDDUUUDDDUUUDDDDDDUUU333333DDD333DDDDDDDDDDDDDDDDDDUUU333DDDUUUDDDUUUDDDUUUUUUDDDUUUUUUDDDUUUDDDDDDDDD333DDD333DDDUUUUUUUUUUUUfffDDDUUUUUUDDDUUUUUUUUUUUUUUUDDDUUUUUUDDDDDDDDDDDD333DDDDDDDDDDDDDDDUUUUUUDDDDDDDDDDDD333333DDDDDD333DDDDDDDDDDDDUUUDDDDDDDDDUUUDDDDDDDDDUUUUUUUUUUUUUUUDDDUUUUUUDDDUUUDDD333DDDDDDUUUUUUDDDUUUUUUDDDDDDDDDDDDUUU\1c\1c\1ceee���������UUUDDDDDDUUUUUUDDDUUUDDDSSSqqq���aaaDDD\0\0\0������������UUUDDD333UUUfffDDDUUUDDDDDDDDD333UUUDDDDDDUUU\1c\1c\1cqqq���������UUUDDDDDDDDD333DDD333UUUUUUDDDUUUDDDUUU333DDDDDD\0\0\0������������gggUUUUUUDDDUUUUUUDDDDDDDDDGGG������DDD000\14\14\14���������DDDDDDDDD333333DDDDDD333DDDDDDDDDDDDBBB\ 2\ 2\ 2������������mmmDDDUUUUUUUUUUUUUUUDDDUUUUUUDDDNNN>>>��ѓ��DDDUUUUUUDDDUUUUUUDDDDDDDDDDDDUUUUUUDDDDDD&&&???���������UUUUUUDDDUUUDDDUUUUUUfff������UUU333UUU\17\17\17PPP���������UUUfffDDDUUUDDDDDDDDD333UUUDDDDDDUUUUUUUUUUUU---)))���������333DDD333UUUUUUDDDUUUDDDUUU333DDDDDDDDDDDDDDDDDDUUUUUUUUUUUUDDDUUUUUUDDDDDDDDDDDD333DDDDDDDDDDDDDDDUUUUUUDDDDDDDDDDDD333333DDDDDD333DDDDDDDDDDDDUUUDDDDDDDDDUUUDDDDDDDDDUUUUUUUUUUUUUUUDDDUUUUUUDDDUUUDDD333DDDDDDUUUUUUDDDUUUUUUDDDDDDDDDDDDUUUUUUDDDUUUUUUUUUUUUUUUDDDUUUDDDfffUUUUUUDDD333DDDDDDDDDUUUUUUDDD333UUUDDDDDDDDDUUUDDDDDDUUUUUUUUUDDDUUU333DDDUUUDDDDDDUUUffffffDDDUUUDDDDDD333UUUDDDUUUDDDUUUDDD333DDDDDDDDDUUUUUUUUUDDDDDDDDDUUUDDD\1c\1c\1c[[[������������UUU333DDDDDDDDDUUUDDDQQQ������aaaDDDDDD\0\0\0������������DDDDDDUUUfffUUUEEE333333DDDDDDDDDDDDDDDDDDDDD\f\f\f������������UUUUUUDDD333UUU333UUUDDDUUUUUUDDDUUUDDDDDDUUUUUU\0\0\0�����������UUUUUUUUUUUUDDDUUUDDDooo������DDD333---\1f\1f\1f������������333UUUDDDDDDDDDUUUSSSDDDUUUUUUUUUDDDUUU\ 6\ 6\ 6vvv������������ffffffDDDUUUDDDDDD333UUUDDDUUU222������333DDDDDDDDDUUUUUUUUUDDDDDDDDDUUUDDDUUUDDDDDD\11\11\11WWW������������DDDDDDUUUDDDDDD@@@������cccDDDDDDUUUDDD"""eee���������vvvUUU333333BBB���WWWDDDDDDDDDDDDDDDfffDDDDDD\1e\1e\1eGGG���������^^^UUU333UUUDDDUUUUUUDDDUUUDDDDDDUUUUUUDDDDDDUUUDDDDDDUUUUUUUUUUUUUUUDDDUUUDDDfffUUUUUUDDD333DDDDDDDDDUUUUUUDDD333UUUDDDDDDDDDUUUDDDDDDUUUUUUUUUDDDUUU333DDDUUUDDDDDDUUUffffffDDDUUUDDDDDD333UUUDDDUUUDDDUUUDDD333DDDDDDDDDUUUUUUUUUDDDDDDDDDUUUDDDUUUUUUDDDUUUUUUDDDUUUDDDUUUUUUDDDDDDDDD333DDDUUUUUUDDDUUUDDD333333DDD333333DDDDDDDDDDDDDDDUUUUUUDDDUUUDDDUUU333DDDDDDUUUUUUUUUUUUUUU333DDDDDDUUUDDDDDDDDDDDD333DDDDDDUUUUUUUUUfffUUUUUUDDDUUUUUUUUU\1e\1e\1e???������������333DDDUUUUUUMMM~~~���\7f\7f\7fUUUDDD333333\0\0\0�����������DDDUUUfff������DDD333DDDDDDDDDDDDDDDffffff\0\0\0������������UUUUUUDDDDDDDDDDDDDDDUUUDDDUUUUUUUUUUUUUUUDDD333\b\b\b���������������rrrUUUDDDUUUDDDeee������cccDDD333DDD999\1f\1f\1f������������\7f\7f\7fDDD333<<<```������DDDDDDUUUUUUDDDUUU&&&&&&������������UUUUUUUUU333DDDDDDUUUGGGTTT���\7f\7f\7f333DDDDDDUUUUUUUUUfffUUUUUUDDDUUUUUUUUUDDDDDDDDD\17\17\17eee�����������麺�ooo[[[VVV���������OOO333333DDDDDDUUU\1c\1c\1ceee���������ccc___�����ū��UUUDDDDDDDDDffffffDDD333DDD\17\17\17{{{���������DDDDDDDDDDDDUUUDDDUUUUUUUUUUUUUUUDDD333DDDDDDDDDUUUUUUDDDUUUUUUDDDUUUDDDUUUUUUDDDDDDDDD333DDDUUUUUUDDDUUUDDD333333DDD333333DDDDDDDDDDDDDDDUUUUUUDDDUUUDDDUUU333DDDDDDUUUUUUUUUUUUUUU333DDDDDDUUUDDDDDDDDDDDD333DDDDDDUUUUUUUUUfffUUUUUUDDDUUUUUUUUUDDDDDDDDDUUUUUUfffUUUUUUDDDDDDDDD333DDDDDDUUUDDDDDDUUUDDDDDDDDDDDDUUUUUUUUUDDDDDDDDDUUUUUUUUUDDDDDDDDDDDDUUUUUUDDDUUUUUUDDDUUUUUUUUUUUUDDDUUUDDDUUUDDDDDDUUUDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUUUUDDDUUU---\11\11\11��������������ᴴ����yyy���������HHHDDDUUUDDDDDDDDD\0\0\0��������������������ι��|||CCCDDDUUUUUUUUUDDDUUUUUUUUUDDD\17\17\17������������UUUUUUDDDDDDDDDDDDUUUUUUUUUDDDUUU333DDD333DDDDDD\1c\1c\1cIII��������������ܘ��������������uuuOOO333DDDDDDUUU---\10\10\10��������������ۻ�������נ��^^^DDDUUUUUUUUUDDDDDDDDDDDD
-
-
-SSS�����������爈�UUUUUUUUUDDDUUU]]]������dddUUUDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUUUUDDDUUUDDDDDDDDD\1c\1c\1cQQQ�����������������������ɔ��TTTUUUDDDDDDDDDDDDDDDUUU\1c\1c\1c[[[�����������������ґ��jjjUUUUUUDDDUUUUUUUUUfffUUUUUUUUU\0\0\0������������DDDDDDDDDUUUUUUUUUDDDUUU333DDD333DDDDDDUUUDDDUUUDDDDDDDDDUUUUUUfffUUUUUUDDDDDDDDD333DDDDDDUUUDDDDDDUUUDDDDDDDDDDDDUUUUUUUUUDDDDDDDDDUUUUUUUUUDDDDDDDDDDDDUUUUUUDDDUUUUUUDDDUUUUUUUUUUUUDDDUUUDDDUUUDDDDDDUUUDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUUUUDDDUUUDDDDDDUUUfffUUUfffUUUUUUDDDDDDDDD333UUUDDDDDDDDDUUUUUUDDDDDDUUUDDDUUUUUUDDDDDDDDDDDDUUUUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUfffUUUUUUUUUUUUUUUDDDUUUDDDDDDDDDDDDUUUDDDUUUDDDUUUUUUUUUUUUDDDDDDUUUUUUfffUUU333
-
-
-NNN�����������������ß��sss___DDDDDDDDDDDDDDDDDDUUU\17\17\17HHH�����þ��������ggg[[[DDDDDDDDDfffUUUDDDUUUUUUUUUfff///ZZZ������������fffDDDDDDDDDUUUDDDfffDDDUUUDDDUUUDDDDDD333UUUDDDBBB\12\12\12nnn��������������п�����pppTTTDDDDDD333UUUDDDDDD===\0\0\0qqq�����þ��������sssXXXDDDDDDDDDUUUUUUUUUUUUDDDUUUUUUMMM###DDD|||��������۹�����������������mmmOOODDDUUUDDDUUUDDDUUUUUUUUUUUUDDDDDDUUUUUUfffUUU333UUUfff///\18\18\18������������������sss___DDDDDDDDDDDDDDDUUUfffUUUUUU&&&+++�����ÿ��������```DDDfffUUUDDDUUUUUUUUUfffUUUUUUDDDLLL\12\12\12������xxx���DDDUUUDDDfffDDDUUUDDDUUUDDDDDD333UUUDDDUUUDDDDDDDDDDDDUUUfffUUUfffUUUUUUDDDDDDDDD333UUUDDDDDDDDDUUUUUUDDDDDDUUUDDDUUUUUUDDDDDDDDDDDDUUUUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUfffU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KLLLMMMNNN___PPPPPPQQQQQQPPPPPP___^^^]]]\\\JJJIIIHHHFFFEEEEEEUUUUUUUUUDDDUUUUUUDDDDDDUUUUUUUUUUUUUUUUUUfffUUUUUUDDDDDDUUUfffUUUUUUDDDUUUDDDfffUUUfffUUUUUUDDDUUUfffDDDUUUDDDDDDUUUDDDUUUUUUUUUDDD333333UUU333DDDDDDDDDDDDDDDUUUUUUUUUUUUUUUDDDUUUUUU333333333VVVWWWXXXZZZLLL^^^```aaa``````___NNNmmmZZZjjjXXXWWWEEEVVVDDDVVVEEEEEE___nnnnnnnnn}}}}}}ooopppppppppXXXHHHHHHZZZIIIZZZ888������qqqqqqccc\7f\7f\7fppppppaaannn```EEEDDDUUUDDDDDDUUUUUUffffffDDDUUUUUUUUUfffUUUUUUUUUUUUUUUUUUDDDDDDUUUUUUfffUUUUUUfffUUUUUUUUUDDD333DDDzzzUUUfffUUUfffDDDDDDUUUUUUUUUUUU���}}}```VVVFFFGGGXXXHHHYYYYYYZZZIII888888YYY888HHHGGGFFFFFFEEEVVVVVVVVVVVVVVVEEEVVVVVV444444444VVVVVVUUUUUUDDDUUUUUUUUUUUUUUUUUUDDDfffUUUfffUUUUUUDDDUUUDDDUUUDDDDDDUUUUUUUUUUUUffffffUUUUUUUUUUUUUUUDDDDDDUUUDDDUUU333ffffffUUUUUUDDDfffUUUUUUEEEVVVFFFHHHHHHZZZLLLMMM^^^```qqqqqqRRRbbbbbbaaappp___]]]\\\ZZZXXXWWWEEEEEEUUUUUUfffUUUUUUfffUUUUUUUUUDDD333DDDDDDUUUfffUUUfffDDDDDDUUUUUUUUUUUUUUUfffEEEWWWGGGHHHYYYIIIZZZ\\\]]]NNN???AAAbbbDDDTTTVVVVVVWWWWWWfffeeedddcccbbbPPP___]]];;;999777WWWVVVUUUUUUDDDUUUUUUUUUUUUUUUUUUDDDfffUUUfffUUUUUUDDDUUUDDDUUUDDDDDDUUUUUUUUUUUUffffffUUUUUUUUUUUUUUUDDDUUU333DDDUUUDDDDDDDDD333DDD333DDDDDD333UUUDDDUUUDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDUUUUUUEEEVVVXXXJJJ]]]PPPSSSVVVfffWWWfffdddSSS```^^^\\\KKKJJJHHHHHHHHHXXX~~~~~~}}}ppp~~~ppppppppppppcccrrrWWW;;;\\\\\\MMMfffttt������uuu]]]^^^tttttteeeddddddaaaaaaFFFVVVVVVVVVVVVUUUfffDDDUUUUUUUUUfffUUUUUUUUUUUUDDDDDDUUUDDDUUUDDDUUUUUUfffDDDUUUDDDUUUUUUDDDDDDDDDnnnnnnUUUUUUDDD333DDDDDDVVVVVVVVVVVVpppaaappp777IIIZZZKKKLLLMMM===MMM===MMMMMM<<<\\\KKKZZZIIIIIIHHHHHHGGGGGGFFFWWWFFFFFFFFFWWWWWWFFFVVVVVVEEEVVVEEEEEEEEEUUUDDDUUUUUUDDDUUUUUUUUUDDDDDDDDDDDDDDDUUUfffUUUUUUUUUfffUUUUUUUUUUUUDDDUUU333333UUUUUUDDDDDDDDDUUUfffUUUUUUUUUUUUVVVEEEFFFFFFHHHIIIKKK\\\^^^```bbbdddtttWWWgggggggggvvvffffffdddbbbPPPMMM[[[HHHXXXEEEVVVUUUfffDDDUUUDDDUUUUUUDDDDDDDDDUUUUUUUUUUUUDDD333DDDDDDUUUUUUUUUVVVVVVFFFXXX888III[[[LLLNNNOOO@@@RRRDDDUUUVVVIIIhhhYYYjjj[[[\\\[[[[[[[[[ZZZYYYgggVVVTTTRRR```^^^KKKYYYXXXEEEVVVDDDDDDDDDUUUDDDUUUUUUDDDUUUUUUUUUDDDDDDDDDDDDDDDUUUfffUUUUUUUUUfffUUUUUUUUUUUUDDDUUU333333fff333DDDDDDUUUUUUUUUDDDDDDDDD333DDD333UUUUUUDDDUUUDDDDDDUUUUUUDDDUUUDDDDDDDDDUUUDDDDDDDDDVVVGGGZZZLLLQQQdddhhh[[[kkkkkk[[[iiihhhfffdddbbbPPPOOONNNVVV���������dddjjjZZZ{{{kkkkkk\\\LLLMMMuuuiii``````kkk���kkkxxxzzzrrrcccccccccrrraaa```___MMM\\\[[[���XXXGGGWWWFFFVVVVVVgggUUUUUUUUUUUUUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUU||||||UUUUUUUUUUUUDDDUUUDDDDDDzzzgggVVVVVVEEEEEEVVVVVVWWWWWWhhhiiiYYYjjj999\7f\7f\7fMMM^^^``````RRRSSSSSSCCCSSSBBBaaa```OOO^^^NNNMMM\\\\\\KKKZZZJJJJJJIIIZZZIIIIIIIIIZZZHHHYYYHHHGGGXXXWWWFFFVVVVVVEEEVVVVVVVVVVVVUUUDDDDDDDDDDDDfffUUUfffUUUfffUUUwwwffffffUUUDDDDDDUUUDDDnnnnnn___DDDDDDUUUUUUfffUUUVVVVVVhhhXXXXXXYYYJJJ\\\]]]___aaaSSSeeeXXXhhhjjjzzzllllllkkkkkkkkkjjjhhhXXXUUURRR___\\\ZZZXXXWWWffffffUUUUUUUUUUUUDDDUUUDDDDDDDDD|||nnnUUUDDDDDDUUUUUUUUUVVVggghhhXXXjjj:::LLLNNN___aaabbbTTTVVVWWWdddrrrMMMkkklll^^^lll______nnnmmm^^^lll^^^\\\[[[hhhWWWUUURRR^^^KKKZZZGGGEEEVVVUUUDDDUUUUUUDDDUUUUUUUUUUUUUUUDDDDDDDDDDDDfffUUUfffUUUfffUUUwwwffffffUUUDDDDDDUUUDDDUUUDDDUUUUUUUUUUUUDDDUUUUUUDDDDDDDDDDDDUUUUUUDDDUUUDDDUUUDDDUUUDDDUUUUUUUUUUUUUUUfffDDDDDDVVVFFFYYYKKKOOOdddYYYlllnnn```nnnnnn}}}mmmttt���hhhWWW```������yyybbbQQQ```NNN___>>>NNNOOO```PPPbbblll{{{VVV���|||pppXXXhhhYYYiiijjj[[[[[[jjjhhhffffffcccaaavvvggg\\\ZZZZZZjjjiiiXXXWWWWWWggggggggggggVVVEEEEEEEEEVVVEEEVVVVVVEEEzzz}}}nnnEEEVVVVVVEEEEEEEEEEEEooopppEEEFFFFFFXXXXXXhhhHHHjjjIIIZZZKKK\\\MMM___```���cccVVVfffgggXXXXXXpppppp}}}|||oooeeeTTTcccRRR```PPP```___^^^^^^^^^nnnNNNNNN]]]MMM]]]LLLKKK[[[JJJZZZZZZHHHXXXXXXiiiWWWFFFWWWVVVEEEEEEVVVUUUUUUUUUDDDUUUDDDUUU333DDDDDDUUUDDDUUUlllzzz```nnnnnnEEE```VVVEEEVVVWWWGGGHHHZZZZZZ[[[]]]^^^```bbbTTTfffhhhjjjzzz{{{mmmnnnnnn||||||||||||nnn^^^[[[YYYfffSSS```]]]JJJHHHhhhVVVDDDUUUnnn____________nnn���______DDDUUUUUUfffEEEgggFFFXXXIII[[[MMM^^^```bbbdddVVVhhhhhhsssssstttuuummmnnn```nnn```oooaaaooo```nnnnnnnnnnnnmmm{{{[[[YYYfffSSS___KKKHHHWWWEEEUUUUUUDDDUUUUUUfffUUUDDDUUUUUUDDDDDDUUUUUUUUUUUUDDDUUUDDDUUU333DDDDDDUUUDDDUUUDDDUUUDDDDDDDDDUUUUUUfffUUUUUUUUUUUUDDDDDDDDDUUUUUUDDDDDDDDDUUUUUUDDDDDDUUUUUUDDDUUUUUUUUUDDDDDDEEEXXXIIIMMMbbbgggkkknnnooopppppp{{{{{{���zzz���aaawww���uuulllzzz[[[YYYgggVVVUUUTTTddddddFFFVVVXXXqqqrrrsssssskkk\\\]]]lll^^^nnnaaappp������pppaaa]]]ZZZhhhUUUbbb���ooonnnmmm[[[ZZZIIIYYYGGGXXXXXXFFFFFFFFFFFFWWWFFFFFFWWWWWWnnn{{{ppppppFFFWWWFFFFFFGGGXXXXXXqqqbbbHHHHHHjjjJJJZZZ[[[\\\MMM===^^^```QQQRRRTTT||||||wwwjjjjjjllllll���tttttt������sss[[[qqqhhhgggVVVVVVddddddTTTccccccbbbSSSSSSSSSbbbRRRQQQ```___^^^^^^]]]\\\\\\\\\[[[JJJIIIZZZHHHGGGWWWXXXWWWgggEEEEEEVVVEEEEEEEEEVVVVVV444EEE{{{aaaaaaHHHGGGXXX|||aaa~~~QQQpppIIIZZZlll]]]^^^PPPRRRSSSeeeWWWhhh[[[zzz||||||nnnnnnaaapppaaannnoooaaaaaa```^^^lll[[[XXXddd```NNN[[[YYYXXXEEE���```______nnnnnn___nnnDDDooonnnDDDUUUVVVWWWGGG888[[[]]]OOORRRSSSfffgggxxxjjjllllll���vvvwwwwwwnnn���aaaaaa```ooooooaaaaaaooopppaaannnnnnnnn___]]][[[fffSSSNNN[[[XXXVVVVVVUUUUUUUUUUUUUUUDDDDDDUUUDDDDDDUUUUUUUUUfffDDDDDDUUUDDDDDDDDDUUUUUU333DDDDDDDDDDDDDDDDDDUUUUUUUUUDDDUUUUUUDDDDDD333UUUDDDDDDDDDUUUUUUUUUDDDUUUUUUUUUUUUDDDUUUUUUUUUfffDDDDDDVVVHHHJJJ^^^dddhhhllloooppprrrrrrqqq\7f\7f\7f|||ggg|||���~~~iiivvvuuufffssscccpppmmmjjj[[[[[[[[[jjj[[[\\\lll^^^������______aaaaaapppdddfffvvv���\7f\7f\7f���iii{{{������[[[YYYfff���SSSxxx```^^^nnn\\\lllkkkJJJZZZIIIIIIIIIIIIZZZZZZZZZ���dddzzzrrrIII}}}rrrZZZIIIZZZJJJUUU���LLL\\\MMM]]]nnn^^^___```QQQbbbcccdddfffXXXhhhjjj���fffmmmnnn```���QQQnnn___```___mmm������]]]���jjjjjjjjjZZZhhhhhhhhhwwwYYYYYYgggXXXWWW||||||zzzcccbbbbbbbbb```PPP```NNNNNN]]]KKKKKKJJJZZZYYYHHHXXXHHHXXXXXXWWWFFFFFFGGGXXXcccdddZZZKKK[[[\\\KKKKKKKKKUUU���ffffffvvvwwwkkkllloooWWWhhhjjj[[[]]]mmm```aaaooooooooo}}}ppp}}}}}}aaapppaaaaaa``````mmmjjjhhhtttQQQNNN\\\dddyyypppWWWEEEVVVEEEEEEUUUDDDUUUNNN|||gggVVVWWWXXXIII\\\^^^aaadddWWWhhhjjjlll^^^mmmnnn```���ooooooaaa���wwwpppooonnn```nnnnnnnnnnnnaaaooooooooo~~~aaa___lll[[[VVVaaa\\\YYYWWWVVVUUUUUUUUUDDDUUUDDDDDDUUUDDDDDDDDDUUUUUUDDDUUUDDDUUUUUUUUUDDDDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUUUUUUUUUUUUUDDDDDD333DDDDDDDDDDDDUUUDDDUUUUUUUUUUUUUUUDDDUUUDDDUUUfffUUUUUUDDDEEEEEEHHH[[[pppeeejjjnnnqqqqqqeeeuuuvvvkkkyyy������www���|||pppoooooo{{{___vvvfffcccaaannnnnnOOO___nnnnnn���aaa���aaaRRRbbbcccrrrfffwwwzzzooo���qqq���������zzzaaa^^^[[[hhh������eeesssbbbaaa```nnn^^^^^^^^^^^^^^^NNNnnnNNNuuu}}}ggguuuuuuggg���uuuNNNggguuuvvv���```PPPaaakkk���zzzzzz{{{|||ooo}}}~~~rrr[[[\\\lllllluuu���nnnaaa���SSSaaa```aaaaaaooo```nnnnnn������mmmvvv���^^^lllzzzllllll]]]tttttt������������\7f\7f\7f~~~hhhgggWWWffffffVVVdddbbbRRRPPP```vvvgggfffffftttWWWrrrJJJJJJJJJZZZ[[[;;;{{{zzz___```PPPPPPPPP@@@PPPOOOwww\7f\7f\7fyyyzzzooooooqqq���kkk���vvv___```aaaooo}}}~~~ppp}}}oooooonnn|||nnnnnnoooooooooaaa}}}^^^kkkYYYVVVyyywwwfff���rrrIIIHHHpppWWWWWWVVVEEEVVVEEEggg���XXXZZZ[[[gggwwwbbbVVVYYY[[[lllmmmnnnnnnnnnaaaiiiyyyaaaaaaaaawww���```nnnmmmmmmllllll^^^nnn___nnn���ooopppaaaaaa___]]]hhhsss^^^ZZZXXXVVVVVVDDDUUUUUUDDDUUUUUUDDDDDDUUUUUUDDDDDDDDDUUU333UUUDDDDDDDDDUUUUUU333DDDUUUUUUUUUDDDUUUUUUUUUUUUUUU333UUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUUDDDUUUDDDUUUfffUUUUUUUUUDDD333EEEEEEHHH\\\pppVVV\\\aaadddtttvvv���zzz���������������ttt������������������|||yyy���dddppp~~~oooaaaooo���aaaaaa���iiipppqqqqqqrrrgggyyy}}}������������oooxxxggg������vvvmmmzzzjjj���hhhXXXuuuVVVTTTSSSbbbSSSSSSSSSCCCSSSyyy������lllyyyyyy������yyy������������������������������������������������������^^^������������������������xxxwww���������������ooopppoooaaa���www���������nnnnnn___���wwwwww������������uuuttt]]]������yyy������qqq~~~}}}������lll���xxxxxxwwwvvvvvvuuu���NNN^^^ooohhhzzzcccdddVVVVVVfffVVVeeeeee������oooggghhhyyy\\\lllmmm������wwwaaa}}}oooppp~~~oooooonnn___���^^^^^^^^^mmm___```aaaRRRaaannnmmmkkkZZZ���zzzxxxwww���sssttteeeJJJdddpppGGGXXXXXXccc������fff���kkknnngggsss]]]mmmnnnoooooooooRRRooowwwwwwwww������������������������sssjjj[[[kkk���������nnnaaaRRRaaaaaa^^^iiisssOOOJJJGGGEEEVVVUUUfffUUUfffDDDUUUUUUfffDDDDDDfffUUUUUUUUUUUUUUUUUUfffDDDUUUfffUUUDDDUUUUUUDDDDDDUUUDDDDDDDDDDDDUUUUUUDDD333DDDDDDDDDUUUDDDUUUffffffUUUUUUDDDUUUUUUUUUUUUDDDDDDUUUDDDVVVEEEXXX[[[___VVVNNNppp���iiixxx���ppp\7f\7f\7f���������������������������������������xxxfff���qqqaaappp���xxxaaaoooiii���wwwppppppddd������~~~������������~~~mmmwwwfff������ooonnn|||���tttkkkyyyiiihhh~~~}}}ppppppcccccc���������|||���}}}ppp������ppppppxxx������������������\7f\7f\7f������������������������www������wwwwwwwwwwww��������kkkwwwwwwwww���www���}}}~~~ooooooaaa������������wwwwww���aaaooowww���ooonnn```������������������}}}������������������hhhhhhgggfffeee{{{������yyylll���dddooo|||hhhiii[[[kkk\\\\\\[[[���\7f\7f\7fsss������lllmmmnnnnnnooooooaaappp���}}}������ppp}}}nnn������������\7f\7f\7f������uuuwwwjjjkkk���������___������YYY������lllwwwjjjOOO���ttt���eee~~~rrrttt���������zzzWWWiii���uuuwww���aaaaaaaaaaaaooonnn������vvvuuuttt���sss~~~������||||||VVV|||���������\\\^^^nnn```oooaaammmhhhdddNNN999XXXgggEEEUUUfffDDDUUUUUUUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUffffffUUUDDDfffUUUDDDUUUUUUUUUDDDUUUUUUDDDDDDDDDUUUDDDDDDDDDDDDUUUUUUUUUUUUDDDDDDfffDDDDDDfffDDDDDDfffUUUDDDUUUffffffDDDEEEEEEGGGkkkNNNEEE[[[ppptttxxx{{{ppp\7f\7f\7f������������������������������������������ttt}}}���qqqooowww���ooonnn___nnnmmm������~~~yyysssiiiooosss���������~~~zzziiitttqqqbbb���ooonnniii���nnnmmmuuu���ttt���ttthhhttt���������{{{ttt���]]]]]]lllzzz���������������{{{lll���www������___}}}```nnn```aaaaaaooo}}}oooaaaaaa```���������___^^^llllllllllll^^^___���aaaaaa}}}aaaxxx������������������iiiwww���������wwwkkkwww������������\7f\7f\7f������������www������lll]]]kkk[[[jjjiii~~~���zzz���������������ttt������www���������mmm^^^^^^uuu���```aaaoooaaapppppppppaaappp���www������mmmttt������|||ooooooooo}}}rrrhhhvvvwww���xxxwww```���uuufff���xxxhhhfff���dddSSS���xxxiiiiiiwww```RRR{{{}}}hhh[[[^^^���������������www���������������tttjjjiiihhhfffVVVTTTrrr���QQQppp������������VVVhhhyyyzzz^^^^^^^^^[[[vvvRRR===IIIXXXVVVVVVUUUDDDUUUDDDUUUUUUDDDUUUUUUUUUDDDUUUDDDUUUUUUUUUUUU333DDDfffUUUUUUUUUDDDUUUUUUDDDDDDUUUDDDDDDUUUDDDDDDDDDUUUDDDUUUDDDDDDDDDfffUUUUUUUUUUUUUUUUUUfffUUUUUUfffUUUUUUDDDDDDEEEWWWYYY���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������WWWVVVDDDUUUDDDUUUUUUDDDUUUUUUUUUUUUUUUDDDDDDDDDUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUDDDUUUUUUDDDDDDUUUDDDDDDDDDUUUDDD333333DDDUUUUUUUUUUUUUUUDDDDDDUUUUUUUUUUUUUUUUUUDDDDDD333333EEEEEEGGGZZZ___UUUjjjaaaggg���nnn���|||qqq~~~sssuuuvvvvvv���www���vvv���������|||ppp���vvv������sssssshhh~~~���oooUUUUUUFFFggg������������\7f\7f\7f\7f\7f\7f\7f\7f\7fhhh{{{���������www���������www������wwwwwwaaa``````aaaxxxwww������oooooonnnnnnooo������iii������nnn������aaaoooooooooaaaooo```aaaaaaaaa```nnnnnn___^^^lll]]]\\\���rrrqqqqqq|||oooaaa```mmm{{{|||}}}������������������������������ttt���hhhhhh]]]^^^^^^lllmmm������\7f\7f\7f���������}}}oooaaaoooiii������iii���www���www���nnnnnn___nnn|||```nnnaaaaaaaaappppppaaaaaaaaaaaaRRRoooxxx���ooopppaaaaaaaaaaaa```nnnmmmlll[[[jjjYYY���������OOOMMMLLLLLLMMMOOORRRVVVYYYjjjlllnnnnnnooooooooo������```nnnnnnmmmllllll[[[jjjiiiiii[[[jjj\\\^^^vvvwww������oooaaaaaa���wwwvvvlllsssqqqooo{{{SSSAAA???NNN]]]\\\ZZZZZZrrrbbbbbbpppYYYZZZ[[[\\\^^^PPPSSSEEEEEETTTSSSPPP\\\ZZZGGGVVVEEEDDDfffDDDfffUUUDDDUUUDDDDDDDDDDDDUUUDDDUUUDDDUUUUUUUUUDDDUUUfffDDDUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUDDDDDDDDD333DDD333DDDUUUUUUfffUUUUUUUUUUUUUUUUUUfffUUUUUUUUUUUUDDDDDD333UUUDDDEEEXXXZZZ\\\RRRXXX^^^rrr���wwwxxxxxxyyymmm|||ooo~~~qqq\7f\7f\7frrrqqq}}}zzzqqq���www������~~~���fffVVVddd���yyyjjj```PPP@@@```aaassseeeppp���```���������www���lllllllll^^^^^^���nnnwww```���wwwwww������kkk������������ooo}}}nnnnnn������aaaooo}}}���vvv������pppooonnn```nnn_________```QQQmmm{{{]]]\\\jjjiiihhh���fffUUUSSSSSSBBBPPP???OOO______pppbbbccc|||}}}~~~\7f\7f\7f���������\7f\7f\7f~~~qqqqqqIIIhhhYYYYYYiiijjjjjj\\\ttt���������������������www���wwwwww������iiixxx������wwwxxxwww���nnnoooaaaoooaaapppppppppaaapppaaaRRRoooooo������oooooo```nnnnnn^^^^^^������~~~|||ooo������vvvfffeeerrrbbbcccrrrsss===aaadddgggjjjlll|||nnn���������aaaooo}}}nnnnnnnnnnnnmmmmmmmmm^^^lll^^^___```aaakkk������aaa```nnnmmmllljjjhhhWWWUUURRR@@@NNN<<<KKKZZZZZZjjjXXXWWWWWWVVVVVVVVVgggWWWXXXYYY[[[LLLNNN>>>___OOONNN\\\ZZZXXXFFFEEEDDDUUUfffUUUUUUUUUUUUDDDUUUDDDUUUDDDUUUDDDDDDUUUUUUDDDDDDDDDfffUUUUUUDDDUUUDDDUUUUUUUUUUUUDDDDDD333UUUDDDUUUUUUDDDfffUUUfffUUUUUUUUUUUUDDD333UUUUUUUUUUUUDDDfffUUUUUUDDDUUUDDDDDD444WWWXXXKKKOOOUUUxxx}}}sssttt���fffggghhhvvviiixxxxxxxxxiiihhhfffrrrnnn���~~~|||zzzllljjjPPP@@@OOONNNMMMLLLKKK\\\ZZZ[[[\\\^^^OOOaaaddd���������|||vvvfffgggXXXXXXYYYyyy[[[���uuu������~~~������vvv���wwwwwwnnnnnnnnn___nnnnnn���wwwnnn||||||vvv���mmm���iiinnn^^^^^^lll]]]lllllllll\\\jjjiiiYYYXXXfffddd���RRRAAA```NNN^^^\\\KKKkkk[[[kkk[[[\\\]]]^^^PPPBBBcccddddddeeeUUUsssccccccSSSbbbSSSSSSEEEdddeeeWWWXXXYYYwww������������tttuuu������wwwnnnnnnvvv���wwwwww���������������nnnaaaaaaaaaRRRaaaaaaaaaaaaaaaooonnnnnnnnnnnn```���mmm^^^]]][[[������||||||lllkkkiii���fffdddcccppp~~~```ooopppbbb���VVViiizzz|||~~~\7f\7f\7f���������```nnn}}}}}}oooooopppaaa```nnn``````nnn```oooooopppaaaoooooo```___llljjjYYYWWWEEEbbbOOO]]]\\\IIIjjjXXXhhhWWWVVVVVVVVVEEE333UUUUUUUUUUUUEEEhhhXXXYYYIIIZZZKKKJJJ999YYYXXXFFFEEEEEEffffffUUUUUUfffDDDDDDDDDUUUDDDUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUDDDDDDDDD333DDDDDDDDD333DDDDDDUUUUUUUUUDDDDDDUUUDDDDDDDDDDDDUUUDDDUUUDDDDDDUUUDDDUUUDDDUUUUUUDDDDDDDDDDDD333DDDDDDVVVFFFYYYLLLbbbvvvlllooodddcccqqqcccpppaaapppbbbaaa``````lllkkkiiifffdddbbbPPPNNNNNNLLLKKKKKKKKKJJJHHHYYYXXXXXXXXXXXXHHHZZZZZZ\\\NNNOOOPPP���xxx``````aaabbbbbbdddeeeWWW~~~qqq���������kkk\\\ttt\7f\7f\7fkkklll\\\kkkkkk\\\kkkkkklll������zzzzzz\\\zzz���sss���\\\[[[iiiYYYhhhYYYhhhgggWWWfffdddSSSqqqiiivvvNNNMMM\\\[[[ZZZIIIHHHXXXGGGHHHGGGGGGXXXIIIZZZKKKMMM^^^NNN___PPP___^^^NNNNNNNNNNNN===NNNNNN```PPPaaaRRRcccsssdddeee���ppp~~~���\7f\7f\7fsssjjj\\\]]]]]]^^^mmmmmmnnnnnnnnnnnn^^^______```___````````````nnnnnnnnnllllll]]]lllllljjj���qqqqqq���{{{yyybbb```^^^\\\[[[ZZZHHHXXXFFFVVVUUUUUUUUUDDDEEEQQQ\7f\7f\7ftttiiixxx{{{ppp\7f\7f\7fkkklll^^^|||}}}}}}```}}}aaaooooooaaaaaaoooaaaoooaaappppppaaaooonnn^^^zzziiiHHHTTTRRR___]]]\\\IIIHHHXXXFFFEEEEEEEEEUUUDDDUUUDDDDDDUUUDDDUUUDDDUUUVVVEEEFFFGGGGGG777GGGGGGWWWEEEVVVEEEUUUfffUUUUUUDDDDDDUUUDDDUUUDDDUUUDDDDDDDDDDDDUUUUUUUUUUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUDDDDDDUUUUUUUUUUUUUUUfffDDDDDD333DDD333333DDDUUUEEEVVVHHHZZZ___dddhhhlll___nnn^^^lllMMMjjjZZZhhhWWWfffUUUdddcccbbb```^^^KKKJJJJJJYYYHHHXXXHHHGGGXXXWWWWWWEEEVVVVVV444EEEVVVFFFXXXHHHZZZrrrrrreeeKKK[[[KKKLLL^^^OOO```RRRbbbdddeeefffWWW���{{{|||pppXXXXXXXXXvvvXXXgggggggggvvvvvv\7f\7f\7f���ppp}}}||||||ppp���ooouuuddddddSSSSSSSSSRRRaaa```___^^^���tttKKKIIIIIIHHHGGGWWWFFFFFFEEEVVVVVVVVVVVVVVVWWWGGGHHHYYYZZZZZZ[[[[[[kkkKKKJJJ999JJJ999999JJJ[[[KKK\\\LLL]]]^^^^^^___wwwjjjxxxlllzzzEEEeeeVVVfffYYYhhhZZZjjjjjjjjjkkkkkk\\\\\\\\\lll]]]lll]]]]]]lllllllll\\\jjjiiiJJJYYYhhhXXX|||ooozzzyyyxxxPPPNNN]]]KKKJJJZZZHHHWWWFFFVVVVVVUUUUUUDDDDDDDDDEEEEEEGGGIIIKKKmmmPPPbbbeeegggwwwyyy[[[lll^^^mmm___``````nnnooo~~~ooooooaaaaaaaaaaaaooonnnmmmjjjhhhVVVSSSPPPNNNKKKIIIXXXGGGEEEEEEUUUUUUUUUUUUUUUUUUDDDDDDUUUUUUUUUUUUUUUfffDDDDDD444EEE555555EEEVVVEEEVVVDDDUUUUUUUUUUUUUUUDDDUUUDDDUUU333UUUDDDUUUDDDUUUDDDUUUUUUUUUUUUUUUDDDDDDDDDUUUDDDUUUDDDDDDUUUUUU333UUUUUUDDDUUUDDDDDDDDDUUUDDDUUUDDDUUUUUUUUUDDDDDDUUUUUUDDDUUUfffUUU333DDDDDDDDD333UUUDDDUUUDDDVVVWWWYYY\\\```UUUhhhZZZjjjZZZXXXGGGTTTSSSQQQ```___^^^]]]\\\kkkZZZIIIHHH666VVVVVVWWWVVVEEEVVVVVVUUUDDDUUUDDDDDDUUUDDDUUUEEEVVVEEEFFFFFFWWWXXXGGGGGG777IIIIIIJJJKKK]]]NNN___pppqqqjjj]]]kkkkkkRRRSSSSSSSSSbbbSSSRRRrrrbbbbbbbbbbbbkkklllkkkxxxkkk���������``````OOONNNNNN]]]]]]\\\\\\[[[~~~cccHHH666WWWWWWFFFVVVEEEEEEDDDUUUDDDUUUDDDUUUUUUVVVEEEEEEVVVWWWFFFXXXhhhXXX666GGGFFFFFF555XXXGGGXXXHHHXXXYYYYYYZZZZZZKKK\\\LLL]]]NNNNNN???PPPPPPRRRbbbcccdddeeefffvvvfffXXXXXXIIIgggggghhhhhhYYYhhhhhhhhhXXXfffVVVUUUdddSSSbbbRRRaaaPPPNNNNNN\\\[[[JJJHHH777GGGFFFEEEEEEVVVDDDUUUffffffDDD333DDDDDDDDDEEEFFFHHHZZZKKKNNNpppbbbdddeeefffhhhZZZ[[[kkk]]]^^^mmm|||nnnnnn___```aaaooonnnnnnllljjjXXXdddQQQ===\\\ZZZHHHWWWEEEDDDDDDUUUDDDUUUDDDUUUUUUUUUDDDDDDUUUUUUDDDUUUfffUUU333DDDDDDDDD444VVVEEEVVVDDDUUUUUUUUUUUUUUUDDDUUUDDDUUUDDDDDD333DDDDDDDDDUUUUUUUUUUUUUUUfffUUUDDDDDD333UUUUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUUUUUUUDDDUUUfffDDDUUUDDDDDDUUUUUUDDDUUUDDDUUUfffUUUffffffUUUDD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UUUUUUUUDDDDDDUUUDDDDDDDDDUUUDDDfffUUUUUUUUUDDDDDDDDDDDDDDDDDDzzzDDDUUUUUUffffffUUUDDD333UUUUUUUUUDDDDDDUUUUUUUUUDDDDDDUUUUUUUUUUUUfffUUUUUUUUUDDDDDDDDDDDDDDDUUUDDDUUUffffffUUUffffffDDDDDDDDDUUUfffUUUUUUUUUUUUUUUDDDUUU333DDDDDDUUUUUUDDDDDDDDD333333333DDDDDDDDDDDDUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUUUUUUUDDD333UUUUUUDDDDDDDDD333DDDDDDDDDUUUUUUUUUUUUDDDUUUDDDUUUUUUUUUDDDUUUUUUUUUDDDUUUUUUDDDwwwUUUUUUUUUUUUUUUUUUUUUDDD333UUUDDDUUUDDDDDDDDDDDD333DDDDDDDDDUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUDDDDDDDDD333DDDDDDUUUDDDDDDUUUDDDUUUfffUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUDDDDDDUUUUUUDDDDDDUUUUUUUUUUUUDDDUUUUUU���������������DDDDDDDDDUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUwwwUUUUUUDDDDDDDDDfffUUUDDDDDDfffUUUDDDDDDDDDUUUUUUUUUDDDUUUDDDUUUUUUUUUDDDUUUUUUUUUUUUDDDUUUDDDUUUUUUUUUUUUDDDUUUUUUDDDwwwUUUUUUUUUUUUUUUUUUUUUDDD333UUUDDDUUUDDDDDD������������������UUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUDDDDDDDDD333DDDDDDUUUDDDDDDUUUDDDUUUfffUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUDDDDDDUUUUUUDDDDDDUUUUUUUUUUUUDDDUUUUUUUUUUUUDDDUUUDDDUUUDDDDDDDDDUUUDDDmmm���������������UUUUUUwwwUUUUUUDDDDDDDDDfffUUUDDDDDDfffUUUDDDDDDDDDUUUUUUUUUDDDUUUDDDUUUUUUUUUDDDUUUUUUUUUUUUDDDUUUDDDUUUUUUUUUUUUDDDUUUUUUDDDwwwUUUUUUUUUUUUUUUUUUUUUDDD333UUUDDDUUUDDDDDDDDDDDD333DDDDDDDDDUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUDDDDDDDDD333DDDDDDUUUDDDDDDUUUDDDUUUfffUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUDDDDDDfffUUUUUUUUUfffUUUfffUUUUUUUUUUUUDDDfffUUUUUU333DDDDDDDDDDDDUUUDDDDDDDDDDDDUUUDDDUUUDDDDDDDDDDDDUUUDDDUUUfffUUUUUUDDDDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUDDDUUUfffUUUUUUfffDDDUUUDDDUUUDDDfffUUUDDDDDDUUUUUUUUUDDDDDDUUUUUUUUUUUUDDDUUUhhh���������������DDDDDDUUUUUUUUU333DDDzzzzzzUUUUUUUUUfffUUUfffUUUDDDUUUUUUUUUUUUDDDUUUUUUUUUDDDUUUUUUDDDDDDUUU333UUUfffmmm���DDDDDDUUUfffUUUfffDDDUUUDDDUUUUUUfffUUUUUUUUUfffUUUfffUUUUUUUUUUUUDDDfffUUUUUU333DDDDDDDDDDDDUUUYYY���������������DDDDDDDDDDDDUUUDDDUUUfffUUUUUUDDDDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUDDDUUUfffUUUUUUfffDDDUUUDDDUUUDDDfffUUUDDDDDDUUUUUUUUUDDDDDDUUUUUUUUUUUUDDDUUUUUUfffUUUUUUUUUDDDDDDDDDUUUUUUUUU333���������������fffUUUfffUUUDDDUUUhhh���UUUDDDUUUUUUUUUDDDUUUUUUDDDDDDUUU333UUUfffDDDfffDDDDDDUUUfffUUUfffDDDUUUDDDUUUUUUfffUUUUUUUUUfffUUUfffUUUUUUUUUUUUDDDfffUUUUUU333DDDDDDDDDDDDUUUDDDDDDDDDDDDUUUDDDUUUDDDDDDDDDDDDUUUDDDUUUfffUUUUUUDDDDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUDDDUUUfffUUUUUUfffDDDUUUDDDUUUDDDfffUUUDDDDDDUUUfffUUUUUUUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUUUUUUUUUUUUUUUUDDDUUUUUUUUUfffUUUDDDDDDUUUffffffUUUUUUDDDDDDUUUDDDDDDUUUUUUUUUDDDDDDDDDDDDDDDUUUDDDUUUDDDDDDDDDDDDUUUfffUUUUUUDDDDDDDDDUUUDDDUUUDDD333DDDDDDDDDUUUUUUDDDDDDDDDUUU333���������333UUUDDDUUUDDDDDDmmm������UUUUUUUUUDDDUUUDDDDDDUUU333UUUDDDDDD333DDDUUUDDDUUUDDDDDDUUUUUUUUUUUUfffzzz������333DDDDDDUUUDDDUUUUUUUUUUUUUUUffffffUUUUUUUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUUUUUUUUUUUUUUUUDDD���������UUUDDDDDDUUUffffffUUUUUUDDDDDDUUUDDDDDDUUUUUUUUUDDDDDDDDDDDDDDDUUUDDDUUUDDDDDDDDDDDDUUUfffUUUUUUDDDDDDDDDUUUDDDUUUDDD333DDDDDDDDDUUUUUUDDDDDDDDDUUU333DDD333UUU333UUUDDDUUUDDDDDDDDDDDDUUU������DDDUUUDDDDDDUUU333������333DDDUUUDDDUUUDDDDDDUUUUUUUUUUUUfffUUUUUUDDD333DDDDDDUUUDDDUUUUUUUUUUUUUUUffffffUUUUUUUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUUUUUUUUUUUUUUUUDDDUUUUUUUUUfffUUUDDDDDDUUUffffffUUUUUUDDDDDDUUUDDDDDDUUUUUUUUUDDDDDDDDDDDDDDDUUUDDDUUUDDDDDDDDDDDDUUUfffUUUUUUDDDDDDDDDUUUDDDfffUUUDDDUUUDDDDDD333DDDDDDUUUUUUUUUUUUDDDDDDDDDDDDUUUDDDUUUDDDUUUUUUUUUUUUfffUUUUUUDDDDDDUUUUUUUUUfffDDDDDDDDDUUUfff333DDDUUUDDDDDDUUU333UUUDDDUUUUUUDDDUUUDDDDDDDDDDDDfffUUUUUUUUUUUUDDDfffUUU333DDDDDD333UUUDDDUUUDDDUUUDDDUUUDDDUUU333���������DDDDDDUUUUUUUUUDDD���������UUUUUUDDDDDDDDDDDDfff333DDDDDDDDDDDDDDDUUUUUUUUUfffUUUDDDUUUUUUDDDDDDDDD���������333UUUUUUUUUUUUfffUUUUUUUUUfffffffffUUUDDDUUUDDDDDD333DDDDDDUUUUUUUUUUUUDDDDDDDDDDDDUUUDDDUUUDDDUUUUUUUUU���������zzzDDDDDDUUUUUUUUUfffDDDDDDDDDUUUfff333DDDUUUDDDDDDUUU333UUUDDDUUUUUUDDDUUUDDDDDDDDDDDDfffUUUUUUUUUUUUDDDfffUUU333DDDDDD333UUUDDDUUUDDDUUUDDDUUUDDDUUU333DDDDDDUUUDDDDDDUUUUUUUUUDDDDDDUUUUUU������DDDDDDDDDDDDfff333DDD������DDDUUUUUUUUUfffUUUDDDUUUUUUDDDDDDDDDUUUDDDDDD333UUUUUUUUUUUUfffUUUUUUUUUfffffffffUUUDDDUUUDDDDDD333DDDDDDUUUUUUUUUUUUDDDDDDDDDDDDUUUDDDUUUDDDUUUUUUUUUUUUfffUUUUUUDDDDDDUUUUUUUUUfffDDDDDDDDDUUUfff333DDDUUUDDDDDDUUU333UUUDDDUUUUUUDDDUUUDDDDDDDDDDDDfffUUUUUUUUUUUUDDDfffUUU333UUUDDDUUUDDDDDDDDDDDDDDDDDDUUUfffDDDUUUDDDDDDDDDDDDDDDUUUDDDUUUUUUUUUDDDUUUUUUUUUDDDDDDUUUUUUUUUUUUDDDUUUDDDDDDUUUDDDUUUDDDDDDUUUUUUUUUDDDDDDUUUUUUDDDUUUDDDDDDDDDUUUUUUUUUDDDUUUDDDDDDUUUDDDDDDDDDUUUDDDDDDDDDUUUUUUUUUDDDUUU333UUUDDDDDD���������333333UUUUUUDDDUUUhhh�����UUUDDDDDDUUUDDDUUUfffUUUUUUDDDfffDDDDDDUUUffffffUUUDDDDDDUUUUUUDDDUUUUUUhhh�����fffUUUUUUUUUUUUDDDUUUDDDUUUUUUfffUUUDDDUUUDDDDDDDDDDDDDDDDDDUUUfffDDDUUUDDDDDDDDDDDDDDDUUUDDDUUUUUUUUUDDD���������DDDDDDUUUUUUUUUUUUDDDUUUDDDDDDUUUDDDUUUDDDDDDUUUUUUUUUDDDDDDUUUUUUDDDUUUDDDDDDDDDUUUUUUUUUDDDUUUDDDDDDUUUDDDDDDDDDUUUDDDDDDDDDUUUUUUUUUDDDUUU333UUUDDDDDD333DDDDDD333333UUUUUUDDDUUUUUUDDDzzz������DDDUUUDDDUUUfffUUUUUU������DDDDDDUUUffffffUUUDDDDDDUUUUUUDDDUUUUUUUUUDDDUUUfffUUUUUUUUUUUUDDDUUUDDDUUUUUUfffUUUDDDUUUDDDDDDDDDDDDDDDDDDUUUfffDDDUUUDDDDDDDDDDDDDDDUUUDDDUUUUUUUUUDDDUUUUUUUUUDDDDDDUUUUUUUUUUUUDDDUUUDDDDDDUUUDDDUUUDDDDDDUUUUUUUUUDDDDDDUUUUUUDDDUUUDDDDDDDDDUUUUUUUUUDDDUUUDDDDDDUUUDDDDDDDDDDDDUUUDDDUUUDDD333UUUUUUUUUfffUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUfffUUUUUUfffUUUDDDUUUDDDUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUDDD333fffUUUfffUUUDDDUUUDDDDDDUUUUUUUUUDDDDDDUUUUUUDDDUUUUUUDDDDDDUUUDDDDDDDDDDDD333333UUUDDDUUUUUUUUUDDDDDDDDDDDDDDD������DDDUUUUUUUUUUUUUUUUUUUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUDDDUUUUUUUUUDDDUUUUUUfffDDDDDDUUUfffUUUUUUUUUDDDUUUDDDUUUUUUDDDUUUfffUUUUUUDDDUUUYYY������DDDUUUDDDUUUDDD333UUUUUUUUUfffUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUfffUUUUUU���������UUUDDDUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUDDD333fffUUUfffUUUDDDUUUDDDDDDUUUUUUUUUDDDDDDUUUUUUDDDUUUUUUDDDDDDUUUDDDDDDDDDDDD333333UUUDDDUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUUUUUUUUUU���������DDDDDDUUUUUUUUUUUUDDDUUUUUUUUUDDDUUUUUUfffDDDDDDUUUfffUUUUUUUUUDDDUUUDDDUUUUUUDDDUUUfffUUUUUUDDDUUUDDDfffUUUDDDUUUDDDUUUDDD333UUUUUUUUUfffUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUfffUUUUUUfffUUUDDDUUUDDDUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUDDD333fffUUUfffUUUDDDUUUDDDDDDUUUUUUUUUDDDDDDUUUUUUDDDUUUUUUDDDDDDUUUDDDDDDDDD333DDDDDDDDD333UUUUUUUUUUUUDDDUUUUUUDDDUUUDDDUUUUUUDDDDDDDDDDDDfffUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUUUUUDDDDDDDDDDDDUUUUUUfffDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDUUUUUUUUUfffUUUUUUDDDDDDUUUUUUDDDUUUDDDDDDUUUDDDUUUUUUUUUDDD333DDDDDDDDDDDD������UUUUUUDDDUUUUUUDDDDDDUUUUUUUUUUUUfffUUUUUUDDDDDDDDDDDDUUU333DDD333fffDDDUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUUUUUUUDDDUUUDDDDDDUUUUUUDDD���������DDD333DDDDDDDDD333UUUUUUUUUUUUDDDUUUUUUDDDUUUDDDUUUUUUDDDDDDDDDDDDfffUUUUUU���������UUUUUUUUUUUUUUUUUUUUUUUUUUUDDDDDDDDDDDDUUUUUUfffDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDUUUUUUUUUfffUUUUUUDDDDDDUUUUUUDDDUUUDDDDDDUUUDDDUUUUUUUUUDDD333DDDDDDDDDDDDDDDDDDDDDUUUUUUDDDUUUUUUDDDDDDUUU���������fffUUUUUUDDDDDDDDDDDDUUU333DDD333fffDDDUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUUUUUUUDDDUUUDDDDDDUUUUUUDDDDDDDDDUUUDDD333DDDDDDDDD333UUUUUUUUUUUUDDDUUUUUUDDDUUUDDDUUUUUUDDDDDDDDDDDDfffUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUUUUUDDDDDDDDDDDDUUUUUUfffDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDUUUUUUUUUfffUUUUUUDDDDDDUUUUUUDDDUUUDDDDDDDDDDDDDDDUUUDDDDDD333UUUUUU333UUUDDDDDDDDDDDDUUUDDDUUUUUUUUUUUUUUUUUUDDDDDDUUUUUUUUUfffUUUUUUUUUUUU333DDDUUUUUUDDDUUUUUUUUUUUU333UUUDDDUUUUUUUUUUUUDDDUUUUUUffffffDDDfffDDDDDDUUUUUUDDDUUUfffDDDUUUDDDfffDDDUUUDDD333UUUDDD333DDDDDD������UUUUUUUUUUUUDDDUUUUUUUUUUUUDDDDDDUUUUUUUUUUUUUUUDDDUUUUUU333333DDDDDDUUUDDDDDDUUUDDDUUUUUUfffDDDDDDUUUUUUUUUUUUDDDDDDUUUUUUDDDDDDDDD���������UUUDDDDDDDDDDDDDDDUUUDDDDDD333UUUUUU333UUUDDDDDDDDDDDDUUUDDDUUUUUUUUUUUUUUU���������UUUUUUUUUfffUUUUUUUUUUUU333DDDUUUUUUDDDUUUUUUUUUUUU333UUUDDDUUUUUUUUUUUUDDDUUUUUUffffffDDDfffDDDDDDUUUUUUDDDUUUfffDDDUUUDDDfffDDDUUUDDD333UUUDDD333DDDDDDUUUUUUUUUUUUUUUUUUDDDUUUUUUUUUUUU������UUUUUUUUUUUUDDDUUUUUU333333DDDDDDUUUDDDDDDUUUDDDUUUUUUfffDDDDDDUUUUUUUUUUUUDDDDDDUUUUUUDDDDDDDDDDDDUUUfffUUUDDDDDDDDDDDDDDDUUUDDDDDD333UUUUUU333UUUDDDDDDDDDDDDUUUDDDUUUUUUUUUUUUUUUUUUDDDDDDUUUUUUUUUfffUUUUUUUUUUUU333DDDUUUUUUDDDUUUUUUUUUUUU333UUUDDDUUUUUUUUUUUUDDDUUUUUUffffffDDDfffDDDDDDUUUUUUDDDUUUfffDDDDDDDDDUUUDDDUUUDDDUUUDDDUUUUUUUUUDDDDDDUUU333DDDDDDDDDUUUUUUUUUUUUDDDUUUDDDUUUfffUUUUUUDDDDDDDDDUUUUUUDDDDDDDDDDDDDDDDDDUUUUUU333DDDDDDUUUDDDDDDfffDDDUUUfffUUUDDDDDDfffDDDUUUDDDUUU333UUUDDDDDDDDDDDDDDDDDDDDDDDDDDD333DDDDDDDDDDDDDDD������DDDDDDUUUUUUUUUfffUUUDDDUUUDDDDDDUUUUUUDDDUUUDDDUUUUUUUUU333UUUUUUUUUDDDDDDUUUDDDUUUUUUUUUUUUDDDDDDDDDUUUDDDUUUDDDDDDUUUUUUfffDDDUUU���������333DDDDDDDDDUUUDDDUUUDDDUUUDDDUUUUUUUUUDDDDDDUUU333DDDDDDDDDUUUUUUUUUUUUDDD������fffUUUUUUDDDDDDDDDUUUUUUDDDDDDDDDDDDDDDDDDUUUUUU333DDDDDDUUUDDDDDDfffDDDUUUfffUUUDDDDDDfffDDDUUUDDDUUU333UUUDDDDDDDDDDDDDDDDDDDDDDDDDDD333DDDDDDDDDDDDDDDUUUDDDDDDDDDUUUUUUUUUfffUUUDDDUUU������UUUDDDUUUDDDUUUUUUUUU333UUUUUUUUUDDDDDDUUUDDDUUUUUUUUUUUUDDDDDDDDDUUUDDDUUUDDDDDDUUUUUUfffDDDUUUUUUUUUUUU333DDDDDDDDDUUUDDDUUUDDDUUUDDDUUUUUUUUUDDDDDDUUU333DDDDDDDDDUUUUUUUUUUUUDDDUUUDDDUUUfffUUUUUUDDDDDDDDDUUUUUUDDDDDDDDDDDDDDDDDDUUUUUU333DDDDDDUUUDDDDDDfffDDDUUUfffUUUDDDDDDfffDDDUUUDDDUUU333UUUDDDDDDDDDUUUDDD333DDDDDDUUUUUUDDDUUUDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUDDDUUUUUUDDDDDDUUUffffffDDDUUUUUUDDDUUUDDDUUU333333DDDDDDDDDUUUDDDDDDDDDDDDUUUUUUUUUUUUUUUDDDUUUUUUUUUUUUfffUUUDDDUUUDDDDDDUUUDDDUUUDDDDDDDDDDDDUUUDDDDDD333DDDUUUDDDDDDDDDhhh������UUUUUUUUUUUUUUUUUUDDDDDDDDDUUUUUUfffDDDUUUUUUDDDUUUUUU333DDDUUUUUUfffUUUUUUUUUUUUDDDDDDUUUUUUDDDDDDUUUDDDDDDUUUUUUUUUUUUUUUDDDUUUUUU������333DDDUUUDDD333DDDDDDUUUUUUDDDUUUDDDDDDDDDDDDDDDUUUUUUYYYDDDUUUDDDUUUUUUDDD������fffDDDUUUUUUDDDUUUDDDUUU333333DDDDDDDDDUUUDDDDDDDDDDDDUUUUUUUUUUUUUUUDDDUUUUUUUUUhhhfffUUUDDDUUUDDDDDDUUUDDDUUUDDDDDDDDDDDDUUUDDDDDD333DDDUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUUUUUDDDDDDDDD������wwwDDDUUUUUUDDDUUUUUU333DDDUUUUUUfffUUUUUUUUUUUUDDDDDDUUUUUUDDDDDDUUUDDDDDDUUUUUUUUUUUUUUUDDDUUUUUUUUUUUUUUU333DDDUUUDDD333DDDDDDUUUUUUDDDUUUDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUDDDUUUUUUDDDDDDUUUffffffDDDUUUUUUDDDUUUDDDUUU333333DDDDDDDDDUUUDDDDDDDDDDDDUUUUUUUUUUUUUUUDDDUUUUUUUUUUUUfffUUUDDDUUUDDDDDDUUUDDDUUUDDDDDDUUUUUUDDDfffUUUUUUDDDDDDDDDUUUDDDDDDDDDUUUDDDDDD333DDDDDDDDDDDDUUUDDDUUUfffUUUDDDDDDUUUUUUDDDDDDDDDUUU333DDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDD333UUUDDDDDD333DDDUUUDDDDDDDDDUUUDDDDDDDDDDDDUUUDDDUUUDDDDDDDDDDDDDDDDDDmmm������������������DDDDDDUUUDDDDDDDDDmmm�����ƫ��UUUDDDUUUUUUDDDDDDDDDDDDDDDUUUUUUzzz�����������������ݠ��UUUDDDDDDDDDzzz��������DDDDDDDDDUUUUUUDDDUUU������DDDDDDUUUUUUDDDfffUUUUUUDDDDDDDDDhhh������������������```DDDDDDDDDDDDUUUDDD������UUUDDDDDDUUUUUUDDDDDDDDDUUU333DDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDD�����������������諫�UUUDDDDDDDDDUUUDDD�����������DDDUUUDDDDDDDDDYYY��������DDDUUUDDDUUUDDDDDDDDDDDDUUUDDDYYY������������������DDDUUUUUUDDDDDDDDDYYY���������UUUUUUUUUUUUUUUUUUfffUUUUUUDDD���������������YYYDDDDDDUUUUUUDDDUUUUUUUUUDDDDDDDDDUUUUUUDDDfffUUUUUUDDDDDDDDDUUUDDDDDDDDDUUUDDDDDD333DDDDDDDDDDDDUUUDDDUUUfffUUUDDDDDDUUUUUUDDDDDDDDDUUU333DDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDD333UUUDDDDDD333DDDUUUDDDDDDDDDUUUDDDDDDDDDDDDUUUUUUUUUDDDfffUUUfffDDDDDDDDDUUUUUUDDDUUUDDDUUUDDD333DDDDDDDDDDDDDDDUUUffffffUUUUUUDDDUUUUUUDDDDDDDDDUUUUUUDDDUUUDDDUUUUUUDDDDDDUUUDDD333DDD333DDD333DDDUUUDDDDDDDDDUUUUUUDDDUUUUUUUUU333DDDDDDDDDfffDDDUUUDDDDDDDDDUUUUUU�����UUUDDDUUU������DDDUUUUUUDDD���������������DDDDDDDDDDDDDDDUUUDDDDDDfffhhh��ճ��UUUUUUUUU���������zzzDDDUUU���������������UUUUUUUUUfffYYY������������������������YYYfffUUUfffDDDDDDDDD������YYYUUUDDD���������DDDDDDDDDDDDDDDUUUfff������UUUDDDUUUUUUDDDDDDDDDUUUUUUDDDUUUDDDUUUUUUDDDDDDUUUDDD333DDDIII���```DDDUUUYYY������UUUDDDUUUUUU���������������DDDUUUDDDmmm���������������UUUDDDUUUDDDUUUDDDDDDUUUUUU������IIIDDDUUU���������DDDDDDDDDDDDzzz���������������UUUUUUUUUUUUUUUUUUfffUUUmmm��삂�UUUDDD333���������hhhUUUfffDDDDDDUUUUUUUUUUUUDDDUUUUUUDDDfffUUUfffDDDDDDDDDUUUUUUDDDUUUDDDUUUDDD333DDDDDDDDDDDDDDDUUUffffffUUUUUUDDDUUUUUUDDDDDDDDDUUUUUUDDDUUUDDDUUUUUUDDDDDDUUUDDD333DDD333DDD333DDDUUUDDDDDDDDDUUUUUUDDDUUUUUUUUU333DDDDDDDDDfffDDDDDDUUUDDDUUUDDDDDDDDDUUUUUUDDDDDDUUUDDDUUUDDDDDDDDDUUUDDDUUUfffDDDUUUUUUUUUUUU333DDDUUUUUUDDDDDDDDDDDDDDD333333333DDDDDD333DDD333DDDDDDDDDDDDUUUUUUDDDDDDDDDUUUUUUUUUUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDUUUDDDDDDDDDYYY��肂�UUUUUUUUUDDD������333DDDDDDDDDDDDDDDDDD������mmmUUUUUUUUUUUUUUUUUUffffffhhh��왙�UUUUUUUUUUUU���������fffDDDDDDUUUUUUUUU������mmmDDDDDDUUUUUUUUUffffff������UUUDDDDDDDDDUUUDDDUUUDDDDDDDDD������DDDDDDUUUDDD���������DDDUUUDDDUUUfffDDDUUU������UUU333DDDUUUUUUDDDDDDDDDDDDDDD333333333DDDDDD333DDD333DDD������YYYUUUUUUDDDDDD������UUUUUUUUUDDDDDDDDDDDD���������DDDDDDUUUDDDDDDDDDDDD������UUUUUUDDDDDD333DDD333DDD������DDDDDDDDDUUU���������UUUUUUUUUUUUUUUffffff������UUUUUUUUUUUUUUUfffUUU������UUUUUUUUUDDDUUU������UUUUUUUUUffffffUUUUUUUUUDDDDDDDDDUUUDDDUUUDDDDDDDDDUUUUUUDDDDDDUUUDDDUUUDDDDDDDDDUUUDDDUUUfffDDDUUUUUUUUUUUU333DDDUUUUUUDDDDDDDDDDDDDDD333333333DDDDDD333DDD333DDDDDDDDDDDDUUUUUUDDDDDDDDDUUUUUUUUUUUUDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUDDDDDDDDDUUUDDDDDDUUUDDDUUUUUUDDDDDDDDDUUUUUUfffDDDDDDUUUUUUDDDDDDDDDDDDUUUDDDDDD333UUU333333"""DDD333UUUDDDDDDDDDDDD333DDD333UUUUUUUUUDDDUUUUUUUUUUUUUUU333UUU333333DDDUUUDDDDDDUUUDDDUUUDDDDDDDDD��ꠠ�DDDUUUUUUUUUUUU������```DDDUUUDDD333DDDDDD333������DDDfffUUUUUUUUUUUUffffffhhh��젠�UUUUUUUUUUUUUUU���������UUUDDDUUUUUUUUU333������DDDUUUDDDffffffUUUUUUUUU������DDDUUUUUUDDDUUUDDDUUUDDDDDD������DDDDDDUUUDDDUUU������DDDUUUUUUfffDDDDDDzzz������DDDDDDDDDUUUDDDDDD333UUU333333"""DDD333UUUDDDDDDDDDDDDwww���IIIUUUUUUUUUDDD���������UUUUUU333UUU333333DDD���������UUUDDDUUUDDDDDDDDDDDD������UUUUUUUUUUUUDDD333DDD������333DDDDDD333DDD������UUUUUUUUUUUUffffffUUU������UUUUUUUUUUUUUUUfffUUU��쫫�UUUUUUUUU333DDDUUU���������ffffffUUUUUUUUUUUUfffDDDUUUUUUDDDUUUDDDUUUDDDDDDDDDUUUDDDDDDUUUDDDUUUUUUDDDDDDDDDUUUUUUfffDDDDDDUUUUUUDDDDDDDDDDDDUUUDDDDDD333UUU333333"""DDD333UUUDDDDDDDDDDDD333DDD333UUUUUUUUUDDDUUUUUUUUUUUUUUU333UUU333333DDDUUUDDDDDDUUUUUUUUUDDDUUUDDDDDD333DDDUUU333UUUfffUUUUUUUUUDDDUUUUUUDDDUUUDDDDDDfffUUUfffUUUUUUDDDUUUUUUUUUDDDDDDDDDDDD333DDDUUUDDDUUUUUU333DDDDDDDDD333DDDDDDDDDDDDUUUUUUUUUDDDDDD333UUUDDDDDDUUUDDDUUUDDDDDDDDDUUUUUUDDD333������DDDUUUfffDDDDDDUUU������DDDDDDUUUDDDUUUUUU333DDD������fffUUUDDDUUUDDDDDDUUUUUU������DDD333DDDUUUUUUUUU������UUUUUUDDDDDDDDDUUU������DDDUUUUUUUUUUUUUUUUUUhhh������UUUUUUUUUUUUDDDUUUDDDDDD������hhh333UUUfffUUUUUU������UUUDDDUUUDDDDDDfff���������UUUDDDUUUUUUUUUDDDDDDDDDDDD333DDDUUUDDDUUUUUU333DDDYYY���DDDDDDDDDDDDUUU���������DDD333UUUDDDDDDUUUDDD���������DDDUUUUUUDDD333UUUDDD������fffDDDDDDUUU333DDDDDD������mmmUUUUUU333DDDfff������DDDUUUDDDDDDUUUUUUDDD������```DDDUUUUUUUUUUUUUUU������zzzDDDDDDDDDUUUUUUDDD���������UUUUUUUUUUUUUUUUUUDDDUUUUUUUUUUUUDDDUUUDDDDDD333DDDUUU333UUUfffUUUUUUUUUDDDUUUUUUDDDUUUDDDDDDfffUUUfffUUUUUUDDDUUUUUUUUUDDDDDDDDDDDD333DDDUUUDDDUUUUUU333DDDDDDDDD333DDDDDDDDDDDDUUUUUUUUUDDDDDD333UUUDDDDDDUUUDDDUUUDDDDDDDDDUUUDDDUUUDDDUUUDDDDDDDDDDDDUUUfffUUUUUUUUU333UUUDDDDDD333DDDUUUUUUUUUfffDDDDDDUUUDDDfffUUUDDDDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDDDDDDD333DDD333DDDDDDUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDmmm���UUUUUUUUUDDDDDDDDD������DDDDDDDDDDDDDDDUUU333mmm������fffUUUUUUUUUDDDUUUUUU������zzzDDDDDDDDDffffffUUU������DDDDDDDDDUUUUUUmmm������UUUUUUDDDfffUUUUUUDDD���������fffDDDUUUDDDUUUDDDUUUYYY���DDDUUUfffUUUUUUUUU������DDDDDD333DDDUUUUUUUUU������UUUDDDfffUUUDDDDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDDDD������DDD333DDDDDDUUUDDD������DDDDDDUUUDDDDDDUUUDDD������DDDDDDDDDDDDDDDUUUUUU������UUUDDDDDDDDDDDDDDDDDD������DDDDDDUUU333DDDUUU������UUUUUUDDDUUUUUUDDDDDD������DDDDDDffffffUUUUUUUUU������DDDDDDUUUUUUDDDUUUfff���������fffUUUUUUDDDUUUUUUDDDfffDDDUUUDDDUUUDDDUUUDDDDDDDDDDDDUUUfffUUUUUUUUU333UUUDDDDDD333DDDUUUUUUUUUfffDDDDDDUUUDDDfffUUUDDDDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDDDDDDD333DDD333DDDDDDUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDDDDDDDDDDDDDfffUUUDDDDDDUUUDDDUUUUUUfffUUUDDD333333DDDUUUUUUDDDUUUDDDUUUDDDDDDUUUDDDfffUUUUUUDDDDDDDDDUUUUUU333333DDDDDDDDD333UUUDDDDDDDDDUUUUUUUUUDDDDDDUUUUUUDDDDDDDDD333DDDUUUDDDDDDUUUUUUDDDDDDUUUDDDUUUDDDUUUDDD������DDDDDDUUUDDDUUU333DDD������DDDDDDUUUDDDUUUDDDDDD������DDDUUUDDDUUUDDDDDDDDD������333DDDDDDUUUDDDUUUDDD������YYYDDDUUUUUUUUUUUU������DDDDDDDDDUUUUUUUUUUUU������UUUDDDDDDfffUUUDDDDDD������hhhUUUfffUUUDDD333333������UUUDDDUUUDDDUUUDDDDDD������UUUUUUDDDDDDDDDUUUUUU333333DDDDDDDDD333UUUDDDDDD������UUUDDDDDDUUUUUUDDD������wwwDDDUUUDDDDDDUUUUUUDDD������UUUDDDUUUDDDDDDUUUDDD������DDDUUU333DDDDDDDDD������DDDUUUDDDDDDUUUUUU������UUUDDDUUUDDDDDDDDDUUUDDD������DDDUUUDDDUUUDDDUUU������UUUUUUUUUUUUDDDUUUDDD���������UUUUUUUUUUUUfffUUUfffUUUDDDDDDfffUUUDDDDDDUUUDDDUUUUUUfffUUUDDD333333DDDUUUUUUDDDUUUDDDUUUDDDDDDUUUDDDfffUUUUUUDDDDDDDDDUUUUUU333333DDDDDDDDD333UUUDDDDDDDDDUUUUUUUUUDDDDDDUUUUUUDDDDDDDDD333DDDUUUDDDDDDUUUUUUDDDDDDUUUDDDUUUUUUUUUDDDDDDUUUDDDUUUfffUUUUUUDDDDDDUUU333DDDUUUDDDDDDUUUUUUUUUUUUUUUUUUDDDUUUDDDUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDDDDUUUfffDDD333DDDDDDDDDUUUDDDDDDUUUUUUDDDDDDUUUDDDDDDDDDDDDDDDmmm������UUUUUUDDDUUUDDDDDD���������UUUUUUUUU333UUU333DDD������UUUUUUUUUDDDDDDUUU������DDDDDDUUUUUUUUUDDDDDD������DDDUUUUUUUUUUUUfff������DDDDDDDDDDDDDDDDDDUUU������UUUDDDUUUUUUDDDDDDhhh������fffUUUUUUDDDDDDUUUwww������DDDDDDUUUUUUUUUUUUUUU������zzzDDDUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUDDD������YYYDDDDDDUUUfffDDD333������DDDUUUDDDDDDUUUUUUDDDDDD������YYYDDDDDDDDDDDDUUUDDD���������UUUDDDDDDDDDDDDDDD������UUU333UUU333DDDDDDUUU������UUUUUUDDDDDDUUUDDDDDDDDD������UUUUUUUUUDDDDDDUUU������UUUUUUUUUfffDDDUUUDDD���������DDDDDDDDDUUUUUUfffDDDUUUDDDUUUUUUDDDDDDUUUDDDUUUfffUUUUUUDDDDDDUUU333DDDUUUDDDDDDUUUUUUUUUUUUUUUUUUDDDUUUDDDUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDDDDUUUfffDDD333DDDDDDDDDUUUDDDDDDUUUUUUDDDDDDUUUDDDDDDDDD333DDDDDD333DDD333DDDDDDUUUDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDUUUUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDD333333DDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDUUUUUUDDDUUUDDDDDDDDDUUUfffUUUUUUDDDDDDUUUUUUDDDUUUUUUUUUDDDfff������DDDDDDDDDDDDDDD333������DDDUUUDDDDDDDDDDDDUUU������UUUDDDUUUDDDDDDUUU������YYYUUUDDDUUUDDDDDDUUU���������UUUDDDUUUDDDDDDDDD������DDDDDDUUUUUUUUUUUUUUU������mmmDDDDDD333DDDDDD333������DDDUUUDDDDDDDDDDDD���������UUUDDDDDDUUUDDDUUUUUU������DDDDDDDDDDDDDDDDDDDDDDDD333333DDDDDDDDDDDDDDDUUUmmm������DDDDDDUUUUUUDDDUUUDDD������UUUfffUUUUUUDDDDDDUUUUUU������UUUUUUDDDfffUUUDDDUUU������DDDDDD333DDDDDDzzz������DDDDDDDDDDDDUUUUUUDDD������DDDUUUDDDDDDUUUDDDUUU���������UUUDDDDDDUUUDDDUUU������mmmUUUDDDDDDDDDDDD333DDD���������UUUUUUUUUUUUDDDDDDDDDDDDDDD333DDDDDD333DDD333DDDDDDUUUDDDDDDDDDDDDDDDDDDDDDUUUDDDDDDUUUDDDUUUUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDD333333DDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDUUUUUUDDDUUUDDDDDDDDDUUUfffUUUUUUDDDDDDUUUUUUDDDUUUUUUUUUDDDDDDDDD333DDDDDDDDDUUUDDDUUUUUUDDDDDD333UUUDDDUUUUUUDDDDDDDDDUUUDDDUUUDDDDDDfffUUUDDDDDDDDDDDDDDD333333DDDUUU333DDDDDDDDDDDDDDDDDDDDD333UUUDDDDDD333DDDUUUUUUffffffUUUDDDDDDDDDDDDUUUDDDDDDUUUUUUUUUUUU������YYYDDD333DDDDDD333DDD������UUUDDDDDDDDDDDDUUUDDD������UUUDDDUUUDDDDDDDDDYYY������UUUfffUUUUUU333UUUDDD���������DDDDDDDDDUUUUUUUUU������DDDDDDDDDUUUUUUUUUUUUfff������DDDUUUDDDDDDDDDDDD333������mmmUUUDDDUUUUUUDDDDDD������UUUUUUDDDDDDDDDUUUDDD������DDDfffUUUDDDDDDDDDDDDDDD333333DDDUUU333DDDDDDDDD������DDD333UUUDDDDDD333���������ffffffUUUDDDDDDDDDDDDUUU������UUUUUUUUUUUUUUUUUUDDD������DDD333DDDDDDDDD������DDDDDDDDDUUUDDDUUU���������UUUDDDDDDDDDDDDDDDDDD������UUU333UUUDDDDDDDDD������DDDDDDUUUUUUUUU333333DDD������UUUUUUUUUfffDDDDDDDDDUUUDDDDDDDDDDDD333DDDDDDDDDUUUDDDUUUUUUDDDDDD333UUUDDDUUUUUUDDDDDDDDDUUUDDDUUUDDDDDDfffUUUDDDDDDDDDDDDDDD333333DDDUUU333DDDDDDDDDDDDDDDDDDDDD333UUUDDDDDD333DDDUUUUUUffffffUUUDDDDDDDDDDDDUUUDDDDDDUUUUUUDDDDDDDDDDDD333DDDUUUDDDDDDDDDDDDDDD333DDD333DDDDDDUUUDDDfffDDDDDDDDDDDDDDDUUUDDD333DDDUUUDDDDDDDDD333333DDDUUUDDD333DDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDUUUUUUUUUDDDUUUUUUUUUUUUUUUDDDUUUUUUDDDDDDYYY������DDDDDDDDDDDDDDDUUUUUU������DDDDDDDDDDDDDDDDDDfff������DDDDDDDDDDDDDDD333���������UUUDDDDDDDDDDDDUUUfff������UUUDDDUUUDDDUUUDDD������DDDUUUUUUfffUUUUUUUUUfff������UUUDDDDDDDDDDDDDDDYYY������UUUDDDDDDDDDDDDDDD333������DDDUUUDDDfffDDDDDDDDD������UUUDDD333DDDUUUDDDDDDDDD333333DDDUUUDDD333DDDUUU������DDDDDDDDDDDDDDDDDD���������UUUUUUDDDUUUUUUUUUUUUzzz������UUUDDDDDDDDDDDDDDDDDD������DDDUUUUUUDDDUUU������DDDDDDDDDDDDfffDDD���������DDDDDDDDD333DDDUUUUUU������DDDDDDUUUfffUUU���������DDDUUUDDDUUUDDD333DDDDDD������wwwUUUUUUUUUfff333DDDUUUDDDDDDDDDDDDDDDDDD333DDDUUUDDDDDDDDDDDDDDD333DDD333DDDDDDUUUDDDfffDDDDDDDDDDDDDDDUUUDDD333DDDUUUDDDDDDDDD333333DDDUUUDDD333DDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUDDDUUUUUUUUUDDDUUUUUUUUUUUUUUUDDDUUUUUUDDDDDDDDDDDD333333UUUUUUDDDDDDUUUUUUDDDDDDDDDDDDUUUDDDUUUUUUDDDUUUDDDUUUUUUDDDDDDDDDDDDUUUDDD333DDD333DDDDDDDDDUUU333DDD333DDDDDDDDDDDDDDDDDDUUUDDDUUUDDDUUUUUUDDDfffUUUDDDUUUUUUDDDUUUUUUDDDUUUDDDDDDDDD���������UUUUUUDDDDDDUUU333YYY������mmm333DDDUUUDDDDDDUUUUUU������DDDDDDUUUDDDDDDDDD������DDDUUUDDDDDDDDDUUUUUU������DDDUUUUUUfffUUUDDD������DDDUUUUUUUUUUUUUUUUUUUUU������DDDUUU333DDDDDDDDDwww������UUUDDDDDDUUUUUUDDDDDD������DDDUUUUUUDDDUUUDDDzzz������DDDDDDDDDUUUDDD333DDD333DDDDDDDDDUUU333DDD333DDD������YYYDDDDDDUUUDDDUUUDDD���������fffUUUDDDUUUUUUDDDUUU���������DDDDDDDDDDDDDDD333hhh������mmmUUU333DDDDDDDDD������YYYUUUDDDDDDUUUUUUUUU������UUUDDDDDDDDDfffDDDUUU������mmmDDDDDDUUUUUUDDD���������UUUUUUfffUUUDDDDDDDDDDDD������UUUUUUUUUUUUUUUDDDUUUDDDUUU333DDDDDDDDD333333UUUUUUDDDDDDUUUUUUDDDDDDDDDDDDUUUDDDUUUUUUDDDUUUDDDUUUUUUDDDDDDDDDDDDUUUDDD333DDD333DDDDDDDDDUUU333DDD333DDDDDDDDDDDDDDDDDDUUUDDDUUUDDDUUUUUUDDDfffUUUDDDUUUUUUDDDUUUUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUUUUDDDUUUDDDUUUDDDDDD333333UUUUUUUUUDDDUUUDDDUUUUUUDDDDDDUUUDDDDDDUUU333DDD333DDDDDDDDDDDDDDDDDDDDDUUUDDDUUUDDDDDDDDD333333DDDDDDDDDDDDDDDfffDDDUUUUUUDDD333DDDUUUUUUDDDUUUDDDUUUUUU���������DDDUUUDDDUUUDDDUUU���������DDDUUUDDDUUUDDDDDDUUUhhh������UUUUUUUUUUUUUUUUUU������wwwDDDUUU333333DDDUUU���������UUUDDDDDDDDD333YYY���UUUDDDUUUUUUUUUDDDDDD���������DDDUUUDDDDDDDDDUUU���������UUUDDDUUUDDDUUUDDD���������UUUUUUUUUDDDUUUDDDUUU���������UUUDDDDDDUUU333DDD333DDDDDDDDDDDDDDDDDDDDDUUUYYY������DDDDDD333333DDDDDDYYY������DDDUUUUUUDDD333DDDUUU������DDDUUUUUUDDDDDDDDD���������UUUDDDUUUUUUUUUhhh������DDDUUUDDDDDDUUUUUUhhh������UUUUUUUUUUUUDDDUUU333������333333DDDUUUDDDDDD���������DDDDDDDDD333DDDDDD333zzz���UUUUUUDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDUUUDDDDDDUUUUUUDDDUUUDDDUUUDDDDDD333333UUUUUUUUUDDDUUUDDDUUUUUUDDDDDDUUUDDDDDDUUU333DDD333DDDDDDDDDDDDDDDDDDDDDUUUDDDUUUDDDDDDDDD333333DDDDDDDDDDDDDDDfffDDDUUUUUUDDD333DDDUUUUUUDDDUUUDDDUUUUUUDDDDDDDDDUUUDDDUUUDDDDDDUUUDDD333333DDDDDDUUUUUUDDDDDDDDDUUUDDDDDDDDD333UUUUUUUUUUUUDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUUUUDDDDDDDDDDDDDDD333DDDDDDDDD333333UUUUUUfffUUUDDD333DDDDDDUUUDDDDDDUUUDDDUUUDDD���������DDDDDDDDDDDDUUUDDD���������UUUDDDDDDUUUDDDDDDDDD���������DDDDDDDDDUUUDDDfff������UUUUUUDDDDDDDDDhhh���������333DDD333UUUUUU333������UUUUUUffffffDDDDDDDDD���������DDDDDDUUUUUUDDDDDD���������UUUDDDDDDUUUDDD333���������UUUUUUDDDDDDDDDUUUDDD������UUUUUUUUUUUUDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUUUU���������DDDDDD333DDDDDDDDD���������fffUUUDDD333DDDDDDUUU������DDDUUUDDDDDDDDD������������DDDUUUDDDUUUUUU���������DDDUUUDDDDDDDDDDDD���������DDDUUUDDDfffDDDDDDDDD������DDDDDDDDDUUUDDDDDD���������333UUUUUU333DDDDDD333������ffffffDDDDDDDDDDDDDDDUUUDDDDDDUUUUUUDDDDDDDDDUUUDDDUUUDDDDDDUUUDDD333333DDDDDDUUUUUUDDDDDDDDDUUUDDDDDDDDD333UUUUUUUUUUUUDDDDDDDDDUUUDDDDDDUUUDDDDDDUUUUUUDDDDDDDDDDDDDDD333DDDDDDDDD333333UUUUUUfffUUUDDD333DDDDDDUUUDDDDDDUUUDDDUUUUUUUUUDDDDDDUUUUUUDDDDDDDDD333DDDDDDDDDDDDUUUfffUUUUUUUUUUUUDDDDDDDDD333UUUUUUUUUDDD333DDDDDDUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUDDDUUUDDDDDD���������DDDDDDUUUUUUDDD������������333UUUUUUDDDUUUUUUUUU���������UUUDDDUUUDDDUUU333������UUUUUU333DDDhhh����������DDDUUUUUUUUUUUU333���������DDDfffUUUfffDDDDDDUUU���������DDDUUUUUUUUUUUUDDD���������DDDDDDDDD333DDD������������fffUUUUUUUUUUUUDDDDDD���������UUUUUUDDD333DDDDDDUUUDDDDDDDDDDDDDDDUUUDDDDDD���������DDDDDDDDDDDDDDD������������DDDDDDDDDUUUUUUUUUUUU������UUUDDDDDDDDD��������������UUUDDDUUUUUUDDD���������UUUDDDUUUUUUUUU������������UUUDDDUUU333UUUDDDYYY������333DDDUUUDDDDDDDDDwww������UUUUUU333DDDDDDhhh���UUUfffDDDDDDUUUDDDUUUUUUDDDUUUUUUUUUUUUDDDDDDUUUUUUDDDDDDDDD333DDDDDDDDDDDDUUUfffUUUUUUUUUUUUDDDDDDDDD333UUUUUUUUUDDD333DDDDDDUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUUUUDDDUUUDDDUUUfffUUUDDDDDDUUUDDDDDDDDD333DDD333DDDUUUUUUUUUUUUUUUUUUDDDDDDDDDDDDUUUUUUUUUDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUDDDDDDUUU333DDDDDDDDDDDDDDD333UUUDDDDDDUUUDDDUUUDDDDDDDDDDDDDDDUUUDDDfffUUUUUUUUUDDD333DDD���������DDDUUUDDDhhh��Ǝ�����������hhhDDD333UUUDDDUUUUUU���������UUUDDDYYYhhhDDDDDD������UUUDDDDDDzzz���III���������DDDDDDDDDUUUDDDDDD���������UUUfffhhhhhhDDDDDDUUU���������DDDUUUfffUUUfffUUU���������DDDDDDDDDIII���www���������UUUUUUUUUUUUDDDDDDDDD���������UUUDDDDDDYYYDDDUUUDDDDDDDDDDDDUUUDDDDDDUUU333���������YYYDDD333UUU������UUU������DDDDDDDDDDDDUUUDDDfff������DDD333YYY�����DDD���������UUUUUU���DDDDDD���������IIIUUUDDDUUU������UUU������DDDUUUDDDDDDUUUDDD���������YYYUUUDDD```DDD333DDD���������UUUDDDDDDUUUUUU��Վ��fffUUUUUUDDDDDDUUUUUUDDDUUUDDDUUUfffUUUfffUUUDDDDDDUUUDDDDDDDDD333DDD333DDDUUUUUUUUUUUUUUUUUUDDDDDDDDDDDDUUUUUUUUUDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUDDDDDDUUU333DDDDDDDDDDDDDDD333UUUDDDDDDUUUDDDUUUDDDDDDDDDDDDDDDUUUDDDfffUUUUUUUUUDDD333UUUDDD333UUUDDDfffUUUDDDUUUUUUUUUUUUfffUUUUUUUUUUUUUUUDDD333DDDUUUUUUDDDUUUUUUDDDDDDUUUUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUUUUDDDUUUDDDUUUUUUUUUUUUUUUDDDUUUDDDUUUDDDUUUUUUUUUUUU��������������������mmmDDD�����������������Ƴ��DDDDDDUUU��������������ٳ��hhhUUUUUU��������������DDDDDD���������UUUUUUDDDDDDDDDUUU��������������٫��YYYDDDDDDDDD������������zzzDDD333�����������Ƃ��������zzzUUU��������������Ƴ��DDD333DDDUUU�����������ՠ��UUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDmmm��������ꂂ������ՠ��UUUDDD���������������hhhUUUDDDUUUDDD������������������hhhDDDUUU����������������DDDDDDmmm��������쎎������ՠ��UUUDDD������������������hhhUUUUUU������������������mmmUUUUUUUUU���������DDDUUUmmm��Ǝ��fffUUUDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDDDDUUUDDD333UUUDDDfffUUUDDDUUUUUUUUUUUUfffUUUUUUUUUUUUUUUDDD333DDDUUUUUUDDDUUUUUUDDDDDDUUUUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUUUUDDDUUUDDDUUUUUUUUUUUUUUUDDDUUUDDDUUUDDDUUUUUUUUUDDDDDDDDDDDDUUUDDDUUUDDDUUUDDDfffffffffDDDDDDUUUUUUDDD333DDDUUUDDDDDDfffUUUDDDDDDUUUUUUUUUUUUDDDUUUUUUfffUUUDDDUUUUUUDDD333UUUUUUDDDDDDUUUDDDDDDUUUUUUDDDDDDfffUUUUUUDDDUUUUUUUUUDDDUUUUUUUUUUUUDDDUUUYYY�����������Ǝ��fff333UUUhhh����������UUUUUUUUUUUUDDD��������곳�YYYUUUUUUUUUUUU�����������ꫫ�YYYUUUDDDUUU������UUUUUUUUUUUUUUUDDD��������곳�YYYUUUUUUUUUDDDUUU��������������DDDDDDDDDDDDYYY��������������DDDffffffwww���������zzzDDD333DDDUUUDDDmmm����������hhhUUUUUUUUUDDDUUUUUUfffUUUDDDUUUUUUDDD333�����������ՠ��YYYDDDUUUUUU��������ݠ��UUUDDDUUUUUUUUUDDD������������mmmUUUDDDDDDUUUzzz�����컻�IIIUUUUUUUUUDDD�����������٠��hhhDDDUUUUUU��������곳�hhhUUUUUUUUUUUUhhh���������zzzDDDUUUUUUUUUUUUUUU����������������YYYDDDUUUDDDUUUUUUUUUDDDUUUUUUDDDUUUDDD"""DDDDDDDDDDDDDDDUUUDDDUUUDDDUUUDDDfffffffffDDDDDDUUUUUUDDD333DDDUUUDDDDDDfffUUUDDDDDDUUUUUUUUUUUUDDDUUUUUUfffUUUDDDUUUUUUDDD333UUUUUUDDDDDDUUUDDDDDDUUUUUUDDDDDDfffUUUUUUDDDUUUUUUUUUDDDUUUUUUUUUUUUDDDUUUDDDDDDUUUDDDDDDUUUUUUDDDfffUUUUUUUUUDDDDDDUUUUUUDDDUUUfffUUUDDDUUUfffUUUDDDDDDDDDDDDUUUDDDUUUfffUUUDDDDDDUUUDDD333333DDDUUUUUUDDDDDDDDD333DDDUUUDDDUUUfffUUUUUUUUUUUUUUUDDDDDDUUUUUUfffUUUUUUUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDDDDDDDDDDDDDDDDUUUUUUDDDUUUDDDUUUUUUfffDDDUUUUUUUUUUUUUUUUUUUUUDDDUUUDDDDDDUUUDDDUU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DDDDDDDD333DDDDDDDDDDDDUUUUUUUUUDDDDDDDDDUUUUUUUUUDDDUUUUUUDDDDDDUUUDDD���������������������YYYUUUDDDDDDUUUDDDDDDDDDUUUDDDDDDUUUUUUUUUUUUUUUfffDDDDDDDDDUUUUUUUUUUUUUUUDDDDDDUUUDDDUUUDDDUUUfffDDDDDDfffUUUUUUUUUDDDDDDUUUUUUDDDDDDDDD333UUUUUUUUUDDDDDDDDDUUUDDDUUUDDDUUUDDDDDDUUUDDDDDDDDDUUUUUUDDDDDDDDDUUUDDDUUUUUUUUUUUUDDDDDDUUUDDDDDDDDDUUUDDDfffUUUDDDUUUUUUUUUUUUfffDDDDDD333DDDUUUUUUDDDDDDDDD333DDDDDDDDDDDDUUUUUUUUUDDDDDDDDDUUUUUUUUUDDDUUUUUUDDDDDDUUUDDDDDDDDDUUUUUUfffUUUDDDDDDUUUDDDDDDUUUDDDDDDDDDUUUDDDDDDUUUUUUUUUUUUUUUfffDDDDDDDDDUUUUUUUUUUUUUUUDDDDDDUUUDDDUUUDDDUUUfffDDDDDDfffUUUUUUUUUDDDDDDUUUUUUDDDDDDDDD333UUUUUUUUUDDDDDDDDDUUUDDDUUUDDDUUUDDDDDDUUUDDDDDDDDDUUUUUUDDDDDDDDDUUUDDDUUUUUUUUUUUUDDDDDDUUUDDDDDDDDDUUUDDDfffUUUDDDUUUUUUUUUUUUfffDDDDDDDDDDDDDDDUUUDDDUUUDDDfffDDDDDDUUUDDDUUUDDDDDDDDDDDD333DDDUUUDDDUUUUUUDDDDDDDDDDDDUUUUUUDDDDDDDDDDDDDDDDDDUUUDDDUUUDDDUUUUUUUUUDDDUUUfffDDDDDDDDDDDDUUUDDDUUUUUUDDDUUUDDDDDDUUUUUUDDDUUUUUUUUUUUU333DDDDDDUUUDDDDDDDDDDDDDDDDDDDDD333UUUUUUUUUDDDDDDDDDDDDDDDDDDUUUfffUUUDDDUUUUUUUUUDDD�����������곳�mmmDDDDDDDDDUUUDDDDDDDDDUUUUUUD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UDDDUUUDDDDDDDDD333DDD333DDDDDDDDDfffDDDUUUDDDUUUUUUfffUUUDDDDDDUUUUUUDDDUUUDDDUUUUUUUUUUUU333333333DDDDDDUUUUUUDDDDDDUUUDDDDDDDDDDDD333333DDDDDD333DDD333333DDDDDDDDDUUUDDDDDDDDD333DDDUUUUUUUUUDDDDDDDDDDDDDDD333DDD333DDDUUUDDDUUUDDDUUUDDDUUUUUUDDDDDD333DDDUUUUUUDDDDDD333UUUUUUUUUDDD333UUUUUUDDDDDDDDDUUUDDDUUUUUUUUUDDDDDDUUUUUUDDDDDDDDDDDDUUUDDDUUUDDDDDDUUUDDDUUUUUUUUUUUUUUUDDDDDDDDDUUUUUUUUUDDDUUUDDDUUUUUUUUUfffDDDDDDDDD333UUUDDDDDDDDDDDDUUU333DDDDDD333DDD333UUUDDDDDDDDD333333333DDDDDDUUUUUUDDDDDDUUUDDDDDDDDDDDD333333DDDDDD333DDD333333DDDDDDDDDUUUDDDDDDDDD333DDDUUUUUUUUUDDDDDDDDDDDDDDD333DDD333DDDUUUDDDUUUDDDUUUDDDUUUUUUDDDDDD333DDDUUUUUUDDDDDD333UUUUUUUUUDDD333UUUUUUDDDDDDDDDUUUDDDUUUUUUUUUDDDDDDUUUUUUDDDDDDDDDDDDUUUDDDUUUDDDDDDUUUDDDUUUUUUUUUUUUUUUDDDDDDDDDUUUUUUUUUDDDUUUDDDUUUUUUUUUfffDDDDDDDDD333UUUDDDDDDDDDDDDUUU333DDDDDD333DDD333UUUDDDDDDDDD333333333DDDDDDUUUUUUDDDDDDUUUDDDDDDDDDDDD333333DDDDDD333DDD333333DDDDDDDDDUUUDDDDDDDDD333DDDUUUUUUUUUDDDDDDDDDDDDDDD333DDD333DDDUUUDDDUUUDDDUUUDDDUUUUUUDDDDDD333DDDUUUUUUDDDDDD333UUUUUUUUUDDD333333DDDDDDUUUUUUUUUDDDDDDDDDDDD333UUUUUUDDDDDDDDDDDDDDDUUUDDD333UUUDDDDDDUUUUUUUUUDDD333DDDDDDDDDUUUDDDDDDDDDDDD333333DDD333333UUUUUUUUUUUUDDDUUUDDDDDDDDDUUUDDDDDDDDDDDD333DDD333DDDUUUUUUDDDDDDDDDDDD333DDDDDDDDDUUUUUUUUUUUUUUUDDDDDDUUUUUUDDDDDDDDD333DDDUUU333333UUUUUUDDDDDDDDDfffDDDDDDDDDUUUUUUUUUUUUDDDUUUDDDUUUUUUUUUUUUDDDDDDUUUUUUUUUUUUDDDDDDUUUDDD333333DDD333333DDDUUUDDDDDDUUUDDD333DDDDDDUUUUUUUUUDDDDDDDDDDDD333UUUUUUDDDDDDDDDDDDDDDUUUDDD333UUUDDDDDDUUUUUUUUUDDD333DDDDDDDDDUUUDDDDDDDDDDDD333333DDD333333UUUUUUUUUUUUDDDUUUDDDDDDDDDUUUDDDDDDDDDDDD333DDD333DDDUUUUUUDDDDDDDDDDDD333DDDDDDDDDUUUUUUUUUUUUUUUDDDDDDUUUUUUDDDDDDDDD333DDDUUU333333UUUUUUDDDDDDDDDfffDDDDDDDDDUUUUUUUUUUUUDDDUUUDDDUUUUUUUUUUUUDDDDDDUUUUUUUUUUUUDDDDDDUUUDDD333333DDD333333DDDUUUDDDDDDUUUDDD333DDDDDDUUUUUUUUUDDDDDDDDDDDD333UUUUUUDDDDDDDDDDDDDDDUUUDDD333UUUDDDDDDUUUUUUUUUDDD333DDDDDDDDDUUUDDDDDDDDDDDD333333DDD333333UUUUUUUUUUUUDDDUUUDDDDDDDDDUUUDDDDDDDDDDDD333DDD333DDDUUUUUUDDDDDDDDD333UUUDDDUUUDDDDDDDDD333DDDDDDUUUDDDUUU333UUUUUUUUUUUUDDD333DDD333DDDDDDUUUUUUUUUDDDDDDDDDUUUDDDDDD333DDD333333DDDDDD333UUUDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUDDDUUUDDDUUUUUUDDDUUUUUUUUUfffDDDDDDUUUDDDDDDDDDDDDUUU333DDDUUUUUUUUUUUUDDDUUUUUUDDDDDDDDDUUUUUUUUUDDD333DDDUUUUUUDDDDDDffffffDDDUUUUUUDDDUUUDDDUUUDDDUUUUUUDDDDDDUUUfffUUUUUUUUUUUUUUUDDDDDD333333DDD333333333333333333DDD333DDDDDDDDD333UUUDDDUUUDDDDDDDDD333DDDDDDUUUDDDUUU333UUUUUUUUUUUUDDD333DDD333DDDDDDUUUUUUUUUDDDDDDDDDUUUDDDDDD333DDD333333DDDDDD333UUUDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUDDDUUUDDDUUUUUUDDDUUUUUUUUUfffDDDDDDUUUDDDDDDDDDDDDUUU333DDDUUUUUUUUUUUUDDDUUUUUUDDDDDDDDDUUUUUUUUUDDD333DDDUUUUUUDDDDDDffffffDDDUUUUUUDDDUUUDDDUUUDDDUUUUUUDDDDDDUUUfffUUUUUUUUUUUUUUUDDDDDD333333DDD333333333333333333DDD333DDDDDDDDD333UUUDDDUUUDDDDDDDDD333DDDDDDUUUDDDUUU333UUUUUUUUUUUUDDD333DDD333DDDDDDUUUUUUUUUDDDDDDDDDUUUDDDDDD333DDD333333DDDDDD333UUUDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUDDDUUUDDDUUUUUUDDDUUUUUUUUUfffDDDDDDUUUDDD333DDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDDDDUUUDDDDDDDDDDDDUUUUUUUUUDDD333333UUUDDDUUUDDDUUUDDDDDDDDD333DDD333DDDUUU333DDDDDDUUUDDDUUUUUUDDDDDDDDDUUUUUUUUUUUUDDDUUUUUUUUUUUUUUUUUUDDDUUUDDDDDDUUUDDDDDDDDDUUUUUUUUUUUU333DDDUUUUUUUUUUUUDDDDDDUUUDDDDDDDDDDDDUUUDDDUUUUUUUUUDDDDDDDDDUUUUUUUUUUUUUUUDDDUUUfffUUUUUUfffUUUUUUUUUUUUUUUUUUDDDDDDDDD333DDDDDD333333DDDDDD333333333DDDDDD333333DDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDDDD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D333DDDUUUDDDDDDDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUDDDUUUDDDDDDDDDDDDDDDDDDUUU333DDDfffUUUDDDDDDUUUUUUDDDUUUDDDUUUUUUUUUDDDUUUDDDUUUUUUfffDDDUUUUUUUUUUUUDDDfffDDDUUUUUUUUUUUUUUUUUUfffDDDUUUDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDUUU
\ No newline at end of file
}
void
-StreamView::remove_region_view (boost::shared_ptr<Region> r)
+StreamView::remove_region_view (boost::weak_ptr<Region> weak_r)
{
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_region_view), r));
+ ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_region_view), weak_r));
+
+ boost::shared_ptr<Region> r (weak_r.lock());
+
+ if (!r) {
+ return;
+ }
for (list<RegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
if (((*i)->region()) == r) {
}
}
-#if 0
-(unused)
-void
-StreamView::remove_rec_region (boost::shared_ptr<Region> r)
-{
- ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::remove_rec_region), r));
-
- if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) {
- fatal << "region deleted from non-GUI thread!" << endmsg;
- /*NOTREACHED*/
- }
-
- for (list<boost::shared_ptr<Region> >::iterator i = rec_regions.begin(); i != rec_regions.end(); ++i) {
- if (*i == r) {
- rec_regions.erase (i);
- break;
- }
- }
-}
-#endif
-
void
StreamView::undisplay_diskstream ()
{
if (rec_active && rec_rects.size() > 0) {
/* only update the last box */
RecBoxInfo & rect = rec_rects.back();
- jack_nframes_t at = _trackview.get_diskstream()->current_capture_end();
+ nframes_t at = _trackview.get_diskstream()->current_capture_end();
double xstart;
double xend;
}
void
-StreamView::get_selectables (jack_nframes_t start, jack_nframes_t end, list<Selectable*>& results)
+StreamView::get_selectables (nframes_t start, nframes_t end, list<Selectable*>& results)
{
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
if ((*i)->region()->coverage(start, end) != OverlapNone) {
struct RecBoxInfo {
ArdourCanvas::SimpleRect* rectangle;
- jack_nframes_t start;
- jack_nframes_t length;
+ nframes_t start;
+ nframes_t length;
};
class PublicEditor;
void foreach_regionview (sigc::slot<void,RegionView*> slot);
void set_selected_regionviews (RegionSelection&);
- void get_selectables (jack_nframes_t start, jack_nframes_t end, list<Selectable* >&);
+ void get_selectables (nframes_t start, nframes_t end, list<Selectable* >&);
void get_inverted_selectables (Selection&, list<Selectable* >& results);
void add_region_view (boost::shared_ptr<ARDOUR::Region>);
virtual void update_rec_regions () = 0;
virtual void add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_waves) = 0;
- virtual void remove_region_view (boost::shared_ptr<ARDOUR::Region> );
+ virtual void remove_region_view (boost::weak_ptr<ARDOUR::Region> );
//void remove_rec_region (boost::shared_ptr<ARDOUR::Region>); (unused)
void display_diskstream (boost::shared_ptr<ARDOUR::Diskstream>);
using namespace ARDOUR;
using namespace PBD;
-TempoDialog::TempoDialog (TempoMap& map, jack_nframes_t frame, const string & action)
+TempoDialog::TempoDialog (TempoMap& map, nframes_t frame, const string & action)
: ArdourDialog ("tempo dialog"),
bpm_frame (_("Beats per minute")),
ok_button (action),
}
-MeterDialog::MeterDialog (TempoMap& map, jack_nframes_t frame, const string & action)
+MeterDialog::MeterDialog (TempoMap& map, nframes_t frame, const string & action)
: ArdourDialog ("meter dialog"),
note_frame (_("Meter denominator")),
bpb_frame (_("Beats per bar")),
Gtk::Frame when_frame;
char buf[64];
- TempoDialog (ARDOUR::TempoMap&, jack_nframes_t, const string & action);
+ TempoDialog (ARDOUR::TempoMap&, nframes_t, const string & action);
TempoDialog (ARDOUR::TempoSection&, const string & action);
double get_bpm ();
Gtk::Frame when_frame;
char buf[64];
- MeterDialog (ARDOUR::TempoMap&, jack_nframes_t, const string & action);
+ MeterDialog (ARDOUR::TempoMap&, nframes_t, const string & action);
MeterDialog (ARDOUR::MeterSection&, const string & action);
double get_bpb ();
}
void
-TimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
+TimeAxisView::show_timestretch (nframes_t start, nframes_t end)
{
for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
(*i)->show_timestretch (start, end);
selection_group->raise_to_top();
for (list<AudioRange>::iterator i = ts.begin(); i != ts.end(); ++i) {
- jack_nframes_t start, end, cnt;
+ nframes_t start, end, cnt;
start = (*i).start;
end = (*i).end;
}
void
-TimeAxisView::get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& result)
+TimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& result)
{
return;
}
virtual void show_selection (TimeSelection&);
virtual void hide_selection ();
virtual void reshow_selection (TimeSelection&);
- virtual void show_timestretch (jack_nframes_t start, jack_nframes_t end);
+ virtual void show_timestretch (nframes_t start, nframes_t end);
virtual void hide_timestretch ();
virtual void hide_dependent_views (TimeAxisViewItem&) {}
/* editing operations */
virtual bool cut_copy_clear (Selection&, Editing::CutCopyOp) { return false; }
- virtual bool paste (jack_nframes_t, float times, Selection&, size_t nth) { return false; }
+ virtual bool paste (nframes_t, float times, Selection&, size_t nth) { return false; }
virtual void set_selected_regionviews (RegionSelection&) {}
virtual void set_selected_points (PointSelection&) {}
- virtual boost::shared_ptr<ARDOUR::Region> find_next_region (jack_nframes_t pos, ARDOUR::RegionPoint, int32_t dir) {
+ virtual boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t pos, ARDOUR::RegionPoint, int32_t dir) {
return boost::shared_ptr<ARDOUR::Region> ();
}
void order_selection_trims (ArdourCanvas::Item *item, bool put_start_on_top);
- virtual void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results);
+ virtual void get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& results);
virtual void get_inverted_selectables (Selection&, list<Selectable *>& results);
/* state/serialization management */
* @param duration the duration of this item
*/
TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color,
- jack_nframes_t start, jack_nframes_t duration,
+ nframes_t start, nframes_t duration,
Visibility vis)
: trackview (tv)
{
* @return true if the position change was a success, false otherwise
*/
bool
-TimeAxisViewItem::set_position(jack_nframes_t pos, void* src, double* delta)
+TimeAxisViewItem::set_position(nframes_t pos, void* src, double* delta)
{
if (position_locked) {
return false;
*
* @return the position of this item
*/
-jack_nframes_t
+nframes_t
TimeAxisViewItem::get_position() const
{
return frame_position;
* @return true if the duration change was succesful, false otherwise
*/
bool
-TimeAxisViewItem::set_duration (jack_nframes_t dur, void* src)
+TimeAxisViewItem::set_duration (nframes_t dur, void* src)
{
if ((dur > max_item_duration) || (dur < min_item_duration)) {
warning << string_compose (_("new duration %1 frames is out of bounds for %2"), get_item_name(), dur)
item_duration = dur;
- double pixel_width = trackview.editor.frame_to_pixel (dur);
-
- reset_width_dependent_items (pixel_width);
+ reset_width_dependent_items (trackview.editor.frame_to_pixel (dur));
DurationChanged (dur, src) ; /* EMIT_SIGNAL */
return true;
* Returns the duration of this item
*
*/
-jack_nframes_t
+nframes_t
TimeAxisViewItem::get_duration() const
{
return (item_duration);
* @param src the identity of the object that initiated the change
*/
void
-TimeAxisViewItem::set_max_duration(jack_nframes_t dur, void* src)
+TimeAxisViewItem::set_max_duration(nframes_t dur, void* src)
{
max_item_duration = dur ;
MaxDurationChanged(max_item_duration, src) ; /* EMIT_SIGNAL */
*
* @return the maximum duration that this item may be set to
*/
-jack_nframes_t
+nframes_t
TimeAxisViewItem::get_max_duration() const
{
return (max_item_duration) ;
* @param src the identity of the object that initiated the change
*/
void
-TimeAxisViewItem::set_min_duration(jack_nframes_t dur, void* src)
+TimeAxisViewItem::set_min_duration(nframes_t dur, void* src)
{
min_item_duration = dur ;
MinDurationChanged(max_item_duration, src) ; /* EMIT_SIGNAL */
*
* @return the nimum duration that this item mey be set to
*/
-jack_nframes_t
+nframes_t
TimeAxisViewItem::get_min_duration() const
{
return(min_item_duration) ;
}
} else {
name_highlight->show();
- if (name_text) {
+ if (name_text && !get_item_name().empty()) {
name_text->show();
reset_name_width (pixel_width);
}
* @param src the identity of the object that initiated the change
* @return true if the position change was a success, false otherwise
*/
- virtual bool set_position(jack_nframes_t pos, void* src, double* delta = 0) ;
+ virtual bool set_position(nframes_t pos, void* src, double* delta = 0) ;
/**
* Return the position of this item upon the timeline
*
* @return the position of this item
*/
- jack_nframes_t get_position() const ;
+ nframes_t get_position() const ;
/**
* Sets the duration of this item
* @param src the identity of the object that initiated the change
* @return true if the duration change was succesful, false otherwise
*/
- virtual bool set_duration(jack_nframes_t dur, void* src) ;
+ virtual bool set_duration(nframes_t dur, void* src) ;
/**
* Returns the duration of this item
*
*/
- jack_nframes_t get_duration() const ;
+ nframes_t get_duration() const ;
/**
* Sets the maximum duration that this item make have.
* @param dur the new maximum duration
* @param src the identity of the object that initiated the change
*/
- virtual void set_max_duration(jack_nframes_t dur, void* src) ;
+ virtual void set_max_duration(nframes_t dur, void* src) ;
/**
* Returns the maxmimum duration that this item may be set to
*
* @return the maximum duration that this item may be set to
*/
- jack_nframes_t get_max_duration() const ;
+ nframes_t get_max_duration() const ;
/**
* Sets the minimu duration that this item may be set to
* @param the minimum duration that this item may be set to
* @param src the identity of the object that initiated the change
*/
- virtual void set_min_duration(jack_nframes_t dur, void* src) ;
+ virtual void set_min_duration(nframes_t dur, void* src) ;
/**
* Returns the minimum duration that this item mey be set to
*
* @return the nimum duration that this item mey be set to
*/
- jack_nframes_t get_min_duration() const ;
+ nframes_t get_min_duration() const ;
/**
* Sets whether the position of this Item is locked to its current position
sigc::signal<void,std::string,std::string,void*> NameChanged ;
/** Emiited when the position of this item changes */
- sigc::signal<void,jack_nframes_t,void*> PositionChanged ;
+ sigc::signal<void,nframes_t,void*> PositionChanged ;
/** Emitted when the position lock of this item is changed */
sigc::signal<void,bool,void*> PositionLockChanged ;
/** Emitted when the duration of this item changes */
- sigc::signal<void,jack_nframes_t,void*> DurationChanged ;
+ sigc::signal<void,nframes_t,void*> DurationChanged ;
/** Emitted when the maximum item duration is changed */
- sigc::signal<void,jack_nframes_t,void*> MaxDurationChanged ;
+ sigc::signal<void,nframes_t,void*> MaxDurationChanged ;
/** Emitted when the mionimum item duration is changed */
- sigc::signal<void,jack_nframes_t,void*> MinDurationChanged ;
+ sigc::signal<void,nframes_t,void*> MinDurationChanged ;
protected:
* @param duration the duration of this item
*/
TimeAxisViewItem(const std::string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color,
- jack_nframes_t start, jack_nframes_t duration, Visibility v = Visibility (0));
+ nframes_t start, nframes_t duration, Visibility v = Visibility (0));
/**
* Calculates some contrasting color for displaying various parts of this item, based upon the base color
bool position_locked ;
/** The posotion of this item on the timeline */
- jack_nframes_t frame_position ;
+ nframes_t frame_position ;
/** the duration of this item upon the timeline */
- jack_nframes_t item_duration ;
+ nframes_t item_duration ;
/** the maximum duration that we allow this item to take */
- jack_nframes_t max_item_duration ;
+ nframes_t max_item_duration ;
/** the minimu duration that we allow this item to take */
- jack_nframes_t min_item_duration ;
+ nframes_t min_item_duration ;
/** indicates whether this Max Duration constraint is active */
bool max_duration_active ;
return changed;
}
-jack_nframes_t
+nframes_t
TimeSelection::start ()
{
if (empty()) {
return 0;
}
- jack_nframes_t first = max_frames;
+ nframes_t first = max_frames;
for (std::list<AudioRange>::iterator i = begin(); i != end(); ++i) {
if ((*i).start < first) {
return first;
}
-jack_nframes_t
+nframes_t
TimeSelection::end_frame ()
{
- jack_nframes_t last = 0;
+ nframes_t last = 0;
/* XXX make this work like RegionSelection: no linear search needed */
return last;
}
-jack_nframes_t
+nframes_t
TimeSelection::length()
{
return end_frame() - start() + 1;
ARDOUR::AudioRange& operator[](uint32_t);
- jack_nframes_t start();
- jack_nframes_t end_frame();
- jack_nframes_t length();
+ nframes_t start();
+ nframes_t end_frame();
+ nframes_t length();
bool consolidate ();
};
break;
}
- ustr.erase (last);
- --last;
+ ustr.erase (last--);
}
return ustr;
return (xpm_map[name]);
}
+Glib::RefPtr<Gdk::Pixbuf>
+get_icon (const char* cname)
+{
+ string name = cname;
+ name += X_(".png");
+
+ string path = ARDOUR::find_data_file (name, "icons");
+
+ if (path.empty()) {
+ fatal << string_compose (_("cannot find icon image for %1"), name) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ return Gdk::Pixbuf::create_from_file (path);
+}
+
+string
+longest (vector<string>& strings)
+{
+ if (strings.empty()) {
+ return string ("");
+ }
+
+ vector<string>::iterator longest = strings.begin();
+ string::size_type longest_length = (*longest).length();
+
+ vector<string>::iterator i = longest;
+ ++i;
+
+ while (i != strings.end()) {
+
+ string::size_type len = (*i).length();
+
+ if (len > longest_length) {
+ longest = i;
+ longest_length = len;
+ }
+
+ ++i;
+ }
+
+ return *longest;
+}
#include <string>
#include <cmath>
+#include <vector>
#include <ardour/types.h>
#include <libgnomecanvasmm/line.h>
#include <gdkmm/types.h>
bool key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev);
-Glib::RefPtr<Gdk::Pixbuf> get_xpm(std::string);
+Glib::RefPtr<Gdk::Pixbuf> get_xpm (std::string);
+Glib::RefPtr<Gdk::Pixbuf> get_icon (const char*);
static std::map<std::string, Glib::RefPtr<Gdk::Pixbuf> > xpm_map;
const char* const *get_xpm_data (std::string path);
+std::string longest (std::vector<std::string>&);
#endif /* __ardour_gtk_utils_h__ */
// Super class methods not handled by VisualTimeAxis
void
-VisualTimeAxis::show_timestretch (jack_nframes_t start, jack_nframes_t end)
+VisualTimeAxis::show_timestretch (nframes_t start, nframes_t end)
{
// Not handled by purely visual TimeAxis
}
*
* @todo should VisualTimeAxis handle this?
*/
- void show_timestretch (jack_nframes_t start, jack_nframes_t end);
+ void show_timestretch (nframes_t start, nframes_t end);
/**
* Not handle by purely visual TimeAxis
--- /dev/null
+%!PS-Adobe-2.0 EPSF-1.2
+%%BoundingBox: 0 0 612 792
+%%Title: Adobe Illustator 3 Editable Document
+%%Creator: ps2ai.ps vers. 2.14 (C) 1993-94 Jason Olszewski
+%%TemplateBox: 0 0 612 792
+%%AI3_Margin:0 0 0 0
+%%EndComments
+%%BeginProlog
+/m {moveto} def /l {lineto} def /c {curveto} def
+/S {stroke} def /F {fill} def
+/s {closepath S} def /f {closepath F} def
+/q {gsave} def /Q {grestore} def /W {clip} def /k {setcmykcolor} def
+/i {setflat} def /J {setlinecap} def /j {setlinejoin} def
+/w {setlinewidth} def /M {setmiterlimit} def /d {setdash} def
+/u {gsave} def /U {grestore} def /K {k} def
+/N {newpath} def /n {closepath N} def
+/g {setgray} def /G {g} def
+/x {pop pop k} def /X {x} def
+/H {} def /h {H closepath} def /D {pop} def
+/*u { /N {/spth 0 def}def /S{/spth 1 def}def /F {/spth 2 def} def} def
+/*U { spth 0 eq {newpath} if spth 1 eq {stroke} if spth 2 eq {fill} if
+ /N {newpath} def /S {stroke} def /F {fill} def } def
+/TC {pop pop pop} def /Tr {pop} def
+/To {pop gsave} def /TO {grestore} def
+/Tp {pop matrix astore concat} def /TP {0 0 moveto} def
+/a_str 40 string def /cnt 0 def /h_str (X) def /undsc (_) 0 get def
+/fntfix {a_str cvs dup length 1 sub /f_str exch string def
+ {dup undsc eq {pop}{f_str cnt 3 -1 roll put /cnt cnt 1 add def
+ } ifelse } forall flush /cnt 0 def f_str cvn } bind def
+/Tf {exch fntfix findfont exch scalefont setfont} def /Tx {show} def
+
+userdict /Adobe_packedarray 2 dict dup begin put
+/initialize {} def /terminate {} def
+userdict /Adobe_cmykcolor 2 dict dup begin put
+/initialize {} def /terminate {} def
+userdict /Adobe_cshow 2 dict dup begin put
+/initialize {} def /terminate {} def
+userdict /Adobe_customcolor 2 dict dup begin put
+/initialize {} def /terminate {} def
+userdict /Adobe_typography_AI3 2 dict dup begin put
+/initialize {} def /terminate {} def
+userdict /Adobe_IllustratorA_AI3 2 dict dup begin put
+/initialize {} def /terminate {} def
+%%EndProlog
+%%BeginSetup
+Adobe_packedarray /initialize get exec
+Adobe_cmykcolor /initialize get exec
+Adobe_cshow /initialize get exec
+Adobe_customcolor /initialize get exec
+Adobe_typography_AI3 /initialize get exec
+Adobe_IllustratorA_AI3 /initialize get exec
+%%EndSetup
+ 0 0 0 1 k
+ 0 0 0 1 K
+ 1.0 i 0 J 0 j 1.0 w 10.0 M [] 0 d
+ 0.113725 0.113725 0 0.886275 k
+ 0.113725 0.113725 0 0.886275 K
+
+
+*u
+ 445.273 611.637 m
+ 441.742 611.637 435.574 611.637 435.574 611.637 c
+ 435.574 590.766 l
+ 445.273 590.766 l
+ 448.785 590.766 451.184 591.891 452.984 593.676 c
+ 454.691 595.371 456.102 597.895 456.102 601.211 c
+ 456.102 604.512 454.652 607.023 452.91 608.75 c
+ 451.137 610.5 448.801 611.637 445.273 611.637 c
+ 445.273 611.637 l
+f
+ 426.977 584.523 m
+ 426.977 617.828 l
+ 444.992 617.828 l
+ 450.98 617.828 455.094 617.895 460.094 613.027 c
+ 462.977 610.223 464.969 605.766 464.969 601.211 c
+ 464.969 596.656 463.336 592.402 460.273 589.348 c
+ 455.711 584.789 451.031 584.523 444.992 584.523 c
+ 426.977 584.523 l
+ 426.977 584.523 l
+f
+*U
+ 0 0 0 1 k
+ 0 0 0 1 K
+ 1.0 i 0 J 0 j 1.0 w 10.0 M [] 0 d
+ 0.113725 0.113725 0 0.886275 k
+ 0.113725 0.113725 0 0.886275 K
+
+
+*u
+ 405.578 603.863 m
+ 407.656 603.863 408.492 604.148 409.27 604.816 c
+ 410.059 605.484 410.625 606.426 410.625 607.758 c
+ 410.625 609.086 409.934 610.094 409.145 610.75 c
+ 408.195 611.477 407.379 611.605 405.578 611.605 c
+ 394.113 611.605 l
+ 394.113 603.863 l
+ 405.578 603.863 l
+F
+ 406.879 597.652 m
+ 394.113 597.652 l
+ 394.113 584.523 l
+ 385.516 584.523 l
+ 385.516 617.828 l
+ 408.297 617.828 l
+ 413.484 617.828 419.125 614.566 419.125 607.84 c
+ 419.188 603.812 417.266 601.277 415.105 599.559 c
+ 423.785 584.523 l
+ 414.418 584.523 l
+ 406.879 597.652 l
+ 406.879 597.652 l
+f
+*U
+ 0 0 0 1 k
+ 0 0 0 1 K
+ 1.0 i 0 J 0 j 1.0 w 10.0 M [] 0 d
+ 0.113725 0.113725 0 0.886275 k
+ 0.113725 0.113725 0 0.886275 K
+
+
+*u
+ 369.004 591.441 m
+ 347.152 591.441 l
+ 343.215 584.523 l
+ 333.828 584.523 l
+ 352.934 617.828 l
+ 363.184 617.828 l
+ 382.297 584.523 l
+ 373.02 584.523 l
+ 369.004 591.441 l
+ 369.004 591.441 l
+f
+ 358.07 610.41 m
+ 350.703 597.621 l
+ 365.473 597.621 l
+ 358.07 610.41 l
+ 358.07 610.41 l
+f
+*U
+ 0 0 0 1 k
+ 0 0 0 1 K
+ 1.0 i 0 J 0 j 1.0 w 10.0 M [] 0 d
+ 0.113725 0.113725 0 0.886275 k
+ 0.113725 0.113725 0 0.886275 K
+
+
+*u
+ 485.195 618.344 m
+ 475.609 617.871 467.797 610.41 467.797 601.188 c
+ 467.797 591.965 475.629 584.551 485.195 583.977 c
+ 488.57 583.773 491.594 583.785 494.895 583.977 c
+ 504.469 584.527 512.297 591.965 512.297 601.188 c
+ 512.297 610.41 504.48 617.848 494.895 618.344 c
+ 491.664 618.527 488.426 618.492 485.195 618.344 c
+ 485.195 618.344 l
+f
+ 492.969 612.289 m
+ 498.758 611.965 503.469 607.129 503.469 601.188 c
+ 503.469 595.246 498.75 590.469 492.969 590.113 c
+ 490.977 589.988 489.137 589.98 487.094 590.113 c
+ 481.316 590.484 476.594 595.246 476.594 601.188 c
+ 476.594 607.129 481.305 611.98 487.094 612.289 c
+ 489.051 612.402 491.012 612.371 492.969 612.289 c
+ 492.969 612.289 l
+f
+*U
+ 0 0 0 1 k
+ 0 0 0 1 K
+ 1.0 i 0 J 0 j 1.0 w 10.0 M [] 0 d
+ 0.113725 0.113725 0 0.886275 k
+ 0.113725 0.113725 0 0.886275 K
+
+
+ 515.562 617.836 m
+ 515.562 597.648 l
+ 515.562 592.102 518.895 589.414 520.289 588.25 c
+ 523.723 585.379 529.148 583.781 534.578 583.809 c
+ 540.004 583.832 545.984 585.793 548.863 588.25 c
+ 551.863 590.812 553.562 593.445 553.562 597.648 c
+ 553.562 617.836 l
+ 545.012 617.836 l
+ 545.012 598.559 l
+ 545.012 594.984 543.664 593.285 542.039 592.207 c
+ 540.23 591.008 537.66 590.047 534.566 590.066 c
+ 531.477 590.082 528.586 591.184 527.117 592.207 c
+ 525.301 593.473 524.113 594.961 524.113 598.559 c
+ 524.113 617.836 l
+ 515.562 617.836 l
+ 515.562 617.836 l
+f
+ 0 0 0 1 k
+ 0 0 0 1 K
+ 1.0 i 0 J 0 j 1.0 w 10.0 M [] 0 d
+ 0.113725 0.113725 0 0.886275 k
+ 0.113725 0.113725 0 0.886275 K
+
+
+*u
+ 578.098 603.863 m
+ 580.172 603.863 581.012 604.148 581.785 604.816 c
+ 582.574 605.484 583.145 606.426 583.145 607.758 c
+ 583.145 609.086 582.449 610.094 581.66 610.75 c
+ 580.711 611.477 579.898 611.605 578.098 611.605 c
+ 566.629 611.605 l
+ 566.629 603.863 l
+ 578.098 603.863 l
+F
+ 579.395 597.652 m
+ 566.629 597.652 l
+ 566.629 584.523 l
+ 558.031 584.523 l
+ 558.031 617.828 l
+ 580.812 617.828 l
+ 586.0 617.828 591.641 614.566 591.641 607.84 c
+ 591.707 603.812 589.781 601.277 587.625 599.559 c
+ 596.301 584.523 l
+ 586.934 584.523 l
+ 579.395 597.652 l
+ 579.395 597.652 l
+f
+*U
+ 0 0 0 1 k
+ 0 0 0 1 K
+ 1.0 i 0 J 0 j 1.0 w 10.0 M [] 0 d
+ 0.113725 0.113725 0 0.886275 k
+ 0.113725 0.113725 0 0.886275 K
+
+1 D
+
+ 465.016 811.949 m
+ 356.688 624.324 l
+ 358.562 624.324 l
+ 362.27 624.406 363.742 630.477 365.664 630.477 c
+ 366.93 630.477 368.77 629.523 370.039 629.523 c
+ 372.445 629.523 373.145 642.258 375.176 642.215 c
+ 377.203 642.172 376.82 631.336 380.641 631.199 c
+ 384.598 631.059 381.992 656.176 385.863 656.176 c
+ 389.234 656.176 387.543 634.746 392.148 634.605 c
+ 396.613 634.465 393.156 671.723 397.613 672.082 c
+ 402.805 672.504 399.516 637.406 404.887 637.406 c
+ 409.574 637.406 406.477 686.688 410.625 686.688 c
+ 414.77 686.688 413.516 639.074 417.742 639.477 c
+ 421.812 639.477 417.883 696.906 422.578 696.906 c
+ 428.586 696.906 425.512 639.902 429.629 639.918 c
+ 434.266 639.934 430.484 702.5 435.887 702.5 c
+ 441.488 702.5 437.668 639.309 442.34 639.477 c
+ 447.258 639.652 442.094 698.68 447.516 698.68 c
+ 452.734 698.68 449.184 638.648 453.738 638.648 c
+ 458.555 638.648 453.395 697.906 459.695 697.492 c
+ 465.797 697.09 461.797 636.922 466.16 636.922 c
+ 470.32 636.922 467.836 689.488 472.801 689.207 c
+ 478.617 688.875 475.227 635.297 479.242 635.297 c
+ 482.969 635.297 481.277 678.066 486.211 678.066 c
+ 491.422 678.066 487.5 633.68 492.297 633.883 c
+ 497.09 634.082 494.949 667.727 499.613 667.727 c
+ 504.078 667.727 500.383 631.031 505.43 631.031 c
+ 510.676 631.031 508.023 656.723 512.648 656.723 c
+ 517.418 656.723 514.414 628.652 518.066 628.652 c
+ 521.617 628.652 520.578 646.336 524.082 646.336 c
+ 527.59 646.336 525.945 627.625 528.898 627.625 c
+ 531.953 627.625 530.703 638.426 533.938 638.426 c
+ 537.18 638.426 536.023 626.762 538.508 626.625 c
+ 540.711 626.504 540.43 633.98 542.461 633.98 c
+ 544.531 633.98 543.66 625.668 546.508 625.676 c
+ 549.254 625.68 548.41 630.273 550.367 630.273 c
+ 552.289 630.273 552.348 624.875 554.617 624.875 c
+ 556.234 624.906 557.949 627.344 560.004 627.344 c
+ 562.711 627.344 563.539 624.324 570.465 624.324 c
+ 573.34 624.324 l
+ 465.016 811.949 l
+ 465.016 811.949 l
+f
+0 D
+ 0 0 0 1 k
+ 0 0 0 1 K
+ 1.0 i 0 J 0 j 1.0 w 10.0 M [] 0 d
+%%Note: If Error, make sure there are matched pairs of 'q's and 'Q's
+%%Note: in the file. Add 'Q's before '%%Trailer' until equal
+%%Trailer
+Adobe_IllustratorA_AI3 /terminate get exec
+Adobe_typography_AI3 /terminate get exec
+Adobe_customcolor /terminate get exec
+Adobe_cshow /terminate get exec
+Adobe_cmykcolor /terminate get exec
+Adobe_packedarray /terminate get exec
+ showpage
+%EOF
+%%EndDocument
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448"
+ height="1052.3622"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.44"
+ sodipodi:docbase="/mnt/first/logos/ardour"
+ sodipodi:docname="ardour_bw.svg"
+ version="1.0">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3096">
+ <stop
+ style="stop-color:#bff;stop-opacity:1;"
+ offset="0"
+ id="stop3098" />
+ <stop
+ id="stop3104"
+ offset="0.48214287"
+ style="stop-color:#e0ead5;stop-opacity:1;" />
+ <stop
+ style="stop-color:#957151;stop-opacity:1;"
+ offset="0.81505102"
+ id="stop3106" />
+ <stop
+ style="stop-color:#864441;stop-opacity:1;"
+ offset="1"
+ id="stop3100" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3084">
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop3086" />
+ <stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop3088" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3066">
+ <stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="0"
+ id="stop3068" />
+ <stop
+ id="stop3074"
+ offset="0.05"
+ style="stop-color:white;stop-opacity:1;" />
+ <stop
+ style="stop-color:#002744;stop-opacity:0;"
+ offset="1"
+ id="stop3070" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3050">
+ <stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop3052" />
+ <stop
+ id="stop3058"
+ offset="0.44897959"
+ style="stop-color:white;stop-opacity:1;" />
+ <stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0.78571427"
+ id="stop3060" />
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="1"
+ id="stop3054" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3035">
+ <stop
+ style="stop-color:#ffffed;stop-opacity:1;"
+ offset="0"
+ id="stop3037" />
+ <stop
+ style="stop-color:#b8eaff;stop-opacity:1;"
+ offset="1"
+ id="stop3039" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="white"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="0.4"
+ objecttolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.3535534"
+ inkscape:cx="582.11341"
+ inkscape:cy="803.76782"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:window-width="1278"
+ inkscape:window-height="866"
+ inkscape:window-x="0"
+ inkscape:window-y="122"
+ showgrid="false"
+ inkscape:grid-bbox="false"
+ inkscape:guide-bbox="true"
+ showguides="false"
+ showborder="false"
+ inkscape:showpageshadow="true">
+ <sodipodi:guide
+ orientation="horizontal"
+ position="810.5"
+ id="guide3038" />
+ <sodipodi:guide
+ orientation="horizontal"
+ position="852.125"
+ id="guide3040" />
+ <sodipodi:guide
+ orientation="horizontal"
+ position="826.875"
+ id="guide3052" />
+ <sodipodi:guide
+ orientation="horizontal"
+ position="819.13901"
+ id="guide3068" />
+ <sodipodi:guide
+ orientation="horizontal"
+ position="834.65117"
+ id="guide3072" />
+ <sodipodi:guide
+ orientation="horizontal"
+ position="844.37389"
+ id="guide3074" />
+ <sodipodi:guide
+ orientation="horizontal"
+ position="860.24998"
+ id="guide3096" />
+ <sodipodi:guide
+ orientation="horizontal"
+ position="818.27723"
+ id="guide3120" />
+ <sodipodi:guide
+ orientation="horizontal"
+ position="852.9375"
+ id="guide3099" />
+ <sodipodi:guide
+ orientation="horizontal"
+ position="809.60412"
+ id="guide3103" />
+ <sodipodi:guide
+ orientation="horizontal"
+ position="817.37125"
+ id="guide3105" />
+ <sodipodi:guide
+ orientation="horizontal"
+ position="845.27987"
+ id="guide3107" />
+ <sodipodi:guide
+ orientation="horizontal"
+ position="831.3125"
+ id="guide4437" />
+ <sodipodi:guide
+ orientation="vertical"
+ position="152.73507"
+ id="guide3261" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="main"
+ inkscape:groupmode="layer"
+ id="layer1"
+ style="display:inline">
+ <g
+ style="display:inline"
+ id="g1915"
+ transform="translate(380,0)"
+ inkscape:export-filename="/mnt/first/logos/ardour/ardour_bw_scale.png"
+ inkscape:export-xdpi="40.39333"
+ inkscape:export-ydpi="40.39333">
+ <path
+ sodipodi:nodetypes="ccccsszccccszscc"
+ id="path1917"
+ d="M 176.58984,287.95266 C 172.17954,287.95264 164.46796,287.95266 164.46796,287.95266 L 164.46796,314.04227 L 176.58984,314.04227 C 180.98154,314.04229 183.98115,312.63802 186.23242,310.40489 C 188.36666,308.28783 190.12783,305.13231 190.12785,300.9869 C 190.12783,296.86012 188.31785,293.71854 186.13534,291.56217 C 183.92098,289.37436 181.00014,287.95268 176.58984,287.95266 z M 153.72129,321.84397 L 153.72129,280.21345 L 176.24023,280.21345 C 183.72458,280.21345 188.86819,280.13392 195.1189,286.21522 C 198.72063,289.72052 201.20948,295.29184 201.20948,300.9869 C 201.20948,306.68195 199.16832,311.9963 195.343,315.81633 C 189.63976,321.51168 183.79026,321.84397 176.24023,321.84397 L 153.72129,321.84397 z "
+ style="font-size:9.055686px;font-style:normal;font-weight:normal;line-height:125%;opacity:1;fill:#00001d;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" />
+ <path
+ sodipodi:nodetypes="cczcccccccccccscccc"
+ id="path1919"
+ d="M 126.97432,297.67254 C 129.56993,297.67254 130.6169,297.3168 131.58461,296.48027 C 132.57085,295.64378 133.28278,294.46717 133.28276,292.80483 C 133.28274,291.14251 132.4146,289.88164 131.42836,289.06368 C 130.2419,288.15205 129.22599,287.99309 126.97432,287.99304 L 112.63982,287.99304 L 112.63982,297.67254 L 126.97432,297.67254 M 128.59684,305.43339 L 112.63982,305.43339 L 112.63982,321.84397 L 101.89312,321.84397 L 101.89312,280.21345 L 130.36878,280.21345 C 136.85353,280.21345 143.90444,284.29251 143.90444,292.7016 C 143.98535,297.7362 141.58079,300.90489 138.88354,303.04963 L 149.73154,321.84397 L 138.02216,321.84397 L 128.59684,305.43339 z "
+ style="font-size:9.055686px;font-style:normal;font-weight:normal;line-height:125%;opacity:1;fill:#00001d;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" />
+ <path
+ sodipodi:nodetypes="ccccccccccccc"
+ id="path1921"
+ d="M 81.25583,313.1958 L 53.94222,313.1958 L 49.01982,321.84397 L 37.28736,321.84397 L 61.1687,280.21345 L 73.98097,280.21345 L 97.87176,321.84397 L 86.27371,321.84397 L 81.25583,313.1958 z M 67.5888,289.48665 L 58.38022,305.47512 L 76.84078,305.47512 L 67.5888,289.48665 z "
+ style="font-size:9.055686px;font-style:normal;font-weight:normal;line-height:125%;opacity:1;fill:#00001d;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" />
+ <path
+ sodipodi:nodetypes="csssssscssssss"
+ id="path1923"
+ d="M 226.49427,279.56802 C 214.50956,280.16209 204.74427,289.48567 204.74427,301.01579 C 204.74427,312.54592 214.53445,321.81277 226.49427,322.53141 C 230.71528,322.78504 234.49186,322.76944 238.61927,322.53141 C 250.58435,321.84137 260.36927,312.54592 260.36927,301.01579 C 260.36927,289.48567 250.59911,280.19141 238.61927,279.56802 C 234.58043,279.33972 230.53352,279.38595 226.49427,279.56802 z M 236.21302,287.14078 C 243.44805,287.54222 249.33802,293.59078 249.33802,301.01579 C 249.33802,308.4408 243.43912,314.41518 236.21302,314.85954 C 233.72036,315.01283 231.41848,315.02287 228.86927,314.85954 C 221.64633,314.39677 215.74427,308.4408 215.74427,301.01579 C 215.74427,293.59078 221.63132,287.52335 228.86927,287.14078 C 231.31585,286.9988 233.7663,287.03667 236.21302,287.14078 z "
+ style="opacity:1;fill:#00001d;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="ccszsccccszsccc"
+ id="path1925"
+ d="M 264.45322,280.20719 L 264.45322,305.43766 C 264.45322,312.37159 268.61751,315.73153 270.35947,317.18766 C 274.65261,320.77634 281.43571,322.77118 288.22153,322.74101 C 295.00728,322.71083 302.47855,320.26072 306.07822,317.18766 C 309.83035,313.98444 311.95318,310.69494 311.95322,305.43766 L 311.95322,280.20719 L 301.26572,280.20719 L 301.26572,304.30156 C 301.26572,308.77151 299.57884,310.89474 297.54697,312.24101 C 295.28695,313.73845 292.07462,314.93983 288.21026,314.91935 C 284.34591,314.89887 280.73023,313.5202 278.89516,312.24101 C 276.62665,310.65964 275.14137,308.80089 275.14137,304.30156 L 275.14137,280.20719 L 264.45322,280.20719 z "
+ style="font-size:9.055686px;font-style:normal;font-weight:normal;line-height:125%;opacity:1;fill:#00001d;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" />
+ <path
+ sodipodi:nodetypes="cczcccccccccccscccc"
+ id="path1927"
+ d="M 342.62077,297.67254 C 345.21638,297.67254 346.26335,297.3168 347.23106,296.48027 C 348.2173,295.64378 348.92923,294.46717 348.92921,292.80483 C 348.92919,291.14251 348.06105,289.88164 347.07481,289.06368 C 345.88835,288.15205 344.87244,287.99309 342.62077,287.99304 L 328.28627,287.99304 L 328.28627,297.67254 L 342.62077,297.67254 M 344.24329,305.43339 L 328.28627,305.43339 L 328.28627,321.84397 L 317.53957,321.84397 L 317.53957,280.21345 L 346.01523,280.21345 C 352.49998,280.21345 359.55089,284.29251 359.55089,292.7016 C 359.6318,297.7362 357.22724,300.90489 354.52999,303.04963 L 365.37799,321.84397 L 353.66861,321.84397 L 344.24329,305.43339 z "
+ style="font-size:9.055686px;font-style:normal;font-weight:normal;line-height:125%;opacity:1;fill:#00001d;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline;font-family:Bitstream Vera Sans" />
+ </g>
+ <path
+ sodipodi:nodetypes="cccsczzczsczcsszszszzsszzzzzzzzzszzzzsccc"
+ style="opacity:1;fill:#00001d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+ d="M 581.26757,37.562664 L 445.86132,272.09391 L 448.20507,272.09391 C 452.83906,271.99261 454.67928,264.40641 457.08007,264.40641 C 458.66442,264.40641 460.96101,265.59391 462.54882,265.59391 C 465.55594,265.59391 466.43156,249.6788 468.96763,249.73185 C 471.50371,249.7849 471.02555,263.32969 475.79882,263.50016 C 480.74864,263.67694 477.48855,232.28141 482.33007,232.28141 C 486.5416,232.28141 484.42728,259.06726 490.18454,259.24404 C 495.76502,259.42082 491.44428,212.84709 497.01573,212.39569 C 503.50483,211.86995 499.39401,255.74052 506.10672,255.74052 C 511.96666,255.74052 508.09567,194.13864 513.28166,194.13864 C 518.46162,194.13864 516.89527,253.65641 522.17994,253.15641 C 527.26783,253.15641 522.35387,181.36612 528.221,181.36612 C 535.73414,181.36612 531.8884,252.62357 537.03473,252.60372 C 542.83424,252.58067 538.10721,174.37516 544.85856,174.37516 C 551.85842,174.37516 547.08694,253.36581 552.92382,253.15641 C 559.07266,252.93582 552.61945,179.14845 559.39257,179.14845 C 565.91569,179.14845 561.47707,254.18766 567.17382,254.18766 C 573.19231,254.18766 566.74365,180.11956 574.6202,180.63588 C 582.2478,181.13588 577.24499,256.34575 582.69834,256.34575 C 587.90174,256.34575 584.79485,190.63924 590.9998,190.99311 C 598.27379,191.40795 594.03154,258.37884 599.05434,258.37884 C 603.70973,258.37884 601.597,204.91805 607.76221,204.91805 C 614.27877,204.91805 609.37472,260.39845 615.3702,260.14845 C 621.36047,259.89867 618.68723,217.84391 624.51757,217.84391 C 630.09815,217.84391 625.48005,263.70911 631.78718,263.70911 C 638.34303,263.70911 635.02705,231.59759 640.8123,231.59759 C 646.77352,231.59759 643.01977,266.68214 647.58191,266.68214 C 652.01905,266.68214 650.72325,244.57798 655.10336,244.57798 C 659.48749,244.57798 657.43345,267.96891 661.12481,267.96891 C 664.94101,267.96891 663.38003,254.46891 667.42382,254.46891 C 671.47281,254.46891 670.0273,269.04748 673.13277,269.21891 C 675.89034,269.37113 675.53699,260.02659 678.07823,260.02659 C 680.66364,260.02659 679.57453,270.41484 683.13369,270.40733 C 686.56785,270.39982 685.51216,264.65641 687.95783,264.65641 C 690.35932,264.65641 690.43355,271.40809 693.27033,271.40809 C 695.2922,271.3692 697.437,268.32155 700.00685,268.32155 C 703.38721,268.32155 704.42287,272.09391 713.08007,272.09391 L 716.67382,272.09391 L 581.26757,37.562664 z "
+ id="path1929"
+ inkscape:export-filename="/mnt/first/logos/ardour/ardour_bw_scale.png"
+ inkscape:export-xdpi="40.39333"
+ inkscape:export-ydpi="40.39333" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="construction"
+ style="display:none">
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#ff1313;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+ d="M 828.02203,272.06986 C 837.03937,272.06986 881.8855,175.06365 931.83414,175.06365 C 991.85177,175.06365 1031.0336,272.06986 1095.3084,272.06986"
+ id="path1981"
+ sodipodi:nodetypes="csc" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#ff1313;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+ d="M 828.02203,272.06986 C 837.03937,272.06986 871.2789,252.84539 921.22754,252.84539 C 981.24517,252.84539 1031.0336,272.06986 1095.3084,272.06986"
+ id="path2870"
+ sodipodi:nodetypes="csc" />
+ </g>
+</svg>
appleutility.Append(LINKFLAGS='-framework CoreServices')
libappleutility = appleutility.SharedLibrary('appleutility', appleutility_files)
-
-Default(libappleutility)
-
-env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), libappleutility))
+if appleutility['COREAUDIO']:
+ Default(libappleutility)
+ env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), libappleutility))
env.Alias('tarball', env.Distribute (env['DISTTREE'], ['SConscript'] + appleutility_files + glob.glob('*.h') ))
env.Alias('tarball', env.Distribute (env['DISTTREE'],
[ 'SConscript', 'i18n.h', 'gettext.h', 'sse_functions.s', 'sse_functions_64bit.s' ] +
- ardour_files + vst_files + coreaudio_files + audiounit_files +
+ ardour_files + osc_files + vst_files + coreaudio_files + audiounit_files +
glob.glob('po/*.po') + glob.glob('ardour/*.h')))
extern OSC* osc;
- static const jack_nframes_t max_frames = JACK_MAX_FRAMES;
+ static const nframes_t max_frames = JACK_MAX_FRAMES;
int init (AudioEngine& engine, bool with_vst, bool try_optimization);
int cleanup ();
-
+
+ std::string get_ardour_revision ();
std::string get_user_ardour_path ();
std::string get_system_data_path ();
const char* old;
};
+ static const double SHUTTLE_FRACT_SPEED1=0.48412291827; /* derived from A1,A2 */
}
/* how do we make these be within the Ardour namespace? */
}
}
- static void swap_by_ptr (Sample *first, Sample *last, jack_nframes_t n) {
+ static void swap_by_ptr (Sample *first, Sample *last, nframes_t n) {
while (n--) {
Sample tmp = *first;
*first++ = *last;
void set_pending_overwrite(bool);
int overwrite_existing_buffers ();
- void set_block_size (jack_nframes_t);
- int internal_playback_seek (jack_nframes_t distance);
- int can_internal_playback_seek (jack_nframes_t distance);
+ void set_block_size (nframes_t);
+ int internal_playback_seek (nframes_t distance);
+ int can_internal_playback_seek (nframes_t distance);
int rename_write_sources ();
void reset_write_sources (bool, bool force = false);
void non_realtime_input_change ();
protected:
friend class Auditioner;
- int seek (jack_nframes_t which_sample, bool complete_refill = false);
+ int seek (nframes_t which_sample, bool complete_refill = false);
protected:
friend class AudioTrack;
- int process (jack_nframes_t transport_frame, jack_nframes_t nframes, jack_nframes_t offset, bool can_record, bool rec_monitors_input);
- bool commit (jack_nframes_t nframes);
+ int process (nframes_t transport_frame, nframes_t nframes, nframes_t offset, bool can_record, bool rec_monitors_input);
+ bool commit (nframes_t nframes);
private:
RingBufferNPT<CaptureTransition> * capture_transition_buf;
// the following are used in the butler thread only
- jack_nframes_t curr_capture_cnt;
+ nframes_t curr_capture_cnt;
};
/* The two central butler operations */
int do_refill_with_alloc();
int read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer,
- jack_nframes_t& start, jack_nframes_t cnt,
+ nframes_t& start, nframes_t cnt,
ChannelInfo& channel_info, int channel, bool reversed);
void finish_capture (bool rec_monitors_input);
int use_pending_capture_data (XMLNode& node);
void get_input_sources ();
- void check_record_status (jack_nframes_t transport_frame, jack_nframes_t nframes, bool can_record);
+ void check_record_status (nframes_t transport_frame, nframes_t nframes, bool can_record);
void set_align_style_from_io();
void setup_destructive_playlist ();
void use_destructive_playlist ();
AudioTrack (Session&, const XMLNode&);
~AudioTrack ();
- int roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t offset, int declick, bool can_record, bool rec_monitors_input);
+ int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
+ nframes_t offset, int declick, bool can_record, bool rec_monitors_input);
- int no_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input);
+ int no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
+ nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input);
- int silent_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t offset, bool can_record, bool rec_monitors_input);
+ int silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
+ nframes_t offset, bool can_record, bool rec_monitors_input);
boost::shared_ptr<AudioDiskstream> audio_diskstream() const;
int use_diskstream (string name);
int use_diskstream (const PBD::ID& id);
- int export_stuff (BufferSet& bufs, jack_nframes_t nframes, jack_nframes_t end_frame);
+ int export_stuff (BufferSet& bufs, nframes_t nframes, nframes_t end_frame);
void freeze (InterThreadInfo&);
void unfreeze ();
void bounce (InterThreadInfo&);
- void bounce_range (jack_nframes_t start, jack_nframes_t end, InterThreadInfo&);
+ void bounce_range (nframes_t start, nframes_t end, InterThreadInfo&);
int set_state(const XMLNode& node);
const char * maker () const;
uint32_t parameter_count () const;
float default_value (uint32_t port);
- jack_nframes_t latency () const;
+ nframes_t latency () const;
void set_parameter (uint32_t which, float val);
float get_parameter (uint32_t which) const;
uint32_t nth_parameter (uint32_t which, bool& ok) const;
void activate ();
void deactivate ();
- void set_block_size (jack_nframes_t nframes);
+ void set_block_size (nframes_t nframes);
- int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, jack_nframes_t nframes, jack_nframes_t offset);
+ int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset);
+
std::set<uint32_t> automatable() const;
void store_state (ARDOUR::PluginState&);
void restore_state (ARDOUR::PluginState&);
Glib::Mutex& process_lock() { return _process_lock; }
- jack_nframes_t frame_rate();
- jack_nframes_t frames_per_cycle();
+ nframes_t frame_rate();
+ nframes_t frames_per_cycle();
int usecs_per_cycle () const { return _usecs_per_cycle; }
- bool get_sync_offset (jack_nframes_t& offset) const;
+ bool get_sync_offset (nframes_t& offset) const;
- jack_nframes_t frames_since_cycle_start () {
+ nframes_t frames_since_cycle_start () {
if (!_running || !_jack) return 0;
return jack_frames_since_cycle_start (_jack);
}
- jack_nframes_t frame_time () {
+ nframes_t frame_time () {
if (!_running || !_jack) return 0;
return jack_frame_time (_jack);
}
- jack_nframes_t transport_frame () const {
+ nframes_t transport_frame () const {
if (!_running || !_jack) return 0;
return jack_get_current_transport_frame (_jack);
}
- int request_buffer_size (jack_nframes_t);
+ int request_buffer_size (nframes_t);
- jack_nframes_t set_monitor_check_interval (jack_nframes_t);
+ nframes_t set_monitor_check_interval (nframes_t);
float get_cpu_load() {
if (!_running || !_jack) return 0;
return get_nth_physical (type, n, JackPortIsOutput);
}
- jack_nframes_t get_port_total_latency (const Port&);
+ nframes_t get_port_total_latency (const Port&);
void update_total_latencies ();
/** Caller may not delete the object pointed to by the return value
void transport_start ();
void transport_stop ();
- void transport_locate (jack_nframes_t);
+ void transport_locate (nframes_t);
TransportState transport_state ();
int reset_timebase ();
the regular process() call to session->process() is not made.
*/
- sigc::signal<int,jack_nframes_t> Freewheel;
+ sigc::signal<int,nframes_t> Freewheel;
sigc::signal<void> Xrun;
/* this signal is emitted if the sample rate changes */
- sigc::signal<void,jack_nframes_t> SampleRateChanged;
+ sigc::signal<void,nframes_t> SampleRateChanged;
/* this signal is sent if JACK ever disconnects us */
bool session_remove_pending;
bool _running;
bool _has_run;
- jack_nframes_t _buffer_size;
- jack_nframes_t _frame_rate;
- jack_nframes_t monitor_check_interval;
- jack_nframes_t last_monitor_check;
- jack_nframes_t _processed_frames;
+ nframes_t _buffer_size;
+ nframes_t _frame_rate;
+ nframes_t monitor_check_interval;
+ nframes_t last_monitor_check;
+ nframes_t _processed_frames;
bool _freewheeling;
bool _freewheel_thread_registered;
- sigc::slot<int,jack_nframes_t> freewheel_action;
+ sigc::slot<int,nframes_t> freewheel_action;
bool reconnect_on_halt;
int _usecs_per_cycle;
typedef std::set<Port*> Ports;
SerializedRCUManager<Ports> ports;
- int process_callback (jack_nframes_t nframes);
+ int process_callback (nframes_t nframes);
void remove_all_ports ();
typedef std::pair<std::string,std::string> PortConnection;
static int _xrun_callback (void *arg);
static int _graph_order_callback (void *arg);
- static int _process_callback (jack_nframes_t nframes, void *arg);
- static int _sample_rate_callback (jack_nframes_t nframes, void *arg);
- static int _bufsize_callback (jack_nframes_t nframes, void *arg);
- static void _jack_timebase_callback (jack_transport_state_t, jack_nframes_t, jack_position_t*, int, void*);
+ static int _process_callback (nframes_t nframes, void *arg);
+ static int _sample_rate_callback (nframes_t nframes, void *arg);
+ static int _bufsize_callback (nframes_t nframes, void *arg);
+ static void _jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int, void*);
static int _jack_sync_callback (jack_transport_state_t, jack_position_t*, void *arg);
static void _freewheel_callback (int , void *arg);
- void jack_timebase_callback (jack_transport_state_t, jack_nframes_t, jack_position_t*, int);
+ void jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int);
int jack_sync_callback (jack_transport_state_t, jack_position_t*);
- int jack_bufsize_callback (jack_nframes_t);
- int jack_sample_rate_callback (jack_nframes_t);
+ int jack_bufsize_callback (nframes_t);
+ int jack_sample_rate_callback (nframes_t);
static void halted (void *);
void meter_thread ();
void start_metering_thread ();
- Glib::Thread* m_meter_thread;
- mutable gint m_meter_exit;
+ void stop_metering_thread ();
+
+ Glib::Thread* m_meter_thread;
+ static gint m_meter_exit;
};
} // namespace ARDOUR
for files used in destructive recording.
*/
- virtual jack_nframes_t last_capture_start_frame() const { return 0; }
- virtual void mark_capture_start (jack_nframes_t) {}
+ virtual nframes_t last_capture_start_frame() const { return 0; }
+ virtual void mark_capture_start (nframes_t) {}
virtual void mark_capture_end () {}
virtual void clear_capture_marks() {}
- virtual int update_header (jack_nframes_t when, struct tm&, time_t) = 0;
+ virtual int update_header (nframes_t when, struct tm&, time_t) = 0;
virtual int flush_header () = 0;
int move_to_trash (const string trash_dir_name);
static void set_bwf_serial_number (int);
static void set_search_path (string);
- static void set_header_position_offset (jack_nframes_t offset );
+ static void set_header_position_offset (nframes_t offset );
+
+ int setup_peakfile ();
static sigc::signal<void> HeaderPositionOffsetChanged;
Flag _flags;
string _take_id;
uint64_t timeline_position;
+ bool file_is_new;
static string peak_dir;
static string search_path;
static uint64_t header_position_offset;
- virtual void set_timeline_position (jack_nframes_t pos);
+ virtual void set_timeline_position (nframes_t pos);
virtual void set_header_timeline_position () = 0;
bool find (std::string path, bool must_exist, bool& is_new);
AudioPlaylist (Session&, const XMLNode&, bool hidden = false);
AudioPlaylist (Session&, string name, bool hidden = false);
AudioPlaylist (const AudioPlaylist&, string name, bool hidden = false);
- AudioPlaylist (const AudioPlaylist&, jack_nframes_t start, jack_nframes_t cnt, string name, bool hidden = false);
+ AudioPlaylist (const AudioPlaylist&, nframes_t start, nframes_t cnt, string name, bool hidden = false);
void clear (bool with_save = true);
- jack_nframes_t read (Sample *dst, Sample *mixdown, float *gain_buffer, jack_nframes_t start, jack_nframes_t cnt, uint32_t chan_n=0);
+ nframes_t read (Sample *dst, Sample *mixdown, float *gain_buffer, nframes_t start, nframes_t cnt, uint32_t chan_n=0);
int set_state (const XMLNode&);
UndoAction get_memento() const;
sigc::signal<void,Crossfade *> NewCrossfade;
template<class T> void foreach_crossfade (T *t, void (T::*func)(Crossfade *));
- void crossfades_at (jack_nframes_t frame, Crossfades&);
+ void crossfades_at (nframes_t frame, Crossfades&);
template<class T> void apply_to_history (T& obj, void (T::*method)(const ARDOUR::StateManager::StateMap&, state_id_t)) {
RegionLock rlock (this);
Curve& fade_out() { return _fade_out; }
Curve& envelope() { return _envelope; }
- jack_nframes_t read_peaks (PeakData *buf, jack_nframes_t npeaks,
- jack_nframes_t offset, jack_nframes_t cnt,
+ nframes_t read_peaks (PeakData *buf, nframes_t npeaks,
+ nframes_t offset, nframes_t cnt,
uint32_t chan_n=0, double samples_per_unit= 1.0) const;
- virtual jack_nframes_t read_at (Sample *buf, Sample *mixdown_buf,
- float *gain_buf, jack_nframes_t position, jack_nframes_t cnt,
+ virtual nframes_t read_at (Sample *buf, Sample *mixdown_buf,
+ float *gain_buf, nframes_t position, nframes_t cnt,
uint32_t chan_n = 0,
- jack_nframes_t read_frames = 0,
- jack_nframes_t skip_frames = 0) const;
+ nframes_t read_frames = 0,
+ nframes_t skip_frames = 0) const;
- jack_nframes_t master_read_at (Sample *buf, Sample *mixdown_buf, float *gain_buf,
- jack_nframes_t position, jack_nframes_t cnt, uint32_t chan_n=0) const;
+ nframes_t master_read_at (Sample *buf, Sample *mixdown_buf,
+ float *gain_buf,
+ nframes_t position, nframes_t cnt, uint32_t chan_n=0) const;
XMLNode& state (bool);
int set_state (const XMLNode&);
- static void set_default_fade (float steepness, jack_nframes_t len);
+ static void set_default_fade (float steepness, nframes_t len);
enum FadeShape {
Linear,
void set_fade_in_active (bool yn);
void set_fade_in_shape (FadeShape);
- void set_fade_in_length (jack_nframes_t);
- void set_fade_in (FadeShape, jack_nframes_t);
+ void set_fade_in_length (nframes_t);
+ void set_fade_in (FadeShape, nframes_t);
void set_fade_out_active (bool yn);
void set_fade_out_shape (FadeShape);
- void set_fade_out_length (jack_nframes_t);
- void set_fade_out (FadeShape, jack_nframes_t);
+ void set_fade_out_length (nframes_t);
+ void set_fade_out (FadeShape, nframes_t);
void set_envelope_active (bool yn);
private:
friend class RegionFactory;
- AudioRegion (boost::shared_ptr<AudioSource>, jack_nframes_t start, jack_nframes_t length);
- AudioRegion (boost::shared_ptr<AudioSource>, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
- AudioRegion (SourceList &, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
- AudioRegion (boost::shared_ptr<const AudioRegion>, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
+ AudioRegion (boost::shared_ptr<AudioSource>, nframes_t start, nframes_t length);
+ AudioRegion (boost::shared_ptr<AudioSource>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
+ AudioRegion (SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
+ AudioRegion (boost::shared_ptr<const AudioRegion>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
AudioRegion (boost::shared_ptr<const AudioRegion>);
AudioRegion (boost::shared_ptr<AudioSource>, const XMLNode&);
AudioRegion (SourceList &, const XMLNode&);
void recompute_gain_at_end ();
void recompute_gain_at_start ();
- jack_nframes_t _read_at (const SourceList&, Sample *buf, Sample *mixdown_buffer,
- float *gain_buffer, jack_nframes_t position, jack_nframes_t cnt,
+ nframes_t _read_at (const SourceList&, Sample *buf, Sample *mixdown_buffer,
+ float *gain_buffer, nframes_t position, nframes_t cnt,
uint32_t chan_n = 0,
- jack_nframes_t read_frames = 0,
- jack_nframes_t skip_frames = 0) const;
+ nframes_t read_frames = 0,
+ nframes_t skip_frames = 0) const;
void recompute_at_start ();
void recompute_at_end ();
#include <vector>
#include <string>
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+
#include <time.h>
#include <glibmm/thread.h>
namespace ARDOUR {
-const jack_nframes_t frames_per_peak = 256;
+const nframes_t frames_per_peak = 256;
-class AudioSource : public Source
+ class AudioSource : public Source, public boost::enable_shared_from_this<ARDOUR::AudioSource>
{
public:
AudioSource (Session&, string name);
AudioSource (Session&, const XMLNode&);
virtual ~AudioSource ();
- virtual jack_nframes_t available_peaks (double zoom) const;
+ virtual nframes_t available_peaks (double zoom) const;
- virtual jack_nframes_t read (Sample *dst, jack_nframes_t start, jack_nframes_t cnt) const;
- virtual jack_nframes_t write (Sample *src, jack_nframes_t cnt);
+ virtual nframes_t read (Sample *dst, nframes_t start, nframes_t cnt) const;
+ virtual nframes_t write (Sample *src, nframes_t cnt);
virtual float sample_rate () const = 0;
uint32_t read_data_count() const { return _read_data_count; }
uint32_t write_data_count() const { return _write_data_count; }
- int read_peaks (PeakData *peaks, jack_nframes_t npeaks, jack_nframes_t start, jack_nframes_t cnt, double samples_per_unit) const;
+ int read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nframes_t cnt, double samples_per_unit) const;
int build_peaks ();
bool peaks_ready (sigc::slot<void>, sigc::connection&) const;
mutable sigc::signal<void> PeaksReady;
- mutable sigc::signal<void,jack_nframes_t,jack_nframes_t> PeakRangeReady;
+ mutable sigc::signal<void,nframes_t,nframes_t> PeakRangeReady;
XMLNode& get_state ();
int set_state (const XMLNode&);
static void stop_peak_thread ();
int rename_peakfile (std::string newpath);
+ void touch_peakfile ();
static void set_build_missing_peakfiles (bool yn) {
_build_missing_peakfiles = yn;
_build_peakfiles = yn;
}
+ virtual int setup_peakfile () { return 0; }
+
protected:
static bool _build_missing_peakfiles;
static bool _build_peakfiles;
int initialize_peakfile (bool newfile, string path);
void build_peaks_from_scratch ();
- int do_build_peak (jack_nframes_t, jack_nframes_t);
+ int do_build_peak (nframes_t, nframes_t);
- virtual jack_nframes_t read_unlocked (Sample *dst, jack_nframes_t start, jack_nframes_t cnt) const = 0;
- virtual jack_nframes_t write_unlocked (Sample *dst, jack_nframes_t cnt) = 0;
+ virtual nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const = 0;
+ virtual nframes_t write_unlocked (Sample *dst, nframes_t cnt) = 0;
virtual string peak_path(string audio_path) = 0;
virtual string old_peak_path(string audio_path) = 0;
};
};
- static vector<AudioSource*> pending_peak_sources;
+ static vector<boost::shared_ptr<AudioSource> > pending_peak_sources;
static Glib::Mutex* pending_peak_sources_lock;
- static void queue_for_peaks (AudioSource*);
+ static void queue_for_peaks (boost::shared_ptr<AudioSource>);
static void clear_queue_for_peaks ();
struct PeakBuildRecord {
- jack_nframes_t frame;
- jack_nframes_t cnt;
+ nframes_t frame;
+ nframes_t cnt;
- PeakBuildRecord (jack_nframes_t f, jack_nframes_t c)
+ PeakBuildRecord (nframes_t f, nframes_t c)
: frame (f), cnt (c) {}
PeakBuildRecord (const PeakBuildRecord& other) {
frame = other.frame;
ARDOUR::AudioPlaylist& prepare_playlist ();
void audition_current_playlist ();
- int play_audition (jack_nframes_t nframes);
+ int play_audition (nframes_t nframes);
void cancel_audition () {
g_atomic_int_set (&_active, 0);
private:
boost::shared_ptr<AudioRegion> the_region;
- jack_nframes_t current_frame;
+ nframes_t current_frame;
mutable gint _active;
Glib::Mutex lock;
- jack_nframes_t length;
+ nframes_t length;
void drop_ports ();
static void *_drop_ports (void *);
std::map<std::string,MidiPortDescriptor *> midi_ports;
+ void map_parameters (sigc::slot<void,const char*> theSlot);
+
int load_state ();
int save_state ();
int set_state (const XMLNode&);
XMLNode& get_state (void);
+ XMLNode& get_variables (sigc::slot<bool,ConfigVariableBase::Owner>);
+ void set_variables (const XMLNode&, ConfigVariableBase::Owner owner);
+
+ void set_current_owner (ConfigVariableBase::Owner);
XMLNode* control_protocol_state () { return _control_protocol_state; }
#undef CONFIG_VARIABLE_SPECIAL
#define CONFIG_VARIABLE(Type,var,name,value) \
Type get_##var () const { return var.get(); } \
- void set_##var (Type val) { var.set (val); var.set_is_user (user_configuration); ParameterChanged (name); }
+ bool set_##var (Type val) { bool ret = var.set (val, current_owner); if (ret) { ParameterChanged (name); } return ret; }
#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
Type get_##var () const { return var.get(); } \
- void set_##var (Type val) { var.set (val); var.set_is_user (user_configuration); ParameterChanged (name); }
+ bool set_##var (Type val) { bool ret = var.set (val, current_owner); if (ret) { ParameterChanged (name); } return ret; }
#include "ardour/configuration_vars.h"
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
-
private:
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
- bool user_configuration;
+ ConfigVariableBase::Owner current_owner;
XMLNode* _control_protocol_state;
- XMLNode& state (bool user_only);
+ XMLNode& state (sigc::slot<bool,ConfigVariableBase::Owner>);
+ bool save_config_options_predicate (ConfigVariableBase::Owner owner);
};
extern Configuration *Config;
class ConfigVariableBase {
public:
- ConfigVariableBase (std::string str) : _name (str), _is_user (false) {}
+ enum Owner {
+ Default = 0x1,
+ System = 0x2,
+ Config = 0x4,
+ Session = 0x8,
+ Interface = 0x10
+ };
+
+ ConfigVariableBase (std::string str) : _name (str), _owner (Default) {}
virtual ~ConfigVariableBase() {}
std::string name() const { return _name; }
- bool is_user() const { return _is_user; }
- void set_is_user (bool yn) { _is_user = yn; }
-
+ Owner owner() const { return _owner; }
+
virtual void add_to_node (XMLNode& node) = 0;
- virtual bool set_from_node (const XMLNode& node) = 0;
+ virtual bool set_from_node (const XMLNode& node, Owner owner) = 0;
protected:
std::string _name;
- bool _is_user;
+ Owner _owner;
};
template<class T>
ConfigVariable (std::string str) : ConfigVariableBase (str) {}
ConfigVariable (std::string str, T val) : ConfigVariableBase (str), value (val) {}
- virtual void set (T val) {
+ virtual bool set (T val, Owner owner) {
+ if (val == value) {
+ return false;
+ }
value = val;
+ _owner = (ConfigVariableBase::Owner)(_owner |owner);
+ return true;
}
T get() const {
node.add_child_nocopy (*child);
}
- bool set_from_node (const XMLNode& node) {
- const XMLProperty* prop;
- XMLNodeList nlist;
- XMLNodeConstIterator niter;
- XMLNode* child;
+ bool set_from_node (const XMLNode& node, Owner owner) {
+
+ if (node.name() == "Config") {
+
+ /* ardour.rc */
- nlist = node.children();
-
- for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
+ const XMLProperty* prop;
+ XMLNodeList nlist;
+ XMLNodeConstIterator niter;
+ XMLNode* child;
- child = *niter;
+ nlist = node.children();
- if (child->name() == "Option") {
- if ((prop = child->property ("name")) != 0) {
- if (prop->value() == _name) {
- if ((prop = child->property ("value")) != 0) {
- std::stringstream ss;
- ss << prop->value();
- ss >> value;
- return true;
+ for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
+
+ child = *niter;
+
+ if (child->name() == "Option") {
+ if ((prop = child->property ("name")) != 0) {
+ if (prop->value() == _name) {
+ if ((prop = child->property ("value")) != 0) {
+ std::stringstream ss;
+ ss << prop->value();
+ ss >> value;
+ _owner = (ConfigVariableBase::Owner)(_owner |owner);
+ return true;
+ }
}
}
}
}
+
+ } else if (node.name() == "Options") {
+
+ /* session file */
+
+ XMLNodeList olist;
+ XMLNodeConstIterator oiter;
+ XMLNode* option;
+ const XMLProperty* opt_prop;
+
+ olist = node.children();
+
+ for (oiter = olist.begin(); oiter != olist.end(); ++oiter) {
+
+ option = *oiter;
+
+ if (option->name() == _name) {
+ if ((opt_prop = option->property ("val")) != 0) {
+ std::stringstream ss;
+ ss << opt_prop->value();
+ ss >> value;
+ _owner = (ConfigVariableBase::Owner)(_owner |owner);
+ return true;
+ }
+ }
+ }
}
return false;
ConfigVariableWithMutation (std::string name, T val, T (*m)(T))
: ConfigVariable<T> (name, val), mutator (m) {}
- void set (T val) {
- unmutated_value = val;
- ConfigVariable<T>::set (mutator (val));
+ bool set (T val, ConfigVariableBase::Owner owner) {
+ if (unmutated_value != val) {
+ unmutated_value = val;
+ return ConfigVariable<T>::set (mutator (val), owner);
+ }
+ return false;
}
protected:
+/* IO connection */
+
+CONFIG_VARIABLE (AutoConnectOption, output_auto_connect, "output-auto-connect", AutoConnectOption (0))
+CONFIG_VARIABLE (AutoConnectOption, input_auto_connect, "input-auto-connect", AutoConnectOption (0))
+
#ifdef __APPLE__
-CONFIG_VARIABLE(std::string, auditioner_output_left, "auditioner-output-left", "coreaudio:Built-in Audio:in1")
-CONFIG_VARIABLE(std::string, auditioner_output_right, "auditioner-output-right", "coreaudio:Built-in Audio:in2")
+CONFIG_VARIABLE (std::string, auditioner_output_left, "auditioner-output-left", "coreaudio:Built-in Audio:in1")
+CONFIG_VARIABLE (std::string, auditioner_output_right, "auditioner-output-right", "coreaudio:Built-in Audio:in2")
#else
-CONFIG_VARIABLE(std::string, auditioner_output_left, "auditioner-output-left", "alsa_pcm:playback_1")
-CONFIG_VARIABLE(std::string, auditioner_output_right, "auditioner-output-right", "alsa_pcm:playback_2")
+CONFIG_VARIABLE (std::string, auditioner_output_left, "auditioner-output-left", "alsa_pcm:playback_1")
+CONFIG_VARIABLE (std::string, auditioner_output_right, "auditioner-output-right", "alsa_pcm:playback_2")
#endif
+
+/* MIDI and MIDI related */
+
+CONFIG_VARIABLE (std::string, mtc_port_name, "mtc-port-name", "default")
+CONFIG_VARIABLE (std::string, mmc_port_name, "mmc-port-name", "default")
+CONFIG_VARIABLE (std::string, midi_port_name, "midi-port-name", "default")
+CONFIG_VARIABLE (bool, trace_midi_input, "trace-midi-input", false)
+CONFIG_VARIABLE (bool, trace_midi_output, "trace-midi-output", false)
+CONFIG_VARIABLE (bool, send_mtc, "send-mtc", false)
+CONFIG_VARIABLE (bool, send_mmc, "send-mmc", false)
+CONFIG_VARIABLE (bool, mmc_control, "mmc-control", false)
+CONFIG_VARIABLE (bool, midi_feedback, "midi-feedback", false)
+CONFIG_VARIABLE (bool, midi_control, "midi-control", false)
+
+/* control surfaces */
+
+CONFIG_VARIABLE (uint32_t, feedback_interval_ms, "feedback-interval-ms", 100)
+CONFIG_VARIABLE (bool, use_tranzport, "use-tranzport", false)
+
+/* disk operations */
+
+CONFIG_VARIABLE (uint32_t, minimum_disk_io_bytes, "minimum-disk-io-bytes", 1024 * 256)
+CONFIG_VARIABLE (float, track_buffer_seconds, "track-buffer-seconds", 5.0)
+CONFIG_VARIABLE (uint32_t, disk_choice_space_threshold, "disk-choice-space-threshold", 57600000)
+CONFIG_VARIABLE (SampleFormat, native_file_data_format, "native-file-data-format", ARDOUR::FormatFloat)
+CONFIG_VARIABLE (HeaderFormat, native_file_header_format, "native-file-header-format", ARDOUR::WAVE)
+
+/* OSC */
+
+CONFIG_VARIABLE (uint32_t, osc_port, "osc-port", 3819)
+CONFIG_VARIABLE (bool, use_osc, "use-osc", true)
+CONFIG_VARIABLE (bool, use_overlap_equivalency, "use-overlap-equivalency", true)
+
+/* crossfades */
+
+CONFIG_VARIABLE (CrossfadeModel, xfade_model, "xfade-model", ShortCrossfade)
+CONFIG_VARIABLE (bool, auto_xfade, "auto-xfade", true)
+CONFIG_VARIABLE (float, short_xfade_seconds, "short-xfade-seconds", 0.015)
+CONFIG_VARIABLE (bool, crossfades_active, "crossfades-active", false)
+CONFIG_VARIABLE (bool, crossfades_visible, "crossfades-visible", false)
+CONFIG_VARIABLE (uint32_t, destructive_xfade_msecs, "destructive-xfade-msecs", 2)
+
+/* editing related */
+
+CONFIG_VARIABLE (EditMode, edit_mode, "edit-mode", Slide)
+CONFIG_VARIABLE (LayerModel, layer_model, "layer-model", MoveAddHigher)
+
+/* monitoring, mute, solo etc */
+
+CONFIG_VARIABLE (bool, mute_affects_pre_fader, "mute-affects-pre-fader", true)
+CONFIG_VARIABLE (bool, mute_affects_post_fader, "mute-affects-post-fader", true)
+CONFIG_VARIABLE (bool, mute_affects_control_outs, "mute-affects-control-outs", true)
+CONFIG_VARIABLE (bool, mute_affects_main_outs, "mute-affects-main-outs", true)
+CONFIG_VARIABLE (MonitorModel, monitoring_model, "monitoring-model", SoftwareMonitoring)
+CONFIG_VARIABLE (SoloModel, solo_model, "solo-model", InverseMute)
+CONFIG_VARIABLE (bool, solo_latched, "solo-latched", true)
+CONFIG_VARIABLE (bool, latched_record_enable, "latched-record-enable", false)
+CONFIG_VARIABLE (bool, all_safe, "all-safe", false)
+
+/* click */
+
+CONFIG_VARIABLE (bool, clicking, "clicking", false)
+CONFIG_VARIABLE (std::string, click_sound, "click-sound", "")
+CONFIG_VARIABLE (std::string, click_emphasis_sound, "click-emphasis-sound", "")
+
+/* transport control and related */
+
+CONFIG_VARIABLE (bool, auto_play, "auto-play", false)
+CONFIG_VARIABLE (bool, auto_return, "auto-return", false)
+CONFIG_VARIABLE (bool, auto_input, "auto-input", true)
+CONFIG_VARIABLE (bool, auto_loop, "auto-loop", false)
+CONFIG_VARIABLE (bool, punch_in, "punch-in", false)
+CONFIG_VARIABLE (bool, punch_out, "punch-out", false)
+CONFIG_VARIABLE (bool, plugins_stop_with_transport, "plugins-stop-with-transport", false)
+CONFIG_VARIABLE (bool, do_not_record_plugins, "do-not-record-plugins", false)
+CONFIG_VARIABLE (bool, stop_recording_on_xrun, "stop-recording-on-xrun", false)
+CONFIG_VARIABLE (bool, stop_at_session_end, "stop-at-session-end", true)
+CONFIG_VARIABLE (bool, seamless_loop, "seamless-loop", false)
+CONFIG_VARIABLE (nframes_t, preroll, "preroll", 0)
+CONFIG_VARIABLE (nframes_t, postroll, "postroll", 0)
+CONFIG_VARIABLE (float, rf_speed, "rf-speed", 2.0f)
+CONFIG_VARIABLE (float, shuttle_speed_factor, "shuttle-speed-factor", 1.0f)
+CONFIG_VARIABLE (float, shuttle_speed_threshold, "shuttle-speed-threshold", 5.0f)
+CONFIG_VARIABLE (SlaveSource, slave_source, "slave-source", None)
+CONFIG_VARIABLE (ShuttleBehaviour, shuttle_behaviour, "shuttle-behaviour", Sprung)
+CONFIG_VARIABLE (ShuttleUnits, shuttle_units, "shuttle-units", Percentage)
+CONFIG_VARIABLE (bool, quieten_at_speed, "quieten-at-speed", true)
+
+/* timecode and sync */
+
+CONFIG_VARIABLE (bool, jack_time_master, "jack-time-master", true)
+CONFIG_VARIABLE (bool, use_video_sync, "use-video-sync", false)
+CONFIG_VARIABLE (bool, timecode_source_is_synced, "timecode-source-is-synced", true)
+CONFIG_VARIABLE (float, smpte_frames_per_second, "smpte-frames-per-second", 30.0f)
+CONFIG_VARIABLE (float, video_pullup, "video-pullup", 0.0f)
+CONFIG_VARIABLE (bool, smpte_drop_frames, "smpte-drop-frames", false)
+
+/* metering */
+
+CONFIG_VARIABLE (float, meter_hold, "meter-hold", 100.0f)
+CONFIG_VARIABLE (float, meter_falloff, "meter-falloff", 0.375f)
+CONFIG_VARIABLE (nframes_t, over_length_short, "over-length-short", 2)
+CONFIG_VARIABLE (nframes_t, over_length_long, "over-length-long", 10)
+
+/* miscellany */
-CONFIG_VARIABLE(std::string, mtc_port_name, "mtc-port-name", "default")
-CONFIG_VARIABLE(std::string, mmc_port_name, "mmc-port-name", "default")
-CONFIG_VARIABLE(std::string, midi_port_name, "midi-port-name", "default")
-CONFIG_VARIABLE(uint32_t, minimum_disk_io_bytes, "minimum-disk-io-bytes", 1024 * 256)
-CONFIG_VARIABLE(float, track_buffer_seconds, "track-buffer-seconds", 5.0)
-CONFIG_VARIABLE(bool, hiding_groups_deactivates_groups, "hiding-groups-deactivates-groups", true)
-CONFIG_VARIABLE(bool, mute_affects_pre_fader, "mute-affects-pre-fader", true)
-CONFIG_VARIABLE(bool, mute_affects_post_fader, "mute-affects-post-fader", true)
-CONFIG_VARIABLE(bool, mute_affects_control_outs, "mute-affects-control-outs", true)
-CONFIG_VARIABLE(bool, mute_affects_main_outs, "mute-affects-main-outs", true)
-CONFIG_VARIABLE(bool, solo_latch, "solo-latch", true)
-CONFIG_VARIABLE(bool, use_hardware_monitoring, "use-hardware-monitoring", false)
-CONFIG_VARIABLE(bool, use_sw_monitoring, "use-sw-monitoring", false)
-CONFIG_VARIABLE(bool, use_external_monitoring, "use-external-monitoring", true)
-CONFIG_VARIABLE(bool, jack_time_master, "jack-time-master", true)
-CONFIG_VARIABLE(bool, use_video_sync, "use-video-sync", false)
-CONFIG_VARIABLE(bool, trace_midi_input, "trace-midi-input", false)
-CONFIG_VARIABLE(bool, trace_midi_output, "trace-midi-output", false)
-CONFIG_VARIABLE(bool, plugins_stop_with_transport, "plugins-stop-with-transport", false)
-CONFIG_VARIABLE(bool, stop_recording_on_xrun, "stop-recording-on-xrun", false)
-CONFIG_VARIABLE(bool, verify_remove_last_capture, "verify-remove-last-capture", true)
-CONFIG_VARIABLE(bool, stop_at_session_end, "stop-at-session-end", true)
-CONFIG_VARIABLE(bool, seamless_looping, "seamless-looping", true)
-CONFIG_VARIABLE(bool, auto_xfade, "auto-xfade", true)
-CONFIG_VARIABLE(bool, no_new_session_dialog, "no-new-session-dialog", false)
-CONFIG_VARIABLE(bool, timecode_source_is_synced, "timecode-source-is-synced", true)
-CONFIG_VARIABLE(bool, latched_record_enable, "latched-record-enable", false)
-CONFIG_VARIABLE(bool, use_vst, "use-vst", true)
-CONFIG_VARIABLE(bool, quieten_at_speed, "quieten-at-speed", true)
-CONFIG_VARIABLE(uint32_t, feedback_interval_ms, "feedback-interval-ms", 100)
-CONFIG_VARIABLE(uint32_t, disk_choice_space_threshold, "disk-choice-space-threshold", 57600000)
-CONFIG_VARIABLE(uint32_t, destructive_xfade_msecs, "destructive-xfade-msecs", 2)
-CONFIG_VARIABLE(SampleFormat, native_file_data_format, "native-file-data-format", ARDOUR::FormatFloat)
-CONFIG_VARIABLE(HeaderFormat, native_file_header_format, "native-file-header-format", ARDOUR::WAVE)
-CONFIG_VARIABLE(bool, use_tranzport, "use-tranzport", false)
-CONFIG_VARIABLE(uint32_t, osc_port, "osc-port", 3819)
-CONFIG_VARIABLE(bool, use_osc, "use-osc", true)
-CONFIG_VARIABLE(bool, use_overlap_equivalency, "use-overlap-equivalency", true)
-CONFIG_VARIABLE(bool, meter_falloff_off, "meter-falloff-off", false)
-CONFIG_VARIABLE(bool, meter_falloff_slowest, "meter-falloff-slowest", false)
-CONFIG_VARIABLE(bool, meter_falloff_slower, "meter-falloff-slower", false)
-CONFIG_VARIABLE(bool, meter_falloff_slow, "meter-falloff-slow", false)
-CONFIG_VARIABLE(bool, meter_falloff_medium, "meter-falloff-medium", false)
-CONFIG_VARIABLE(bool, meter_falloff_fast, "meter-falloff-fast", true)
-CONFIG_VARIABLE(bool, meter_falloff_faster, "meter-falloff-faster", false)
-CONFIG_VARIABLE(bool, meter_falloff_fastest, "meter-falloff-fastest", false)
-CONFIG_VARIABLE(bool, meter_hold_off, "meter-hold-off", false)
-CONFIG_VARIABLE(bool, meter_hold_short, "meter-hold-short", false)
-CONFIG_VARIABLE(bool, meter_hold_medium, "meter-hold-medium", false)
-CONFIG_VARIABLE(bool, meter_hold_long, "meter-hold-long", false)
-
-/* these variables have custom set() methods */
+CONFIG_VARIABLE (bool, hiding_groups_deactivates_groups, "hiding-groups-deactivates-groups", true)
+CONFIG_VARIABLE (bool, verify_remove_last_capture, "verify-remove-last-capture", true)
+CONFIG_VARIABLE (bool, no_new_session_dialog, "no-new-session-dialog", false)
+CONFIG_VARIABLE (bool, use_vst, "use-vst", true)
+
+/* these variables have custom set() methods (e.g. path globbing) */
CONFIG_VARIABLE_SPECIAL(std::string, raid_path, "raid-path", "", path_expand)
std::string path;
bool requested;
bool mandatory;
+ bool supports_feedback;
XMLNode* state;
+
+ ControlProtocolInfo() : descriptor (0), protocol (0), state (0) {}
+ ~ControlProtocolInfo() { if (state) { delete state; } }
};
class ControlProtocolManager : public sigc::trackable, public Stateful
static const std::string state_node_name;
+ void set_protocol_states (const XMLNode&);
+
int set_state (const XMLNode&);
XMLNode& get_state (void);
~CoreAudioSource ();
float sample_rate() const;
- int update_header (jack_nframes_t when, struct tm&, time_t);
+ int update_header (nframes_t when, struct tm&, time_t);
int flush_header () {return 0;};
void set_header_timeline_position () {};
protected:
- jack_nframes_t read_unlocked (Sample *dst, jack_nframes_t start, jack_nframes_t cnt) const;
-
- jack_nframes_t write_unlocked (Sample *dst, jack_nframes_t cnt)
- { return 0; }
-
+ nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const;
+ nframes_t write_unlocked (Sample *dst, nframes_t cnt) { return 0; }
private:
mutable CAAudioFile af;
uint16_t n_channels;
mutable float *tmpbuf;
- mutable jack_nframes_t tmpbufsize;
+ mutable nframes_t tmpbufsize;
mutable Glib::Mutex _tmpbuf_lock;
void init (const string &str);
UndoAction fade_in_memento;
UndoAction fade_out_memento;
- jack_nframes_t position;
- jack_nframes_t length;
+ nframes_t position;
+ nframes_t length;
AnchorPoint anchor_point;
bool follow_overlap;
bool active;
/* constructor for "fixed" xfades at each end of an internal overlap */
Crossfade (boost::shared_ptr<ARDOUR::AudioRegion> in, boost::shared_ptr<ARDOUR::AudioRegion> out,
- jack_nframes_t position,
- jack_nframes_t initial_length,
+ nframes_t position,
+ nframes_t initial_length,
AnchorPoint);
/* constructor for xfade between two regions that are overlapped in any way
boost::shared_ptr<ARDOUR::AudioRegion> in() const { return _in; }
boost::shared_ptr<ARDOUR::AudioRegion> out() const { return _out; }
- jack_nframes_t read_at (Sample *buf, Sample *mixdown_buffer,
- float *gain_buffer, jack_nframes_t position, jack_nframes_t cnt,
+ nframes_t read_at (Sample *buf, Sample *mixdown_buffer,
+ float *gain_buffer, nframes_t position, nframes_t cnt,
uint32_t chan_n,
- jack_nframes_t read_frames = 0,
- jack_nframes_t skip_frames = 0);
+ nframes_t read_frames = 0,
+ nframes_t skip_frames = 0);
bool refresh ();
return (_in == a && _out == b) || (_in == b && _out == a);
}
- jack_nframes_t length() const { return _length; }
- jack_nframes_t overlap_length() const;
- jack_nframes_t position() const { return _position; }
+ nframes_t length() const { return _length; }
+ nframes_t overlap_length() const;
+ nframes_t position() const { return _position; }
sigc::signal<void,Crossfade*> Invalidated;
- bool covers (jack_nframes_t frame) const {
+ bool covers (nframes_t frame) const {
return _position <= frame && frame < _position + _length;
}
- OverlapType coverage (jack_nframes_t start, jack_nframes_t end) const;
+ OverlapType coverage (nframes_t start, nframes_t end) const;
UndoAction get_memento() const;
- static void set_buffer_size (jack_nframes_t);
+ static void set_buffer_size (nframes_t);
bool active () const { return _active; }
void set_active (bool yn);
Curve& fade_in() { return _fade_in; }
Curve& fade_out() { return _fade_out; }
- jack_nframes_t set_length (jack_nframes_t);
+ nframes_t set_length (nframes_t);
- static jack_nframes_t short_xfade_length() { return _short_xfade_length; }
- static void set_short_xfade_length (jack_nframes_t n);
+ static nframes_t short_xfade_length() { return _short_xfade_length; }
+ static void set_short_xfade_length (nframes_t n);
static Change ActiveChanged;
friend struct CrossfadeComparePtr;
friend class AudioPlaylist;
- static jack_nframes_t _short_xfade_length;
+ static nframes_t _short_xfade_length;
boost::shared_ptr<ARDOUR::AudioRegion> _in;
boost::shared_ptr<ARDOUR::AudioRegion> _out;
bool _active;
bool _in_update;
OverlapType overlap_type;
- jack_nframes_t _length;
- jack_nframes_t _position;
+ nframes_t _length;
+ nframes_t _position;
AnchorPoint _anchor_point;
bool _follow_overlap;
bool _fixed;
class DestructiveFileSource : public SndFileSource {
public:
- DestructiveFileSource (Session&, std::string path, SampleFormat samp_format, HeaderFormat hdr_format, jack_nframes_t rate,
+ DestructiveFileSource (Session&, std::string path, SampleFormat samp_format, HeaderFormat hdr_format, nframes_t rate,
Flag flags = AudioFileSource::Flag (AudioFileSource::Writable));
DestructiveFileSource (Session&, std::string path, Flag flags);
DestructiveFileSource (Session&, const XMLNode&);
~DestructiveFileSource ();
- jack_nframes_t last_capture_start_frame() const;
- void mark_capture_start (jack_nframes_t);
+ nframes_t last_capture_start_frame() const;
+ void mark_capture_start (nframes_t);
void mark_capture_end ();
void clear_capture_marks();
XMLNode& get_state ();
- static void setup_standard_crossfades (jack_nframes_t sample_rate);
+ static void setup_standard_crossfades (nframes_t sample_rate);
protected:
- jack_nframes_t write_unlocked (Sample *src, jack_nframes_t cnt);
+ nframes_t write_unlocked (Sample *src, nframes_t cnt);
virtual void handle_header_position_change ();
private:
- static jack_nframes_t xfade_frames;
+ static nframes_t xfade_frames;
static gain_t* out_coefficient;
static gain_t* in_coefficient;
bool _capture_start;
bool _capture_end;
- jack_nframes_t capture_start_frame;
- jack_nframes_t file_pos; // unit is frames
+ nframes_t capture_start_frame;
+ nframes_t file_pos; // unit is frames
Sample* xfade_buf;
void init ();
- jack_nframes_t crossfade (Sample* data, jack_nframes_t cnt, int dir);
- void set_timeline_position (jack_nframes_t);
+ nframes_t crossfade (Sample* data, nframes_t cnt, int dir);
+ void set_timeline_position (nframes_t);
};
}
class Playlist;
class IO;
- class Diskstream : public sigc::trackable, public PBD::StatefulDestructible
+ class Diskstream : public PBD::StatefulDestructible
{
public:
enum Flag {
void set_align_style (AlignStyle);
void set_persistent_align_style (AlignStyle a) { _persistent_alignment_style = a; }
- jack_nframes_t roll_delay() const { return _roll_delay; }
- void set_roll_delay (jack_nframes_t);
+ nframes_t roll_delay() const { return _roll_delay; }
+ void set_roll_delay (nframes_t);
bool record_enabled() const { return g_atomic_int_get (&_record_enabled); }
virtual void set_record_enabled (bool yn) = 0;
virtual int use_new_playlist () = 0;
virtual int use_copy_playlist () = 0;
- jack_nframes_t current_capture_start() const { return capture_start_frame; }
- jack_nframes_t current_capture_end() const { return capture_start_frame + capture_captured; }
- jack_nframes_t get_capture_start_frame (uint32_t n=0);
- jack_nframes_t get_captured_frames (uint32_t n=0);
+ nframes_t current_capture_start() const { return capture_start_frame; }
+ nframes_t current_capture_end() const { return capture_start_frame + capture_captured; }
+ nframes_t get_capture_start_frame (uint32_t n=0);
+ nframes_t get_captured_frames (uint32_t n=0);
ChanCount n_channels() { return _n_channels; }
- static jack_nframes_t disk_io_frames() { return disk_io_chunk_frames; }
+ static nframes_t disk_io_frames() { return disk_io_chunk_frames; }
static void set_disk_io_chunk_frames (uint32_t n) { disk_io_chunk_frames = n; }
/* Stateful */
virtual void monitor_input (bool) {}
- jack_nframes_t capture_offset() const { return _capture_offset; }
+ nframes_t capture_offset() const { return _capture_offset; }
virtual void set_capture_offset ();
bool slaved() const { return _slaved; }
static sigc::signal<void> DiskOverrun;
static sigc::signal<void> DiskUnderrun;
- static sigc::signal<void,std::list<boost::shared_ptr<Source> >*> DeleteSources;
protected:
friend class Session;
virtual void set_pending_overwrite (bool) = 0;
virtual int overwrite_existing_buffers () = 0;
- virtual void set_block_size (jack_nframes_t) = 0;
- virtual int internal_playback_seek (jack_nframes_t distance) = 0;
- virtual int can_internal_playback_seek (jack_nframes_t distance) = 0;
+ virtual void set_block_size (nframes_t) = 0;
+ virtual int internal_playback_seek (nframes_t distance) = 0;
+ virtual int can_internal_playback_seek (nframes_t distance) = 0;
virtual int rename_write_sources () = 0;
virtual void reset_write_sources (bool, bool force = false) = 0;
virtual void non_realtime_input_change () = 0;
protected:
friend class Auditioner;
- virtual int seek (jack_nframes_t which_sample, bool complete_refill = false) = 0;
+ virtual int seek (nframes_t which_sample, bool complete_refill = false) = 0;
protected:
friend class Track;
virtual void prepare ();
- virtual int process (jack_nframes_t transport_frame, jack_nframes_t nframes, jack_nframes_t offset, bool can_record, bool rec_monitors_input) = 0;
- virtual bool commit (jack_nframes_t nframes) = 0;
+ virtual int process (nframes_t transport_frame, nframes_t nframes, nframes_t offset, bool can_record, bool rec_monitors_input) = 0;
+ virtual bool commit (nframes_t nframes) = 0;
virtual void recover (); /* called if commit will not be called, but process was */
//private:
struct CaptureTransition {
TransitionType type;
- jack_nframes_t capture_val; ///< The start or end file frame position
+ nframes_t capture_val; ///< The start or end file frame position
};
/* The two central butler operations */
virtual int use_pending_capture_data (XMLNode& node) = 0;
virtual void get_input_sources () = 0;
- virtual void check_record_status (jack_nframes_t transport_frame, jack_nframes_t nframes, bool can_record) = 0;
+ virtual void check_record_status (nframes_t transport_frame, nframes_t nframes, bool can_record) = 0;
virtual void set_align_style_from_io() {}
virtual void setup_destructive_playlist () {}
virtual void use_destructive_playlist () {}
- static jack_nframes_t disk_io_chunk_frames;
+ static nframes_t disk_io_chunk_frames;
vector<CaptureInfo*> capture_info;
Glib::Mutex capture_info_lock;
bool _seek_required;
bool force_refill;
- jack_nframes_t capture_start_frame;
- jack_nframes_t capture_captured;
+ nframes_t capture_start_frame;
+ nframes_t capture_captured;
bool was_recording;
- jack_nframes_t adjust_capture_position;
- jack_nframes_t _capture_offset;
- jack_nframes_t _roll_delay;
- jack_nframes_t first_recordable_frame;
- jack_nframes_t last_recordable_frame;
+ nframes_t adjust_capture_position;
+ nframes_t _capture_offset;
+ nframes_t _roll_delay;
+ nframes_t first_recordable_frame;
+ nframes_t last_recordable_frame;
int last_possibly_recording;
AlignStyle _alignment_style;
bool _scrubbing;
bool _slaved;
bool _processed;
Location* loop_location;
- jack_nframes_t overwrite_frame;
+ nframes_t overwrite_frame;
off_t overwrite_offset;
bool pending_overwrite;
bool overwrite_queued;
IOChange input_change_pending;
- jack_nframes_t wrap_buffer_size;
- jack_nframes_t speed_buffer_size;
+ nframes_t wrap_buffer_size;
+ nframes_t speed_buffer_size;
uint64_t last_phase;
uint64_t phi;
- jack_nframes_t file_frame;
- jack_nframes_t playback_sample;
- jack_nframes_t playback_distance;
+ nframes_t file_frame;
+ nframes_t playback_sample;
+ nframes_t playback_distance;
uint32_t _read_data_count;
uint32_t _write_data_count;
Glib::Mutex state_lock;
- jack_nframes_t scrub_start;
- jack_nframes_t scrub_buffer_size;
- jack_nframes_t scrub_offset;
+ nframes_t scrub_start;
+ nframes_t scrub_buffer_size;
+ nframes_t scrub_offset;
sigc::connection ports_created_c;
sigc::connection plmod_connection;
void clear ();
- int prepare (jack_nframes_t blocksize, jack_nframes_t frame_rate);
+ int prepare (nframes_t blocksize, nframes_t frame_rate);
- int process (jack_nframes_t nframes);
+ int process (nframes_t nframes);
/* set by the user */
string path;
- jack_nframes_t sample_rate;
+ nframes_t sample_rate;
int src_quality;
SNDFILE* out;
uint32_t channels;
AudioExportPortMap port_map;
- jack_nframes_t start_frame;
- jack_nframes_t end_frame;
+ nframes_t start_frame;
+ nframes_t end_frame;
GDitherType dither_type;
bool do_freewheel;
/* used exclusively during export */
- jack_nframes_t frame_rate;
+ nframes_t frame_rate;
GDither dither;
float* dataF;
float* dataF2;
float* leftoverF;
- jack_nframes_t leftover_frames;
- jack_nframes_t max_leftover_frames;
+ nframes_t leftover_frames;
+ nframes_t max_leftover_frames;
void* output_data;
- jack_nframes_t out_samples_max;
+ nframes_t out_samples_max;
uint32_t sample_bytes;
uint32_t data_width;
- jack_nframes_t total_frames;
+ nframes_t total_frames;
SF_INFO sfinfo;
SRC_DATA src_data;
SRC_STATE* src_state;
- jack_nframes_t pos;
+ nframes_t pos;
sigc::connection freewheel_connection;
Gain (const Gain&);
Gain& operator= (const Gain&);
- static void fill_linear_fade_in (Gain& curve, jack_nframes_t frames);
- static void fill_linear_volume_fade_in (Gain& curve, jack_nframes_t frames);
- static void fill_linear_fade_out (Gain& curve, jack_nframes_t frames);
- static void fill_linear_volume_fade_out (Gain& curve, jack_nframes_t frames);
+ static void fill_linear_fade_in (Gain& curve, nframes_t frames);
+ static void fill_linear_volume_fade_in (Gain& curve, nframes_t frames);
+ static void fill_linear_fade_out (Gain& curve, nframes_t frames);
+ static void fill_linear_volume_fade_out (Gain& curve, nframes_t frames);
};
virtual ~Insert() { }
- virtual void run (BufferSet& bufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset) = 0;
+ virtual void run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) = 0;
+
virtual void activate () {}
virtual void deactivate () {}
int set_state(const XMLNode&);
void init ();
- void run (BufferSet& bufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset);
+
+ void run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset);
- jack_nframes_t latency();
+ nframes_t latency();
ChanCount output_streams() const;
ChanCount input_streams() const;
StateManager::State* state_factory (std::string why) const;
Change restore_state (StateManager::State&);
- void run (BufferSet& bufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset);
- void silence (jack_nframes_t nframes, jack_nframes_t offset);
+ void run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset);
+ void silence (nframes_t nframes, nframes_t offset);
+
void activate ();
void deactivate ();
- void set_block_size (jack_nframes_t nframes);
+ void set_block_size (nframes_t nframes);
ChanCount output_streams() const;
ChanCount input_streams() const;
string describe_parameter (uint32_t);
- jack_nframes_t latency();
+ nframes_t latency();
- void transport_stopped (jack_nframes_t now);
- void automation_snapshot (jack_nframes_t now);
+ void transport_stopped (nframes_t now);
protected:
void store_state (PluginInsertState&) const;
void parameter_changed (uint32_t, float);
vector<boost::shared_ptr<Plugin> > _plugins;
- void automation_run (BufferSet& bufs, jack_nframes_t nframes, jack_nframes_t offset);
- void connect_and_run (BufferSet& bufs, jack_nframes_t nframes, jack_nframes_t offset, bool with_auto, jack_nframes_t now = 0);
+
+ void automation_run (BufferSet& bufs, nframes_t nframes, nframes_t offset);
+ void connect_and_run (BufferSet& bufs, nframes_t nframes, nframes_t offset, bool with_auto, nframes_t now = 0);
void init ();
void set_automatable ();
const string& name() const { return _name; }
virtual int set_name (string str, void *src);
- virtual void silence (jack_nframes_t, jack_nframes_t offset);
+ virtual void silence (nframes_t, nframes_t offset);
void collect_input (BufferSet& bufs, jack_nframes_t nframes, jack_nframes_t offset);
void deliver_output (BufferSet& bufs, jack_nframes_t start_frame, jack_nframes_t end_frame,
int disconnect_inputs (void *src);
int disconnect_outputs (void *src);
- jack_nframes_t output_latency() const;
- jack_nframes_t input_latency() const;
- void set_port_latency (jack_nframes_t);
+ nframes_t output_latency() const;
+ nframes_t input_latency() const;
+ void set_port_latency (nframes_t);
const PortSet& inputs() const { return _inputs; }
const PortSet& outputs() const { return _outputs; }
AutoStyle gain_automation_style () const { return _gain_automation_curve.automation_style(); }
sigc::signal<void> gain_automation_style_changed;
- static void set_automation_interval (jack_nframes_t frames) {
- _automation_interval = frames;
- }
-
- static jack_nframes_t automation_interval() {
- return _automation_interval;
- }
-
- virtual void transport_stopped (jack_nframes_t now);
- virtual void automation_snapshot (jack_nframes_t now);
+ virtual void transport_stopped (nframes_t now);
ARDOUR::Curve& gain_automation_curve () { return _gain_automation_curve; }
mutable Glib::Mutex io_lock;
protected:
- Session& _session;
- Panner* _panner;
- BufferSet* _output_buffers; //< Set directly to our output port buffers
- gain_t _gain;
- gain_t _effective_gain;
- gain_t _desired_gain;
- Glib::Mutex declick_lock;
- PortSet _outputs;
- PortSet _inputs;
- PeakMeter* _meter;
- string _name;
- Connection* _input_connection;
- Connection* _output_connection;
- bool no_panner_reset;
- bool _phase_invert;
- XMLNode* deferred_state;
- DataType _default_type;
-
+ Session& _session;
+ Panner* _panner;
+ BufferSet* _output_buffers; //< Set directly to output port buffers
+ gain_t _gain;
+ gain_t _effective_gain;
+ gain_t _desired_gain;
+ Glib::Mutex declick_lock;
+ PortSet _outputs;
+ PortSet _inputs;
+ PeakMeter* _meter;
+ string _name;
+ Connection* _input_connection;
+ Connection* _output_connection;
+ bool no_panner_reset;
+ bool _phase_invert;
+ XMLNode* deferred_state;
+ DataType _default_type;
+
virtual void set_deferred_state() {}
void reset_panner ();
{ return _inputs.count().get(DataType::AUDIO); }
struct GainControllable : public PBD::Controllable {
- GainControllable (IO& i) : io (i) {}
+ GainControllable (std::string name, IO& i) : Controllable (name), io (i) {}
void set_value (float val);
float get_value (void) const;
Change restore_state (State&);
StateManager::State* state_factory (std::string why) const;
- /* automation */
-
- jack_nframes_t last_automation_snapshot;
- static jack_nframes_t _automation_interval;
-
- AutoState _gain_automation_state;
+ AutoState _gain_automation_state;
AutoStyle _gain_automation_style;
bool apply_gain_automation;
class LadspaPlugin : public ARDOUR::Plugin
{
public:
- LadspaPlugin (void *module, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, jack_nframes_t sample_rate);
+ LadspaPlugin (void *module, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, nframes_t sample_rate);
LadspaPlugin (const LadspaPlugin &);
~LadspaPlugin ();
const char * maker() const { return descriptor->Maker; }
uint32_t parameter_count() const { return descriptor->PortCount; }
float default_value (uint32_t port);
- jack_nframes_t latency() const;
+ nframes_t latency() const;
void set_parameter (uint32_t port, float val);
float get_parameter (uint32_t port) const;
int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
descriptor->cleanup (handle);
}
}
- void set_block_size (jack_nframes_t nframes) {}
+ void set_block_size (nframes_t nframes) {}
- int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, jack_nframes_t nframes, jack_nframes_t offset);
+ int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset);
void store_state (ARDOUR::PluginState&);
void restore_state (ARDOUR::PluginState&);
string describe_parameter (uint32_t);
void *module;
const LADSPA_Descriptor *descriptor;
LADSPA_Handle handle;
- jack_nframes_t sample_rate;
+ nframes_t sample_rate;
LADSPA_Data *control_data;
LADSPA_Data *shadow_data;
LADSPA_Data *latency_control_port;
uint32_t _index;
bool was_activated;
- void init (void *mod, uint32_t index, jack_nframes_t rate);
- void run (jack_nframes_t nsamples);
+ void init (void *mod, uint32_t index, nframes_t rate);
+ void run (nframes_t nsamples);
void latency_compute_run ();
};
namespace ARDOUR {
-class Location : public sigc::trackable, public PBD::StatefulDestructible
+class Location : public PBD::StatefulDestructible
{
public:
enum Flags {
IsStart = 0x80
};
- Location (jack_nframes_t sample_start,
- jack_nframes_t sample_end,
+ Location (nframes_t sample_start,
+ nframes_t sample_end,
const string &name,
Flags bits = Flags(0))
Location (const XMLNode&);
Location* operator= (const Location& other);
- jack_nframes_t start() { return _start; }
- jack_nframes_t end() { return _end; }
- jack_nframes_t length() { return _end - _start; }
+ nframes_t start() { return _start; }
+ nframes_t end() { return _end; }
+ nframes_t length() { return _end - _start; }
- int set_start (jack_nframes_t s);
- int set_end (jack_nframes_t e);
- int set (jack_nframes_t start, jack_nframes_t end);
+ int set_start (nframes_t s);
+ int set_end (nframes_t e);
+ int set (nframes_t start, nframes_t end);
const string& name() { return _name; }
void set_name (const string &str) { _name = str; name_changed(this); }
private:
string _name;
- jack_nframes_t _start;
- jack_nframes_t _end;
+ nframes_t _start;
+ nframes_t _end;
uint32_t _flags;
void set_mark (bool yn);
int set_current (Location *, bool want_lock = true);
Location *current () const { return current_location; }
- Location *first_location_before (jack_nframes_t);
- Location *first_location_after (jack_nframes_t);
+ Location *first_location_before (nframes_t);
+ Location *first_location_after (nframes_t);
- jack_nframes_t first_mark_before (jack_nframes_t);
- jack_nframes_t first_mark_after (jack_nframes_t);
+ nframes_t first_mark_before (nframes_t);
+ nframes_t first_mark_after (nframes_t);
sigc::signal<void,Location*> current_changed;
sigc::signal<void> changed;
extern "C" {
/* SSE functions */
- float x86_sse_compute_peak (ARDOUR::Sample *buf, jack_nframes_t nsamples, float current);
+ float x86_sse_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current);
- void x86_sse_apply_gain_to_buffer (ARDOUR::Sample *buf, jack_nframes_t nframes, float gain);
+ void x86_sse_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain);
- void x86_sse_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes, float gain);
+ void x86_sse_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain);
- void x86_sse_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes);
+ void x86_sse_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes);
}
/* debug wrappers for SSE functions */
-float debug_compute_peak (ARDOUR::Sample *buf, jack_nframes_t nsamples, float current);
+float debug_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current);
-void debug_apply_gain_to_buffer (ARDOUR::Sample *buf, jack_nframes_t nframes, float gain);
+void debug_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain);
-void debug_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes, float gain);
+void debug_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain);
-void debug_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes);
+void debug_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes);
#endif
#if defined (__APPLE__)
-float veclib_compute_peak (ARDOUR::Sample *buf, jack_nframes_t nsamples, float current);
+float veclib_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current);
-void veclib_apply_gain_to_buffer (ARDOUR::Sample *buf, jack_nframes_t nframes, float gain);
+void veclib_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain);
-void veclib_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes, float gain);
+void veclib_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain);
-void veclib_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes);
+void veclib_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes);
#endif
/* non-optimized functions */
-float compute_peak (ARDOUR::Sample *buf, jack_nframes_t nsamples, float current);
+float compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current);
-void apply_gain_to_buffer (ARDOUR::Sample *buf, jack_nframes_t nframes, float gain);
+void apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain);
-void mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes, float gain);
+void mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain);
-void mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes);
+void mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes);
#endif /* __ardour_mix_h__ */
/* the basic StreamPanner API */
- virtual void distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, jack_nframes_t nframes) = 0;
+ virtual void distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes) = 0;
virtual void distribute_automated (AudioBuffer& src, BufferSet& obufs,
- jack_nframes_t start, jack_nframes_t end, jack_nframes_t nframes, pan_t** buffers) = 0;
+ nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers) = 0;
/* automation */
- virtual void snapshot (jack_nframes_t now) = 0;
- virtual void transport_stopped (jack_nframes_t frame) = 0;
+ virtual void snapshot (nframes_t now) = 0;
+ virtual void transport_stopped (nframes_t frame) = 0;
virtual void set_automation_state (AutoState) = 0;
virtual void set_automation_style (AutoStyle) = 0;
bool _muted;
struct PanControllable : public PBD::Controllable {
- PanControllable (StreamPanner& p) : panner (p) {}
+ PanControllable (std::string name, StreamPanner& p) : Controllable (name), panner (p) {}
StreamPanner& panner;
and a type name. See EqualPowerStereoPanner as an example.
*/
- void distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, jack_nframes_t nframes);
+ void distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes);
int load (istream&, string path, uint32_t&);
int save (ostream&) const;
- void snapshot (jack_nframes_t now);
- void transport_stopped (jack_nframes_t frame);
+ void snapshot (nframes_t now);
+ void transport_stopped (nframes_t frame);
void set_automation_state (AutoState);
void set_automation_style (AutoStyle);
~EqualPowerStereoPanner ();
void distribute_automated (AudioBuffer& src, BufferSet& obufs,
- jack_nframes_t start, jack_nframes_t end, jack_nframes_t nframes, pan_t** buffers);
+ nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers);
void get_current_coefficients (pan_t*) const;
void get_desired_coefficients (pan_t*) const;
Multi2dPanner (Panner& parent);
~Multi2dPanner ();
- void snapshot (jack_nframes_t now);
- void transport_stopped (jack_nframes_t frame);
+ void snapshot (nframes_t now);
+ void transport_stopped (nframes_t frame);
void set_automation_state (AutoState);
void set_automation_style (AutoStyle);
Curve& automation() { return _automation; }
- void distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, jack_nframes_t nframes);
+ void distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes);
void distribute_automated (AudioBuffer& src, BufferSet& obufs,
- jack_nframes_t start, jack_nframes_t end, jack_nframes_t nframes, pan_t** buffers);
+ nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers);
int load (istream&, string path, uint32_t&);
int save (ostream&) const;
virtual ~Panner ();
/// The fundamental Panner function
- void distribute(BufferSet& src, BufferSet& dest, jack_nframes_t start_frame, jack_nframes_t end_frames, jack_nframes_t nframes, jack_nframes_t offset);
+ void distribute(BufferSet& src, BufferSet& dest, nframes_t start_frame, nframes_t end_frames, nframes_t nframes, nframes_t offset);
void set_name (string);
void clear ();
void reset (uint32_t noutputs, uint32_t npans);
- void snapshot (jack_nframes_t now);
- void transport_stopped (jack_nframes_t frame);
+ void snapshot (nframes_t now);
+ void transport_stopped (nframes_t frame);
void clear_automation ();
void set_position (float x, float y, float z, StreamPanner& orig);
private:
- void distribute_no_automation(BufferSet& src, BufferSet& dest, jack_nframes_t nframes, jack_nframes_t offset, gain_t gain_coeff);
+ void distribute_no_automation(BufferSet& src, BufferSet& dest, nframes_t nframes, nframes_t offset, gain_t gain_coeff);
string automation_path;
#include <ardour/utils.h>
static inline float
-compute_peak (ARDOUR::Sample *buf, jack_nframes_t nsamples, float current)
+compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current)
{
- for (jack_nframes_t i = 0; i < nsamples; ++i) {
+ for (nframes_t i = 0; i < nsamples; ++i) {
current = f_max (current, fabsf (buf[i]));
}
return current;
Playlist (Session&, const XMLNode&, DataType type, bool hidden = false);
Playlist (Session&, string name, DataType type, bool hidden = false);
Playlist (const Playlist&, string name, bool hidden = false);
- Playlist (const Playlist&, jack_nframes_t start, jack_nframes_t cnt, string name, bool hidden = false);
+ Playlist (const Playlist&, nframes_t start, nframes_t cnt, string name, bool hidden = false);
virtual void clear (bool with_save = true);
virtual void dump () const;
bool hidden() const { return _hidden; }
bool empty() const;
- jack_nframes_t get_maximum_extent () const;
+ nframes_t get_maximum_extent () const;
layer_t top_layer() const;
EditMode get_edit_mode() const { return _edit_mode; }
/* Editing operations */
- void add_region (boost::shared_ptr<Region>, jack_nframes_t position, float times = 1, bool with_save = true);
+ void add_region (boost::shared_ptr<Region>, nframes_t position, float times = 1, bool with_save = true);
void remove_region (boost::shared_ptr<Region>);
void get_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
void get_region_list_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
- void replace_region (boost::shared_ptr<Region> old, boost::shared_ptr<Region> newr, jack_nframes_t pos);
- void split_region (boost::shared_ptr<Region>, jack_nframes_t position);
- void partition (jack_nframes_t start, jack_nframes_t end, bool just_top_level);
- void duplicate (boost::shared_ptr<Region>, jack_nframes_t position, float times);
- void nudge_after (jack_nframes_t start, jack_nframes_t distance, bool forwards);
+ void replace_region (boost::shared_ptr<Region> old, boost::shared_ptr<Region> newr, nframes_t pos);
+ void split_region (boost::shared_ptr<Region>, nframes_t position);
+ void partition (nframes_t start, nframes_t end, bool just_top_level);
+ void duplicate (boost::shared_ptr<Region>, nframes_t position, float times);
+ void nudge_after (nframes_t start, nframes_t distance, bool forwards);
boost::shared_ptr<Region> find_region (const PBD::ID&) const;
Playlist* cut (list<AudioRange>&, bool result_is_hidden = true);
Playlist* copy (list<AudioRange>&, bool result_is_hidden = true);
- int paste (Playlist&, jack_nframes_t position, float times);
+ int paste (Playlist&, nframes_t position, float times);
uint32_t read_data_count() { return _read_data_count; }
- RegionList* regions_at (jack_nframes_t frame);
- RegionList* regions_touched (jack_nframes_t start, jack_nframes_t end);
- boost::shared_ptr<Region> top_region_at (jack_nframes_t frame);
+ RegionList* regions_at (nframes_t frame);
+ RegionList* regions_touched (nframes_t start, nframes_t end);
+ boost::shared_ptr<Region> top_region_at (nframes_t frame);
- boost::shared_ptr<Region> find_next_region (jack_nframes_t frame, RegionPoint point, int dir);
+ boost::shared_ptr<Region> find_next_region (nframes_t frame, RegionPoint point, int dir);
template<class T> void foreach_region (T *t, void (T::*func)(boost::shared_ptr<Region>, void *), void *arg);
template<class T> void foreach_region (T *t, void (T::*func)(boost::shared_ptr<Region>));
friend class RegionLock;
- RegionList regions;
+ RegionList regions; /* the current list of regions in the playlist */
string _name;
Session& _session;
DataType _type;
uint32_t _read_data_count;
PBD::ID _orig_diskstream_id;
uint64_t layer_op_counter;
- jack_nframes_t freeze_length;
+ nframes_t freeze_length;
void init (bool hide);
void mark_session_dirty();
- void region_changed_proxy (Change, boost::shared_ptr<Region>);
+ void region_changed_proxy (Change, boost::weak_ptr<Region>);
virtual bool region_changed (Change, boost::shared_ptr<Region>);
void region_bounds_changed (Change, boost::shared_ptr<Region>);
void save_state (std::string why);
void maybe_save_state (std::string why);
- void add_region_internal (boost::shared_ptr<Region>, jack_nframes_t position, bool delay_sort = false);
+ void add_region_internal (boost::shared_ptr<Region>, nframes_t position, bool delay_sort = false);
int remove_region_internal (boost::shared_ptr<Region>, bool delay_sort = false);
- RegionList *find_regions_at (jack_nframes_t frame);
+ RegionList *find_regions_at (nframes_t frame);
void copy_regions (RegionList&) const;
- void partition_internal (jack_nframes_t start, jack_nframes_t end, bool cutting, RegionList& thawlist);
+ void partition_internal (nframes_t start, nframes_t end, bool cutting, RegionList& thawlist);
- jack_nframes_t _get_maximum_extent() const;
+ nframes_t _get_maximum_extent() const;
- Playlist* cut_copy (Playlist* (Playlist::*pmf)(jack_nframes_t, jack_nframes_t, bool),
+ Playlist* cut_copy (Playlist* (Playlist::*pmf)(nframes_t, nframes_t, bool),
list<AudioRange>& ranges, bool result_is_hidden);
- Playlist *cut (jack_nframes_t start, jack_nframes_t cnt, bool result_is_hidden);
- Playlist *copy (jack_nframes_t start, jack_nframes_t cnt, bool result_is_hidden);
+ Playlist *cut (nframes_t start, nframes_t cnt, bool result_is_hidden);
+ Playlist *copy (nframes_t start, nframes_t cnt, bool result_is_hidden);
int move_region_to_layer (layer_t, boost::shared_ptr<Region> r, int dir);
void relayer ();
- static Playlist* copyPlaylist (const Playlist&, jack_nframes_t start, jack_nframes_t length,
+ static Playlist* copyPlaylist (const Playlist&, nframes_t start, nframes_t length,
string name, bool result_is_hidden);
void unset_freeze_parent (Playlist*);
typedef boost::shared_ptr<PluginInfo> PluginInfoPtr;
typedef std::list<PluginInfoPtr> PluginInfoList;
-class Plugin : public PBD::StatefulDestructible, public sigc::trackable
+class Plugin : public PBD::StatefulDestructible
{
public:
Plugin (ARDOUR::AudioEngine&, ARDOUR::Session&);
float step;
float smallstep;
float largestep;
-
- bool min_unbound;
- bool max_unbound;
+ bool min_unbound;
+ bool max_unbound;
};
virtual uint32_t unique_id() const = 0;
virtual const char * maker() const = 0;
virtual uint32_t parameter_count () const = 0;
virtual float default_value (uint32_t port) = 0;
- virtual jack_nframes_t latency() const = 0;
+ virtual nframes_t latency() const = 0;
virtual void set_parameter (uint32_t which, float val) = 0;
virtual float get_parameter(uint32_t which) const = 0;
virtual uint32_t nth_parameter (uint32_t which, bool& ok) const = 0;
virtual void activate () = 0;
virtual void deactivate () = 0;
- virtual void set_block_size (jack_nframes_t nframes) = 0;
+ virtual void set_block_size (nframes_t nframes) = 0;
- virtual int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, jack_nframes_t nframes, jack_nframes_t offset) = 0;
+ virtual int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset) = 0;
+
virtual std::set<uint32_t> automatable() const = 0;
virtual void store_state (ARDOUR::PluginState&) = 0;
virtual void restore_state (ARDOUR::PluginState&) = 0;
void setup_controls ();
struct PortControllable : public PBD::Controllable {
- PortControllable (Plugin&, uint32_t abs_port_id,
+ PortControllable (std::string name, Plugin&, uint32_t abs_port_id,
float lower, float upper, bool toggled, bool logarithmic);
void set_value (float);
jack_port_request_monitor (_port, yn);
}
- jack_nframes_t latency () const {
+ nframes_t latency () const {
return jack_port_get_latency (_port);
}
- void set_latency (jack_nframes_t nframes) {
+ void set_latency (nframes_t nframes) {
jack_port_set_latency (_port, nframes);
}
Placement placement() const { return _placement; }
void set_placement (Placement, void *src);
- virtual void run (BufferSet& bufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset) = 0;
+ virtual void run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) = 0;
virtual void activate () = 0;
virtual void deactivate () = 0;
- virtual jack_nframes_t latency() { return 0; }
+ virtual nframes_t latency() { return 0; }
- virtual void set_block_size (jack_nframes_t nframes) {}
+ virtual void set_block_size (nframes_t nframes) {}
sigc::signal<void,Redirect*,void*> active_changed;
sigc::signal<void,Redirect*,void*> placement_changed;
void mark_automation_visible (uint32_t, bool);
AutomationList& automation_list (uint32_t);
- bool find_next_event (jack_nframes_t, jack_nframes_t, ControlEvent&) const;
+ bool find_next_event (nframes_t, nframes_t, ControlEvent&) const;
- virtual void transport_stopped (jack_nframes_t frame) {};
+ virtual void transport_stopped (nframes_t frame) {};
protected:
void set_placement (const string&, void *src);
{
RegionState (std::string why) : StateManager::State (why) {}
- jack_nframes_t _start;
- jack_nframes_t _length;
- jack_nframes_t _position;
+ nframes_t _start;
+ nframes_t _length;
+ nframes_t _position;
uint32_t _flags;
- jack_nframes_t _sync_position;
+ nframes_t _sync_position;
layer_t _layer;
string _name;
mutable RegionEditState _first_edit;
const DataType& data_type() const { return _type; }
- jack_nframes_t position () const { return _position; }
- jack_nframes_t start () const { return _start; }
- jack_nframes_t length() const { return _length; }
- layer_t layer () const { return _layer; }
+ nframes_t position () const { return _position; }
+ nframes_t start () const { return _start; }
+ nframes_t length() const { return _length; }
+ layer_t layer () const { return _layer; }
- jack_nframes_t sync_offset(int& dir) const;
- jack_nframes_t sync_position() const;
+ nframes_t sync_offset(int& dir) const;
+ nframes_t sync_position() const;
- jack_nframes_t adjust_to_sync (jack_nframes_t);
+ nframes_t adjust_to_sync (nframes_t);
/* first_frame() is an alias; last_frame() just hides some math */
- jack_nframes_t first_frame() const { return _position; }
- jack_nframes_t last_frame() const { return _position + _length - 1; }
+ nframes_t first_frame() const { return _position; }
+ nframes_t last_frame() const { return _position + _length - 1; }
Flag flags() const { return _flags; }
bool hidden() const { return _flags & Hidden; }
void freeze ();
void thaw (const string& why);
- bool covers (jack_nframes_t frame) const {
- return _position <= frame && frame < _position + _length;
+ bool covers (nframes_t frame) const {
+ return first_frame() <= frame && frame < last_frame();
}
- OverlapType coverage (jack_nframes_t start, jack_nframes_t end) const {
- return ARDOUR::coverage (_position, _position + _length - 1, start, end);
+ OverlapType coverage (nframes_t start, nframes_t end) const {
+ return ARDOUR::coverage (first_frame(), last_frame(), start, end);
}
bool equivalent (boost::shared_ptr<const Region>) const;
/* EDITING OPERATIONS */
- void set_length (jack_nframes_t, void *src);
- void set_start (jack_nframes_t, void *src);
- void set_position (jack_nframes_t, void *src);
- void set_position_on_top (jack_nframes_t, void *src);
- void special_set_position (jack_nframes_t);
+ void set_length (nframes_t, void *src);
+ void set_start (nframes_t, void *src);
+ void set_position (nframes_t, void *src);
+ void set_position_on_top (nframes_t, void *src);
+ void special_set_position (nframes_t);
void nudge_position (long, void *src);
void move_to_natural_position (void *src);
- void trim_start (jack_nframes_t new_position, void *src);
- void trim_front (jack_nframes_t new_position, void *src);
- void trim_end (jack_nframes_t new_position, void *src);
- void trim_to (jack_nframes_t position, jack_nframes_t length, void *src);
+ void trim_start (nframes_t new_position, void *src);
+ void trim_front (nframes_t new_position, void *src);
+ void trim_end (nframes_t new_position, void *src);
+ void trim_to (nframes_t position, nframes_t length, void *src);
void set_layer (layer_t l); /* ONLY Playlist can call this */
void raise ();
void raise_to_top ();
void lower_to_bottom ();
- void set_sync_position (jack_nframes_t n);
+ void set_sync_position (nframes_t n);
void clear_sync_position ();
void set_hidden (bool yn);
void set_muted (bool yn);
protected:
friend class RegionFactory;
- Region (boost::shared_ptr<Source> src, jack_nframes_t start, jack_nframes_t length,
+ Region (boost::shared_ptr<Source> src, nframes_t start, nframes_t length,
const string& name, DataType type, layer_t = 0, Flag flags = DefaultFlags);
- Region (SourceList& srcs, jack_nframes_t start, jack_nframes_t length,
+ Region (SourceList& srcs, nframes_t start, nframes_t length,
const string& name, DataType type, layer_t = 0, Flag flags = DefaultFlags);
- Region (boost::shared_ptr<const Region>, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t = 0, Flag flags = DefaultFlags);
+
+ Region (boost::shared_ptr<const Region>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Flag flags = DefaultFlags);
Region (boost::shared_ptr<const Region>);
Region (boost::shared_ptr<Source> src, const XMLNode&);
Region (SourceList& srcs, const XMLNode&);
void store_state (RegionState&) const;
Change restore_and_return_flags (RegionState&);
- void trim_to_internal (jack_nframes_t position, jack_nframes_t length, void *src);
+ void trim_to_internal (nframes_t position, nframes_t length, void *src);
bool copied() const { return _flags & Copied; }
void maybe_uncopy ();
string _name;
DataType _type;
Flag _flags;
- jack_nframes_t _start;
- jack_nframes_t _length;
- jack_nframes_t _position;
- jack_nframes_t _sync_position;
+ nframes_t _start;
+ nframes_t _length;
+ nframes_t _position;
+ nframes_t _sync_position;
layer_t _layer;
mutable RegionEditState _first_edit;
int _frozen;
*/
static sigc::signal<void,boost::shared_ptr<Region> > CheckNewRegion;
- static boost::shared_ptr<Region> create (boost::shared_ptr<Region>, jack_nframes_t start,
- jack_nframes_t length, std::string name,
+ static boost::shared_ptr<Region> create (boost::shared_ptr<Region>, nframes_t start,
+ nframes_t length, std::string name,
layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
- static boost::shared_ptr<Region> create (boost::shared_ptr<AudioRegion>, jack_nframes_t start,
- jack_nframes_t length, std::string name,
+ static boost::shared_ptr<Region> create (boost::shared_ptr<AudioRegion>, nframes_t start,
+ nframes_t length, std::string name,
layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
- static boost::shared_ptr<Region> create (boost::shared_ptr<Source>, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
- static boost::shared_ptr<Region> create (SourceList &, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
+ static boost::shared_ptr<Region> create (boost::shared_ptr<Source>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
+ static boost::shared_ptr<Region> create (SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
static boost::shared_ptr<Region> create (boost::shared_ptr<Region>);
static boost::shared_ptr<Region> create (Session&, XMLNode&, bool);
static boost::shared_ptr<Region> create (SourceList &, const XMLNode&);
/* these are the core of the API of a Route. see the protected sections as well */
- virtual int roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t offset, int declick, bool can_record, bool rec_monitors_input);
+ virtual int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
+ nframes_t offset, int declick, bool can_record, bool rec_monitors_input);
- virtual int no_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input);
+ virtual int no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
+ nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input);
- virtual int silent_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t offset, bool can_record, bool rec_monitors_input);
+ virtual int silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
+ nframes_t offset, bool can_record, bool rec_monitors_input);
virtual void toggle_monitor_input ();
virtual bool can_record() { return false; }
virtual void set_record_enable (bool yn, void *src) {}
void all_redirects_flip();
void all_redirects_active (bool state);
- virtual jack_nframes_t update_total_latency();
- jack_nframes_t signal_latency() const { return _own_latency; }
- virtual void set_latency_delay (jack_nframes_t);
+ virtual nframes_t update_total_latency();
+ nframes_t signal_latency() const { return _own_latency; }
+ virtual void set_latency_delay (nframes_t);
sigc::signal<void,void*> solo_changed;
sigc::signal<void,void*> solo_safe_changed;
SoloControl
};
- ToggleControllable (Route&, ToggleType);
+ ToggleControllable (std::string name, Route&, ToggleType);
void set_value (float);
float get_value (void) const;
return _mute_control;
}
- void automation_snapshot (jack_nframes_t now);
-
void protect_automation ();
void set_remote_control_id (uint32_t id);
friend class Session;
void set_solo_mute (bool yn);
- void set_block_size (jack_nframes_t nframes);
+ void set_block_size (nframes_t nframes);
bool has_external_redirects() const;
void curve_reallocate ();
gain_t desired_solo_gain;
gain_t desired_mute_gain;
- jack_nframes_t check_initial_delay (jack_nframes_t, jack_nframes_t&, jack_nframes_t&);
+ nframes_t check_initial_delay (nframes_t, nframes_t&, nframes_t&);
- jack_nframes_t _initial_delay;
- jack_nframes_t _roll_delay;
- jack_nframes_t _own_latency;
+ nframes_t _initial_delay;
+ nframes_t _roll_delay;
+ nframes_t _own_latency;
RedirectList _redirects;
Glib::RWLock redirect_lock;
IO *_control_outs;
ToggleControllable _solo_control;
ToggleControllable _mute_control;
- void passthru (jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t nframes, jack_nframes_t offset, int declick, bool meter_inputs);
+ void passthru (nframes_t start_frame, nframes_t end_frame,
+ nframes_t nframes, nframes_t offset, int declick, bool meter_inputs);
virtual void process_output_buffers (BufferSet& bufs,
- jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t nframes, jack_nframes_t offset, bool with_redirects, int declick,
+ nframes_t start_frame, nframes_t end_frame,
+ nframes_t nframes, nframes_t offset, bool with_redirects, int declick,
bool meter);
protected:
virtual XMLNode& state(bool);
- void passthru_silence (jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t nframes, jack_nframes_t offset, int declick,
+ void passthru_silence (nframes_t start_frame, nframes_t end_frame,
+ nframes_t nframes, nframes_t offset, int declick,
bool meter);
- void silence (jack_nframes_t nframes, jack_nframes_t offset);
+ void silence (nframes_t nframes, nframes_t offset);
+
sigc::connection input_signal_connection;
state_id_t _current_state_id;
Send (const Send&);
~Send ();
- void run (BufferSet& bufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset);
+ void run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset);
+
void activate() {}
void deactivate () {}
class Region;
class Playlist;
class VSTPlugin;
-class ControlProtocolManager;
+class ControlProtocolInfo;
-//class MidiDiskstream;
-class MidiSource;
class MidiTrack;
class MidiRegion;
class SMFSource;
using std::map;
using std::set;
-class Session : public sigc::trackable, public PBD::StatefulDestructible
+class Session : public PBD::StatefulDestructible
{
private:
typedef std::pair<boost::shared_ptr<Route>,bool> RouteBooleanState;
Recording = 2
};
- enum SlaveSource {
- None = 0,
- MTC,
- JACK
- };
-
- enum AutoConnectOption {
- AutoConnectPhysical = 0x1,
- AutoConnectMaster = 0x2
- };
-
struct Event {
enum Type {
SetTransportSpeed,
Type type;
Action action;
- jack_nframes_t action_frame;
- jack_nframes_t target_frame;
+ nframes_t action_frame;
+ nframes_t target_frame;
float speed;
union {
void* ptr;
bool yes_or_no;
- Session::SlaveSource slave;
+ SlaveSource slave;
Route* route;
};
list<AudioRange> audio_range;
list<MusicRange> music_range;
- Event(Type t, Action a, jack_nframes_t when, jack_nframes_t where, float spd, bool yn = false)
+ Event(Type t, Action a, nframes_t when, nframes_t where, float spd, bool yn = false)
: type (t),
action (a),
action_frame (when),
pool.release (ptr);
}
- static const jack_nframes_t Immediate = 0;
+ static const nframes_t Immediate = 0;
private:
static MultiAllocSingleReleasePool pool;
uint32_t master_out_channels,
uint32_t n_physical_in,
uint32_t n_physical_out,
- jack_nframes_t initial_length);
+ nframes_t initial_length);
virtual ~Session ();
string path() const { return _path; }
string name() const { return _name; }
string snap_name() const { return _current_snapshot_name; }
+ string raid_path () const;
void set_snap_name ();
void set_dirty ();
void set_clean ();
bool dirty() const { return _state_of_the_state & Dirty; }
+ bool deletion_in_progress() const { return _state_of_the_state & Deletion; }
sigc::signal<void> DirtyChanged;
std::string sound_dir (bool with_path = true) const;
string audio_path_from_name (string, uint32_t nchans, uint32_t chan, bool destructive);
string midi_path_from_name (string);
- void process (jack_nframes_t nframes);
+ void process (nframes_t nframes);
BufferSet& get_silent_buffers (ChanCount count = ChanCount::ZERO);
BufferSet& get_scratch_buffers (ChanCount count = ChanCount::ZERO);
/* Transport mechanism signals */
sigc::signal<void> TransportStateChange; /* generic */
- sigc::signal<void,jack_nframes_t> PositionChanged; /* sent after any non-sequential motion */
+ sigc::signal<void,nframes_t> PositionChanged; /* sent after any non-sequential motion */
sigc::signal<void> DurationChanged;
sigc::signal<void> HaltOnXrun;
sigc::signal<void,RouteList&> RouteAdded;
void request_roll ();
- void request_bounded_roll (jack_nframes_t start, jack_nframes_t end);
+ void request_bounded_roll (nframes_t start, nframes_t end);
void request_stop (bool abort = false);
- void request_locate (jack_nframes_t frame, bool with_roll = false);
- void request_auto_loop (bool yn);
- jack_nframes_t last_transport_start() const { return _last_roll_location; }
+ void request_locate (nframes_t frame, bool with_roll = false);
+ void request_play_loop (bool yn);
+ nframes_t last_transport_start() const { return _last_roll_location; }
void goto_end () { request_locate (end_location->start(), false);}
void goto_start () { request_locate (start_location->start(), false); }
- void set_session_start (jack_nframes_t start) { start_location->set_start(start); }
- void set_session_end (jack_nframes_t end) { end_location->set_start(end); _end_location_is_free = false; }
+ void set_session_start (nframes_t start) { start_location->set_start(start); }
+ void set_session_end (nframes_t end) { end_location->set_start(end); _end_location_is_free = false; }
void use_rf_shuttle_speed ();
void request_transport_speed (float speed);
void request_overwrite_buffer (Diskstream*);
int remove_region_from_region_list (boost::shared_ptr<Region>);
- jack_nframes_t get_maximum_extent () const;
- jack_nframes_t current_end_frame() const { return end_location->start(); }
- jack_nframes_t current_start_frame() const { return start_location->start(); }
- jack_nframes_t frame_rate() const { return _current_frame_rate; }
- jack_nframes_t frames_per_hour() const { return _frames_per_hour; }
+ nframes_t get_maximum_extent () const;
+ nframes_t current_end_frame() const { return end_location->start(); }
+ nframes_t current_start_frame() const { return start_location->start(); }
+ nframes_t frame_rate() const { return _current_frame_rate; }
+ nframes_t frames_per_hour() const { return _frames_per_hour; }
double frames_per_smpte_frame() const { return _frames_per_smpte_frame; }
- jack_nframes_t smpte_frames_per_hour() const { return _smpte_frames_per_hour; }
+ nframes_t smpte_frames_per_hour() const { return _smpte_frames_per_hour; }
/* Locations */
void set_auto_punch_location (Location *);
void set_auto_loop_location (Location *);
-
- enum ControlType {
- AutoPlay,
- AutoLoop,
- AutoReturn,
- AutoInput,
- PunchIn,
- PunchOut,
- SendMTC,
- MMCControl,
- SoloLatch,
- SoloingModel,
- RecordingPlugins,
- CrossFadesActive,
- SendMMC,
- SlaveType,
- Clicking,
- EditingMode,
- PlayRange,
- LayeringModel,
- CrossfadingModel,
- SeamlessLoop,
- MidiFeedback,
- MidiControl,
- TranzportControl,
- Feedback,
- SmpteMode,
- };
-
- sigc::signal<void,ControlType> ControlChanged;
-
- void set_auto_play (bool yn);
- void set_auto_return (bool yn);
- void set_auto_input (bool yn);
void reset_input_monitor_state ();
- void set_input_auto_connect (bool yn);
- void set_output_auto_connect (AutoConnectOption);
- void set_punch_in (bool yn);
- void set_punch_out (bool yn);
- void set_send_mtc (bool yn);
- void set_send_mmc (bool yn);
- void set_mmc_control (bool yn);
- void set_midi_feedback (bool yn);
- void set_midi_control (bool yn);
- void set_do_not_record_plugins (bool yn);
- void set_crossfades_active (bool yn);
- void set_seamless_loop (bool yn);
-
- bool get_auto_play () const { return auto_play; }
- bool get_auto_input () const { return auto_input; }
- bool get_auto_loop () const { return auto_loop; }
- bool get_seamless_loop () const { return seamless_loop; }
- bool get_punch_in () const { return punch_in; }
- bool get_punch_out () const { return punch_out; }
- bool get_all_safe () const { return all_safe; }
- bool get_auto_return () const { return auto_return; }
- bool get_send_mtc () const;
- bool get_send_mmc () const;
- bool get_mmc_control () const;
- bool get_midi_feedback () const;
- bool get_midi_control () const;
- bool get_do_not_record_plugins () const { return do_not_record_plugins; }
- bool get_crossfades_active () const { return crossfades_active; }
-
- bool get_input_auto_connect () const;
- AutoConnectOption get_output_auto_connect () const { return output_auto_connect; }
-
- enum LayerModel {
- LaterHigher,
- MoveAddHigher,
- AddHigher
- };
-
- void set_layer_model (LayerModel);
- LayerModel get_layer_model () const { return layer_model; }
-
- void set_xfade_model (CrossfadeModel);
- CrossfadeModel get_xfade_model () const { return xfade_model; }
- void add_event (jack_nframes_t action_frame, Event::Type type, jack_nframes_t target_frame = 0);
- void remove_event (jack_nframes_t frame, Event::Type type);
+ void add_event (nframes_t action_frame, Event::Type type, nframes_t target_frame = 0);
+ void remove_event (nframes_t frame, Event::Type type);
void clear_events (Event::Type type);
- jack_nframes_t get_block_size() const { return current_block_size; }
- jack_nframes_t worst_output_latency () const { return _worst_output_latency; }
- jack_nframes_t worst_input_latency () const { return _worst_input_latency; }
- jack_nframes_t worst_track_latency () const { return _worst_track_latency; }
+ nframes_t get_block_size() const { return current_block_size; }
+ nframes_t worst_output_latency () const { return _worst_output_latency; }
+ nframes_t worst_input_latency () const { return _worst_input_latency; }
+ nframes_t worst_track_latency () const { return _worst_track_latency; }
int save_state (string snapshot_name, bool pending = false);
int restore_state (string snapshot_name);
XMLNode& get_state();
int set_state(const XMLNode& node); // not idempotent
XMLNode& get_template();
-
+
void add_instant_xml (XMLNode&, const std::string& dir);
enum StateOfTheState {
AudioEngine &engine() { return _engine; };
- /* configuration. there should really be accessors/mutators
- for these
- */
-
- float meter_hold () { return _meter_hold; }
- void set_meter_hold (float);
- sigc::signal<void> MeterHoldChanged;
-
- float meter_falloff () { return _meter_falloff; }
- void set_meter_falloff (float);
- sigc::signal<void> MeterFalloffChanged;
-
int32_t max_level;
int32_t min_level;
- string click_emphasis_sound;
- string click_sound;
- bool click_requested;
- jack_nframes_t over_length_short;
- jack_nframes_t over_length_long;
- bool send_midi_timecode;
- bool send_midi_machine_control;
- float shuttle_speed_factor;
- float shuttle_speed_threshold;
- float rf_speed;
- float smpte_frames_per_second;
- float video_pullup;
- bool smpte_drop_frames;
- AnyTime preroll;
- AnyTime postroll;
-
+
/* Time */
- jack_nframes_t transport_frame () const {return _transport_frame; }
- jack_nframes_t audible_frame () const;
+ nframes_t transport_frame () const {return _transport_frame; }
+ nframes_t audible_frame () const;
enum SmpteFormat {
smpte_23976,
};
int set_smpte_type (float fps, bool drop_frames);
- int set_video_pullup (float pullup);
void sync_time_vars();
- void bbt_time (jack_nframes_t when, BBT_Time&);
- void smpte_to_sample( SMPTE::Time& smpte, jack_nframes_t& sample, bool use_offset, bool use_subframes ) const;
- void sample_to_smpte( jack_nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes ) const;
+ void bbt_time (nframes_t when, BBT_Time&);
+ void smpte_to_sample( SMPTE::Time& smpte, nframes_t& sample, bool use_offset, bool use_subframes ) const;
+ void sample_to_smpte( nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes ) const;
void smpte_time (SMPTE::Time &);
- void smpte_time (jack_nframes_t when, SMPTE::Time&);
- void smpte_time_subframes (jack_nframes_t when, SMPTE::Time&);
+ void smpte_time (nframes_t when, SMPTE::Time&);
+ void smpte_time_subframes (nframes_t when, SMPTE::Time&);
- void smpte_duration (jack_nframes_t, SMPTE::Time&) const;
- void smpte_duration_string (char *, jack_nframes_t) const;
+ void smpte_duration (nframes_t, SMPTE::Time&) const;
+ void smpte_duration_string (char *, nframes_t) const;
- void set_smpte_offset (jack_nframes_t);
- jack_nframes_t smpte_offset () const { return _smpte_offset; }
+ void set_smpte_offset (nframes_t);
+ nframes_t smpte_offset () const { return _smpte_offset; }
void set_smpte_offset_negative (bool);
bool smpte_offset_negative () const { return _smpte_offset_negative; }
- jack_nframes_t convert_to_frames_at (jack_nframes_t position, AnyTime&);
+ nframes_t convert_to_frames_at (nframes_t position, AnyTime&);
static sigc::signal<void> StartTimeChanged;
static sigc::signal<void> EndTimeChanged;
static sigc::signal<void> SMPTEOffsetChanged;
- static sigc::signal<void> SMPTETypeChanged;
- static sigc::signal<void> PullupChanged;
- void request_slave_source (SlaveSource, jack_nframes_t pos = 0);
- SlaveSource slave_source() const { return _slave_type; }
- bool synced_to_jack() const { return _slave_type == JACK; }
+ void request_slave_source (SlaveSource);
+ bool synced_to_jack() const { return Config->get_slave_source() == JACK; }
+
float transport_speed() const { return _transport_speed; }
bool transport_stopped() const { return _transport_speed == 0.0f; }
bool transport_rolling() const { return _transport_speed != 0.0f; }
- int jack_slave_sync (jack_nframes_t);
+ int jack_slave_sync (nframes_t);
TempoMap& tempo_map() { return *_tempo_map; }
bool sample_rate_convert (import_status&, string infile, string& outfile);
string build_tmp_convert_name (string file);
- Session::SlaveSource post_export_slave;
- jack_nframes_t post_export_position;
+ SlaveSource post_export_slave;
+ nframes_t post_export_position;
int start_audio_export (ARDOUR::AudioExportSpecification&);
int stop_audio_export (ARDOUR::AudioExportSpecification&);
/* flattening stuff */
- int write_one_audio_track (AudioTrack&, jack_nframes_t start, jack_nframes_t cnt, bool overwrite, vector<boost::shared_ptr<Source> >&,
+ int write_one_audio_track (AudioTrack&, nframes_t start, nframes_t cnt, bool overwrite, vector<boost::shared_ptr<Source> >&,
InterThreadInfo& wot);
int freeze (InterThreadInfo&);
/* session-wide solo/mute/rec-enable */
-
- enum SoloModel {
- InverseMute,
- SoloBus
- };
bool soloing() const { return currently_soloing; }
- SoloModel solo_model() const { return _solo_model; }
- void set_solo_model (SoloModel);
-
- bool solo_latched() const { return _solo_latched; }
- void set_solo_latched (bool yn);
-
void set_all_solo (bool);
void set_all_mute (bool);
/* s/w "RAID" management */
- jack_nframes_t available_capture_duration();
+ nframes_t available_capture_duration();
/* I/O Connections */
sigc::signal<void,Connection *> ConnectionRemoved;
/* MIDI */
-
+
int set_mtc_port (string port_tag);
int set_mmc_port (string port_tag);
int set_midi_port (string port_tag);
/* Scrubbing */
- void start_scrub (jack_nframes_t where);
+ void start_scrub (nframes_t where);
void stop_scrub ();
void set_scrub_speed (float);
- jack_nframes_t scrub_buffer_size() const;
+ nframes_t scrub_buffer_size() const;
sigc::signal<void> ScrubReady;
/* History (for editors, mixers, UIs etc.) */
void mark();
};
- /* edit mode */
-
- void set_edit_mode (EditMode);
- EditMode get_edit_mode () const { return _edit_mode; }
-
/* clicking */
boost::shared_ptr<IO> click_io() { return _click_io; }
- void set_clicking (bool yn);
- bool get_clicking() const;
-
- void set_click_sound (string path);
- void set_click_emphasis_sound (string path);
/* tempo FX */
boost::shared_ptr<AudioRegion> tempoize_region (TimeStretchRequest&);
- string raid_path() const;
- void set_raid_path(string);
-
- /* need to call this whenever we change native file formats */
-
- void reset_native_file_format();
-
/* disk, buffer loads */
uint32_t playback_load ();
void* ptr,
float opt);
- typedef float (*compute_peak_t) (Sample *, jack_nframes_t, float);
- typedef void (*apply_gain_to_buffer_t) (Sample *, jack_nframes_t, float);
- typedef void (*mix_buffers_with_gain_t) (Sample *, Sample *, jack_nframes_t, float);
- typedef void (*mix_buffers_no_gain_t) (Sample *, Sample *, jack_nframes_t);
+ typedef float (*compute_peak_t) (Sample *, nframes_t, float);
+ typedef void (*apply_gain_to_buffer_t) (Sample *, nframes_t, float);
+ typedef void (*mix_buffers_with_gain_t) (Sample *, Sample *, nframes_t, float);
+ typedef void (*mix_buffers_no_gain_t) (Sample *, Sample *, nframes_t);
static compute_peak_t compute_peak;
static apply_gain_to_buffer_t apply_gain_to_buffer;
PBD::Controllable* controllable_by_id (const PBD::ID&);
+ void add_controllable (PBD::Controllable*);
+ void remove_controllable (PBD::Controllable*);
+
protected:
friend class AudioEngine;
- void set_block_size (jack_nframes_t nframes);
- void set_frame_rate (jack_nframes_t nframes);
+ void set_block_size (nframes_t nframes);
+ void set_frame_rate (nframes_t nframes);
protected:
friend class Diskstream;
void update_latency_compensation (bool, bool);
private:
- int create (bool& new_session, string* mix_template, jack_nframes_t initial_length);
+ int create (bool& new_session, string* mix_template, nframes_t initial_length);
static const char* _template_suffix;
static const char* _statefile_suffix;
maximise cache hits
*/
- typedef void (Session::*process_function_type)(jack_nframes_t);
+ typedef void (Session::*process_function_type)(nframes_t);
AudioEngine &_engine;
mutable gint processing_prohibited;
process_function_type process_function;
process_function_type last_process_function;
bool waiting_for_sync_offset;
- jack_nframes_t _base_frame_rate;
- jack_nframes_t _current_frame_rate; //this includes video pullup offset
+ nframes_t _base_frame_rate;
+ nframes_t _current_frame_rate; //this includes video pullup offset
int transport_sub_state;
mutable gint _record_status;
- jack_nframes_t _transport_frame;
+ nframes_t _transport_frame;
Location* end_location;
Location* start_location;
Slave *_slave;
- SlaveSource _slave_type;
volatile float _transport_speed;
volatile float _desired_transport_speed;
float _last_transport_speed;
- jack_nframes_t _last_slave_transport_frame;
- jack_nframes_t maximum_output_latency;
- jack_nframes_t last_stop_frame;
+ nframes_t _last_slave_transport_frame;
+ nframes_t maximum_output_latency;
+ nframes_t last_stop_frame;
BufferSet* _scratch_buffers;
BufferSet* _silent_buffers;
BufferSet* _send_buffers;
- jack_nframes_t current_block_size;
- jack_nframes_t _worst_output_latency;
- jack_nframes_t _worst_input_latency;
- jack_nframes_t _worst_track_latency;
+ nframes_t current_block_size;
+ nframes_t _worst_output_latency;
+ nframes_t _worst_input_latency;
+ nframes_t _worst_track_latency;
bool _have_captured;
float _meter_hold;
float _meter_falloff;
void ensure_buffers (ChanCount howmany);
- void process_scrub (jack_nframes_t);
- void process_without_events (jack_nframes_t);
- void process_with_events (jack_nframes_t);
- void process_audition (jack_nframes_t);
- int process_export (jack_nframes_t, ARDOUR::AudioExportSpecification*);
+ void process_scrub (nframes_t);
+ void process_without_events (nframes_t);
+ void process_with_events (nframes_t);
+ void process_audition (nframes_t);
+ int process_export (nframes_t, ARDOUR::AudioExportSpecification*);
/* slave tracking */
};
SlaveState slave_state;
- jack_nframes_t slave_wait_end;
+ nframes_t slave_wait_end;
void reset_slave_state ();
- bool follow_slave (jack_nframes_t, jack_nframes_t);
+ bool follow_slave (nframes_t, nframes_t);
+ void set_slave_source (SlaveSource);
bool _exporting;
int prepare_to_export (ARDOUR::AudioExportSpecification&);
void prepare_diskstreams ();
- void commit_diskstreams (jack_nframes_t, bool& session_requires_butler);
- int process_routes (jack_nframes_t, jack_nframes_t);
- int silent_process_routes (jack_nframes_t, jack_nframes_t);
+ void commit_diskstreams (nframes_t, bool& session_requires_butler);
+ int process_routes (nframes_t, nframes_t);
+ int silent_process_routes (nframes_t, nframes_t);
bool get_rec_monitors_input () {
if (actively_recording()) {
return true;
} else {
- if (auto_input) {
+ if (Config->get_auto_input()) {
return false;
} else {
return true;
}
}
- bool maybe_stop (jack_nframes_t limit) {
+ bool maybe_stop (nframes_t limit) {
if ((_transport_speed > 0.0f && _transport_frame >= limit) || (_transport_speed < 0.0f && _transport_frame == 0)) {
stop_transport ();
return true;
return false;
}
- bool maybe_sync_start (jack_nframes_t&, jack_nframes_t&);
+ bool maybe_sync_start (nframes_t&, nframes_t&);
void check_declick_out ();
MIDI::Port* _midi_port;
string _path;
string _name;
- bool do_not_record_plugins;
-
- /* toggles */
-
- bool auto_play;
- bool punch_in;
- bool punch_out;
- bool auto_loop;
- bool seamless_loop;
- bool loop_changing;
- jack_nframes_t last_loopend;
- bool auto_input;
- bool crossfades_active;
- bool all_safe;
- bool auto_return;
- bool monitor_in;
- bool send_mtc;
- bool send_mmc;
- bool mmc_control;
- bool midi_control;
+ bool session_send_mmc;
+ bool session_send_mtc;
+ bool session_midi_feedback;
+ bool play_loop;
+ bool loop_changing;
+ nframes_t last_loopend;
RingBuffer<Event*> pending_events;
int load_options (const XMLNode&);
XMLNode& get_options () const;
int load_state (string snapshot_name);
+ bool save_config_options_predicate (ConfigVariableBase::Owner owner) const;
- jack_nframes_t _last_roll_location;
- jack_nframes_t _last_record_location;
+ nframes_t _last_roll_location;
+ nframes_t _last_record_location;
bool pending_locate_roll;
- jack_nframes_t pending_locate_frame;
+ nframes_t pending_locate_frame;
bool pending_locate_flush;
bool pending_abort;
uint32_t rf_scale;
void set_rf_speed (float speed);
- void reset_rf_scale (jack_nframes_t frames_moved);
+ void reset_rf_scale (nframes_t frames_moved);
Locations _locations;
void locations_changed ();
void dump_events () const;
void queue_event (Event *ev);
void merge_event (Event*);
- void replace_event (Event::Type, jack_nframes_t action_frame, jack_nframes_t target = 0);
+ void replace_event (Event::Type, nframes_t action_frame, nframes_t target = 0);
bool _replace_event (Event*);
bool _remove_event (Event *);
void _clear_event_type (Event::Type);
/* MIDI Machine Control */
- void deliver_mmc (MIDI::MachineControl::Command, jack_nframes_t);
+ void deliver_mmc (MIDI::MachineControl::Command, nframes_t);
//void deliver_midi_message (MIDI::Port * port, MIDI::eventType ev, MIDI::channel_t, MIDI::EventTwoBytes);
//void deliver_data (MIDI::Port* port, MIDI::byte*, int32_t size);
MIDI::byte mtc_msg[16];
MIDI::byte mtc_smpte_bits; /* encoding of SMTPE type for MTC */
MIDI::byte midi_msg[16];
- jack_nframes_t outbound_mtc_smpte_frame;
+ nframes_t outbound_mtc_smpte_frame;
SMPTE::Time transmitting_smpte_time;
int next_quarter_frame_to_send;
double _frames_per_smpte_frame; /* has to be floating point because of drop frame */
- jack_nframes_t _frames_per_hour;
- jack_nframes_t _smpte_frames_per_hour;
- jack_nframes_t _smpte_offset;
+ nframes_t _frames_per_hour;
+ nframes_t _smpte_frames_per_hour;
+ nframes_t _smpte_offset;
bool _smpte_offset_negative;
/* cache the most-recently requested time conversions. This helps when we
int send_full_time_code(jack_nframes_t nframes);
int send_midi_time_code_for_cycle(jack_nframes_t nframes);
- //void send_mmc_in_another_thread (MIDI::MachineControl::Command, jack_nframes_t frame = 0);
-
- jack_nframes_t adjust_apparent_position (jack_nframes_t frames);
+ nframes_t adjust_apparent_position (nframes_t frames);
void reset_record_status ();
- int no_roll (jack_nframes_t nframes, jack_nframes_t offset);
+ int no_roll (nframes_t nframes, nframes_t offset);
bool non_realtime_work_pending() const { return static_cast<bool>(post_transport_work); }
bool process_can_proceed() const { return !(post_transport_work & ProcessCannotProceedMask); }
Type type;
MIDI::MachineControl::Command mmc_cmd;
- jack_nframes_t locate_frame;
+ nframes_t locate_frame;
// for SendMessage type
mutable gint butler_active;
- //PBD::Lock midi_lock;
- //pthread_t midi_thread;
- //int midi_request_pipe[2];
-
- //RingBuffer<MIDIRequest*> midi_requests;
- /*int start_midi_thread ();
- void terminate_midi_thread ();
- void poke_midi_thread ();
- static void *_midi_thread_work (void *arg);
- void midi_thread_work ();*/
void change_midi_ports ();
int use_config_midi_ports ();
bool waiting_to_start;
- void set_auto_loop (bool yn);
+ void set_play_loop (bool yn);
void overwrite_some_buffers (Diskstream*);
void flush_all_redirects ();
- void locate (jack_nframes_t, bool with_roll, bool with_flush, bool with_loop=false);
- void start_locate (jack_nframes_t, bool with_roll, bool with_flush, bool with_loop=false);
- void force_locate (jack_nframes_t frame, bool with_roll = false);
+ void locate (nframes_t, bool with_roll, bool with_flush, bool with_loop=false);
+ void start_locate (nframes_t, bool with_roll, bool with_flush, bool with_loop=false);
+ void force_locate (nframes_t frame, bool with_roll = false);
void set_diskstream_speed (Diskstream*, float speed);
void set_transport_speed (float speed, bool abort = false);
void stop_transport (bool abort = false);
/* mixer stuff */
- bool _solo_latched;
- SoloModel _solo_model;
bool solo_update_disabled;
bool currently_soloing;
void route_mute_changed (void *src);
- void route_solo_changed (void *src, boost::shared_ptr<Route>);
+ void route_solo_changed (void *src, boost::weak_ptr<Route>);
void catch_up_on_solo ();
void update_route_solo_state ();
void modify_solo_mute (bool, bool);
typedef map<PBD::ID,boost::shared_ptr<Region> > RegionList;
RegionList regions;
- void region_renamed (boost::shared_ptr<Region>);
- void region_changed (Change, boost::shared_ptr<Region>);
void add_region (boost::shared_ptr<Region>);
- void remove_region (boost::shared_ptr<Region>);
+ void region_changed (Change, boost::weak_ptr<Region>);
+ void remove_region (boost::weak_ptr<Region>);
int load_regions (const XMLNode& node);
/* FLATTEN */
- int flatten_one_track (AudioTrack&, jack_nframes_t start, jack_nframes_t cnt);
+ int flatten_one_track (AudioTrack&, nframes_t start, nframes_t cnt);
/* INSERT AND SEND MANAGEMENT */
ConnectionList _connections;
int load_connections (const XMLNode&);
- int set_slave_source (SlaveSource, jack_nframes_t);
-
void reverse_diskstream_buffers ();
UndoHistory history;
void set_global_solo (GlobalRouteBooleanState s, void *src);
void set_global_record_enable (GlobalRouteBooleanState s, void *src);
- void jack_timebase_callback (jack_transport_state_t, jack_nframes_t, jack_position_t*, int);
+ void jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int);
int jack_sync_callback (jack_transport_state_t, jack_position_t*);
void record_enable_change_all (bool yn);
/* click track */
struct Click {
- jack_nframes_t start;
- jack_nframes_t duration;
- jack_nframes_t offset;
+ nframes_t start;
+ nframes_t duration;
+ nframes_t offset;
const Sample *data;
- Click (jack_nframes_t s, jack_nframes_t d, const Sample *b)
+ Click (nframes_t s, nframes_t d, const Sample *b)
: start (s), duration (d), data (b) { offset = 0; }
void *operator new(size_t ignored) {
boost::shared_ptr<IO> _click_io;
Sample* click_data;
Sample* click_emphasis_data;
- jack_nframes_t click_length;
- jack_nframes_t click_emphasis_length;
+ nframes_t click_length;
+ nframes_t click_emphasis_length;
mutable Glib::RWLock click_lock;
static const Sample default_click[];
- static const jack_nframes_t default_click_length;
+ static const nframes_t default_click_length;
static const Sample default_click_emphasis[];
- static const jack_nframes_t default_click_emphasis_length;
+ static const nframes_t default_click_emphasis_length;
Click *get_click();
void setup_click_sounds (int which);
void clear_clicks ();
- void click (jack_nframes_t start, jack_nframes_t nframes, jack_nframes_t offset);
+ void click (nframes_t start, nframes_t nframes, nframes_t offset);
vector<Route*> master_outs;
- EditMode _edit_mode;
- EditMode pending_edit_mode;
-
/* range playback */
list<AudioRange> current_audio_range;
boost::shared_ptr<IO> _master_out;
boost::shared_ptr<IO> _control_out;
- AutoConnectOption input_auto_connect;
- AutoConnectOption output_auto_connect;
-
gain_t* _gain_automation_buffer;
pan_t** _pan_automation_buffer;
- void allocate_pan_automation_buffers (jack_nframes_t nframes, uint32_t howmany, bool force);
+ void allocate_pan_automation_buffers (nframes_t nframes, uint32_t howmany, bool force);
uint32_t _npan_buffers;
/* VST support */
LayerModel layer_model;
CrossfadeModel xfade_model;
- typedef std::list<PBD::Controllable*> Controllables;
+ typedef std::set<PBD::Controllable*> Controllables;
Glib::Mutex controllables_lock;
Controllables controllables;
- void add_controllable (PBD::Controllable*);
- void remove_controllable (PBD::Controllable*);
+ void reset_native_file_format();
+ bool first_file_data_format_reset;
+ bool first_file_header_format_reset;
- void handle_configuration_change (const char*);
+ void config_changed (const char*);
+
+ void add_control_protocol (const ControlProtocolInfo* const, XMLNode*);
+ XMLNode& get_control_protocol_state ();
+
};
} // namespace ARDOUR
Slave() { }
virtual ~Slave() {}
- virtual bool speed_and_position (float&, jack_nframes_t&) = 0;
+ virtual bool speed_and_position (float&, nframes_t&) = 0;
virtual bool locked() const = 0;
virtual bool ok() const = 0;
virtual bool starting() const { return false; }
- virtual jack_nframes_t resolution() const = 0;
+ virtual nframes_t resolution() const = 0;
virtual bool requires_seekahead () const = 0;
};
~MTC_Slave ();
void rebind (MIDI::Port&);
- bool speed_and_position (float&, jack_nframes_t&);
+ bool speed_and_position (float&, nframes_t&);
bool locked() const;
bool ok() const;
void handle_locate (const MIDI::byte*);
- jack_nframes_t resolution() const;
+ nframes_t resolution() const;
bool requires_seekahead () const { return true; }
private:
int guard1;
//SMPTE_Time mtc;
- jack_nframes_t position;
- jack_nframes_t timestamp;
+ nframes_t position;
+ nframes_t timestamp;
int guard2;
SafeTime() {
};
SafeTime current;
- jack_nframes_t mtc_frame; /* current time */
- jack_nframes_t last_inbound_frame; /* when we got it; audio clocked */
+ nframes_t mtc_frame; /* current time */
+ nframes_t last_inbound_frame; /* when we got it; audio clocked */
float mtc_speed;
- jack_nframes_t first_mtc_frame;
- jack_nframes_t first_mtc_time;
+ nframes_t first_mtc_frame;
+ nframes_t first_mtc_time;
static const int32_t accumulator_size = 128;
float accumulator[accumulator_size];
ADAT_Slave () {}
~ADAT_Slave () {}
- bool speed_and_position (float& speed, jack_nframes_t& pos) {
+ bool speed_and_position (float& speed, nframes_t& pos) {
speed = 0;
pos = 0;
return false;
bool locked() const { return false; }
bool ok() const { return false; }
- jack_nframes_t resolution() const { return 1; }
+ nframes_t resolution() const { return 1; }
bool requires_seekahead () const { return true; }
};
JACK_Slave (jack_client_t*);
~JACK_Slave ();
- bool speed_and_position (float& speed, jack_nframes_t& pos);
+ bool speed_and_position (float& speed, nframes_t& pos);
bool starting() const { return _starting; }
bool locked() const;
bool ok() const;
- jack_nframes_t resolution() const { return 1; }
+ nframes_t resolution() const { return 1; }
bool requires_seekahead () const { return false; }
private:
/* constructor to be called for new in-session files */
- SndFileSource (Session&, std::string path, SampleFormat samp_format, HeaderFormat hdr_format, jack_nframes_t rate,
+ SndFileSource (Session&, std::string path, SampleFormat samp_format, HeaderFormat hdr_format, nframes_t rate,
Flag flags = AudioFileSource::Flag (AudioFileSource::Writable|
AudioFileSource::Removable|
AudioFileSource::RemovableIfEmpty|
~SndFileSource ();
float sample_rate () const;
- int update_header (jack_nframes_t when, struct tm&, time_t);
+ int update_header (nframes_t when, struct tm&, time_t);
int flush_header ();
- jack_nframes_t natural_position () const;
+ nframes_t natural_position () const;
protected:
void set_header_timeline_position ();
- jack_nframes_t read_unlocked (Sample *dst, jack_nframes_t start, jack_nframes_t cnt) const;
- jack_nframes_t write_unlocked (Sample *dst, jack_nframes_t cnt);
+ nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const;
+ nframes_t write_unlocked (Sample *dst, nframes_t cnt);
- jack_nframes_t write_float (Sample* data, jack_nframes_t pos, jack_nframes_t cnt);
+ nframes_t write_float (Sample* data, nframes_t pos, nframes_t cnt);
private:
SNDFILE *sf;
SF_BROADCAST_INFO *_broadcast_info;
mutable float *interleave_buf;
- mutable jack_nframes_t interleave_bufsize;
+ mutable nframes_t interleave_bufsize;
void init (const string &str);
int open();
void close();
- int setup_broadcast_info (jack_nframes_t when, struct tm&, time_t);
+ int setup_broadcast_info (nframes_t when, struct tm&, time_t);
};
} // namespace ARDOUR
class Session;
-class Source : public PBD::StatefulDestructible, public sigc::trackable
+class Source : public PBD::StatefulDestructible
{
public:
Source (Session&, std::string name, DataType type);
// MIDI sources will have to be hacked in here somehow
static boost::shared_ptr<Source> createReadable (DataType type, Session&, std::string idstr, AudioFileSource::Flag flags, bool announce = true);
- static boost::shared_ptr<Source> createWritable (DataType type, Session&, std::string name, bool destructive, jack_nframes_t rate, bool announce = true);
+ static boost::shared_ptr<Source> createWritable (DataType type, Session&, std::string name, bool destructive, nframes_t rate, bool announce = true);
+
+ private:
+ static int setup_peakfile (boost::shared_ptr<Source>);
};
}
typedef uint32_t state_id_t;
-class StateManager : public sigc::trackable
+class StateManager : public virtual sigc::trackable
{
public:
struct State {
}
double beats_per_minute () const { return _beats_per_minute; }
- double frames_per_beat (jack_nframes_t sr) const {
+ double frames_per_beat (nframes_t sr) const {
return ((60.0 * sr) / _beats_per_minute);
}
double beats_per_bar () const { return _beats_per_bar; }
double note_divisor() const { return _note_type; }
- double frames_per_bar (const Tempo&, jack_nframes_t sr) const;
+ double frames_per_bar (const Tempo&, nframes_t sr) const;
protected:
virtual ~MetricSection() {}
const BBT_Time& start() const { return _start; }
- const jack_nframes_t frame() const { return _frame; }
+ const nframes_t frame() const { return _frame; }
void set_movable (bool yn) { _movable = yn; }
bool movable() const { return _movable; }
- virtual void set_frame (jack_nframes_t f) {
+ virtual void set_frame (nframes_t f) {
_frame = f;
};
private:
BBT_Time _start;
- jack_nframes_t _frame;
+ nframes_t _frame;
bool _movable;
};
{
public:
- TempoMap (jack_nframes_t frame_rate);
+ TempoMap (nframes_t frame_rate);
~TempoMap();
/* measure-based stuff */
struct BBTPoint {
BBTPointType type;
- jack_nframes_t frame;
+ nframes_t frame;
const Meter* meter;
const Tempo* tempo;
uint32_t bar;
uint32_t beat;
- BBTPoint (const Meter& m, const Tempo& t, jack_nframes_t f, BBTPointType ty, uint32_t b, uint32_t e)
+ BBTPoint (const Meter& m, const Tempo& t, nframes_t f, BBTPointType ty, uint32_t b, uint32_t e)
: type (ty), frame (f), meter (&m), tempo (&t), bar (b), beat (e) {}
};
(obj.*method)(*metrics);
}
- BBTPointList *get_points (jack_nframes_t start, jack_nframes_t end) const;
+ BBTPointList *get_points (nframes_t start, nframes_t end) const;
- void bbt_time (jack_nframes_t when, BBT_Time&) const;
- jack_nframes_t frame_time (const BBT_Time&) const;
- jack_nframes_t bbt_duration_at (jack_nframes_t, const BBT_Time&, int dir) const;
+ void bbt_time (nframes_t when, BBT_Time&) const;
+ nframes_t frame_time (const BBT_Time&) const;
+ nframes_t bbt_duration_at (nframes_t, const BBT_Time&, int dir) const;
static const Tempo& default_tempo() { return _default_tempo; }
static const Meter& default_meter() { return _default_meter; }
- const Tempo& tempo_at (jack_nframes_t);
- const Meter& meter_at (jack_nframes_t);
+ const Tempo& tempo_at (nframes_t);
+ const Meter& meter_at (nframes_t);
void add_tempo(const Tempo&, BBT_Time where);
void add_meter(const Meter&, BBT_Time where);
void replace_meter (MeterSection& existing, const Meter& replacement);
- jack_nframes_t round_to_bar (jack_nframes_t frame, int dir);
+ nframes_t round_to_bar (nframes_t frame, int dir);
- jack_nframes_t round_to_beat (jack_nframes_t frame, int dir);
+ nframes_t round_to_beat (nframes_t frame, int dir);
- jack_nframes_t round_to_beat_subdivision (jack_nframes_t fr, int sub_num);
+ nframes_t round_to_beat_subdivision (nframes_t fr, int sub_num);
- jack_nframes_t round_to_tick (jack_nframes_t frame, int dir);
+ nframes_t round_to_tick (nframes_t frame, int dir);
- void set_length (jack_nframes_t frames);
+ void set_length (nframes_t frames);
XMLNode& get_state (void);
int set_state (const XMLNode&);
void set_tempo (const Tempo& t) { _tempo = &t; }
void set_meter (const Meter& m) { _meter = &m; }
- void set_frame (jack_nframes_t f) { _frame = f; }
+ void set_frame (nframes_t f) { _frame = f; }
void set_start (const BBT_Time& t) { _start = t; }
const Meter& meter() const { return *_meter; }
const Tempo& tempo() const { return *_tempo; }
- jack_nframes_t frame() const { return _frame; }
+ nframes_t frame() const { return _frame; }
const BBT_Time& start() const { return _start; }
private:
const Meter* _meter;
const Tempo* _tempo;
- jack_nframes_t _frame;
+ nframes_t _frame;
BBT_Time _start;
};
Metric metric_at (BBT_Time bbt) const;
- Metric metric_at (jack_nframes_t) const;
- void bbt_time_with_metric (jack_nframes_t, BBT_Time&, const Metric&) const;
+ Metric metric_at (nframes_t) const;
+ void bbt_time_with_metric (nframes_t, BBT_Time&, const Metric&) const;
private:
static Tempo _default_tempo;
static Meter _default_meter;
Metrics *metrics;
- jack_nframes_t _frame_rate;
- jack_nframes_t last_bbt_when;
+ nframes_t _frame_rate;
+ nframes_t last_bbt_when;
bool last_bbt_valid;
BBT_Time last_bbt;
mutable Glib::RWLock lock;
void timestamp_metrics ();
- jack_nframes_t round_to_type (jack_nframes_t fr, int dir, BBTPointType);
+ nframes_t round_to_type (nframes_t fr, int dir, BBTPointType);
- jack_nframes_t frame_time_unlocked (const BBT_Time&) const;
+ nframes_t frame_time_unlocked (const BBT_Time&) const;
- void bbt_time_unlocked (jack_nframes_t, BBT_Time&) const;
+ void bbt_time_unlocked (nframes_t, BBT_Time&) const;
- jack_nframes_t bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, int dir) const;
+ nframes_t bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, int dir) const;
const MeterSection& first_meter() const;
const TempoSection& first_tempo() const;
- jack_nframes_t count_frames_between (const BBT_Time&, const BBT_Time&) const;
- jack_nframes_t count_frames_between_metrics (const Meter&, const Tempo&, const BBT_Time&, const BBT_Time&) const;
+ nframes_t count_frames_between (const BBT_Time&, const BBT_Time&) const;
+ nframes_t count_frames_between_metrics (const Meter&, const Tempo&, const BBT_Time&, const BBT_Time&) const;
int move_metric_section (MetricSection&, const BBT_Time& to);
void do_insert (MetricSection* section);
int set_name (string str, void *src);
- virtual int roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t offset, int declick, bool can_record, bool rec_monitors_input) = 0;
+ virtual int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
+ nframes_t offset, int declick, bool can_record, bool rec_monitors_input) = 0;
- virtual int no_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input) = 0;
+ virtual int no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
+ nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input) = 0;
- virtual int silent_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t offset, bool can_record, bool rec_monitors_input) = 0;
+ virtual int silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
+ nframes_t offset, bool can_record, bool rec_monitors_input) = 0;
void toggle_monitor_input ();
TrackMode mode() const { return _mode; }
void set_mode (TrackMode m);
- jack_nframes_t update_total_latency();
- void set_latency_delay (jack_nframes_t);
+ nframes_t update_total_latency();
+ void set_latency_delay (nframes_t);
enum FreezeState {
NoFreeze,
virtual void unfreeze () = 0;
virtual void bounce (InterThreadInfo&) = 0;
- virtual void bounce_range (jack_nframes_t start, jack_nframes_t end, InterThreadInfo&) = 0;
+ virtual void bounce_range (nframes_t start, nframes_t end, InterThreadInfo&) = 0;
XMLNode& get_state();
XMLNode& get_template();
typedef float gain_t;
typedef uint32_t layer_t;
typedef uint64_t microseconds_t;
+ typedef uint32_t nframes_t;
typedef jack_midi_event_t MidiEvent;
typedef unsigned char RawMidi;
OverlapExternal // overlap extends to (at least) begin+end
};
- OverlapType coverage (jack_nframes_t start_a, jack_nframes_t end_a,
- jack_nframes_t start_b, jack_nframes_t end_b);
+ OverlapType coverage (nframes_t start_a, nframes_t end_a,
+ nframes_t start_b, nframes_t end_b);
enum AutomationType {
GainAutomation = 0x1,
BBT_Time bbt;
union {
- jack_nframes_t frames;
+ nframes_t frames;
double seconds;
};
+
+ AnyTime() { type = Frames; frames = 0; }
};
struct AudioRange {
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
uint32_t id;
- AudioRange (jack_nframes_t s, jack_nframes_t e, uint32_t i) : start (s), end (e) , id (i) {}
+ AudioRange (nframes_t s, nframes_t e, uint32_t i) : start (s), end (e) , id (i) {}
- jack_nframes_t length() { return end - start + 1; }
+ nframes_t length() { return end - start + 1; }
bool operator== (const AudioRange& other) const {
return start == other.start && end == other.end && id == other.id;
return start == other.start && end == other.end;
}
- OverlapType coverage (jack_nframes_t s, jack_nframes_t e) const {
+ OverlapType coverage (nframes_t s, nframes_t e) const {
return ARDOUR::coverage (start, end, s, e);
}
};
}
};
+ /*
+ Slowest = 6.6dB/sec falloff at update rate of 40ms
+ Slow = 6.8dB/sec falloff at update rate of 40ms
+ */
+
+ enum MeterFalloff {
+ MeterFalloffOff = 0,
+ MeterFalloffSlowest = 1,
+ MeterFalloffSlow = 2,
+ MeterFalloffMedium = 3,
+ MeterFalloffFast = 4,
+ MeterFalloffFaster = 5,
+ MeterFalloffFastest = 6
+ };
+
+ enum MeterHold {
+ MeterHoldOff = 0,
+ MeterHoldShort = 40,
+ MeterHoldMedium = 100,
+ MeterHoldLong = 200
+ };
+
enum EditMode {
Slide,
Splice
PostFader
};
+ enum MonitorModel {
+ HardwareMonitoring,
+ SoftwareMonitoring,
+ ExternalMonitoring,
+ };
+
enum CrossfadeModel {
FullCrossfade,
ShortCrossfade
};
+
+ enum LayerModel {
+ LaterHigher,
+ MoveAddHigher,
+ AddHigher
+ };
+
+ enum SoloModel {
+ InverseMute,
+ SoloBus
+ };
+
+ enum AutoConnectOption {
+ AutoConnectPhysical = 0x1,
+ AutoConnectMaster = 0x2
+ };
struct InterThreadInfo {
volatile bool done;
LADSPA,
VST
};
-
+
+ enum SlaveSource {
+ None = 0,
+ MTC,
+ JACK
+ };
+
+ enum ShuttleBehaviour {
+ Sprung,
+ Wheel
+ };
+
+ enum ShuttleUnits {
+ Percentage,
+ Semitones
+ };
+
typedef std::vector<boost::shared_ptr<Source> > SourceList;
} // namespace ARDOUR
std::istream& operator>>(std::istream& o, ARDOUR::SampleFormat& sf);
std::istream& operator>>(std::istream& o, ARDOUR::HeaderFormat& sf);
-
-static inline jack_nframes_t
-session_frame_to_track_frame (jack_nframes_t session_frame, double speed)
+std::istream& operator>>(std::istream& o, ARDOUR::AutoConnectOption& sf);
+std::istream& operator>>(std::istream& o, ARDOUR::EditMode& sf);
+std::istream& operator>>(std::istream& o, ARDOUR::MonitorModel& sf);
+std::istream& operator>>(std::istream& o, ARDOUR::SoloModel& sf);
+std::istream& operator>>(std::istream& o, ARDOUR::LayerModel& sf);
+std::istream& operator>>(std::istream& o, ARDOUR::CrossfadeModel& sf);
+std::istream& operator>>(std::istream& o, ARDOUR::SlaveSource& sf);
+std::istream& operator>>(std::istream& o, ARDOUR::ShuttleBehaviour& sf);
+std::istream& operator>>(std::istream& o, ARDOUR::ShuttleUnits& sf);
+
+using ARDOUR::nframes_t;
+
+static inline nframes_t
+session_frame_to_track_frame (nframes_t session_frame, double speed)
{
- return (jack_nframes_t)( (double)session_frame * speed );
+ return (nframes_t)( (double)session_frame * speed );
}
-static inline jack_nframes_t
-track_frame_to_session_frame (jack_nframes_t track_frame, double speed)
+static inline nframes_t
+track_frame_to_session_frame (nframes_t track_frame, double speed)
{
- return (jack_nframes_t)( (double)track_frame / speed );
+ return (nframes_t)( (double)track_frame / speed );
}
std::string region_name_from_path (std::string path);
std::string path_expand (std::string);
-void compute_equal_power_fades (jack_nframes_t nframes, float* in, float* out);
+void compute_equal_power_fades (nframes_t nframes, float* in, float* out);
+
+const char* slave_source_to_string (ARDOUR::SlaveSource src);
+ARDOUR::SlaveSource string_to_slave_source (std::string str);
+
+const char* edit_mode_to_string (ARDOUR::EditMode);
+ARDOUR::EditMode string_to_edit_mode (std::string);
+
+float meter_falloff_to_float (ARDOUR::MeterFalloff);
+float meter_hold_to_float (ARDOUR::MeterHold);
#if defined(HAVE_COREAUDIO) || defined(HAVE_AUDIOUNITS)
std::string CFStringRefToStdString(CFStringRef stringRef);
const char * maker() const;
uint32_t parameter_count() const;
float default_value (uint32_t port);
- jack_nframes_t latency() const;
+ nframes_t latency() const;
void set_parameter (uint32_t port, float val);
float get_parameter (uint32_t port) const;
int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
uint32_t nth_parameter (uint32_t port, bool& ok) const;
void activate ();
void deactivate ();
- void set_block_size (jack_nframes_t nframes);
- int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, jack_nframes_t nframes, jack_nframes_t offset);
+ void set_block_size (nframes_t nframes);
+ int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset);
void store_state (ARDOUR::PluginState&);
void restore_state (ARDOUR::PluginState&);
string describe_parameter (uint32_t);
/* now refill channel buffers */
if (speed() != 1.0f || speed() != -1.0f) {
- seek ((jack_nframes_t) (_session.transport_frame() * (double) speed()));
+ seek ((nframes_t) (_session.transport_frame() * (double) speed()));
} else {
seek (_session.transport_frame());
}
/* a single full-sized region */
- cerr << "setup DS using " << srcs.front()->natural_position () << endl;
-
- boost::shared_ptr<Region> region (RegionFactory::create (srcs, 0, max_frames, _name));
+ boost::shared_ptr<Region> region (RegionFactory::create (srcs, 0, max_frames - srcs.front()->natural_position(), _name));
_playlist->add_region (region, srcs.front()->natural_position());
}
with the (presumed single, full-extent) region.
*/
- Playlist::RegionList* rl = _playlist->regions_at (0);
+ boost::shared_ptr<Region> rp = _playlist->find_next_region (_session.current_start_frame(), Start, 1);
- if (rl->empty()) {
+ if (!rp) {
reset_write_sources (false, true);
return;
}
- boost::shared_ptr<AudioRegion> region = boost::dynamic_pointer_cast<AudioRegion> (rl->front());
+ boost::shared_ptr<AudioRegion> region = boost::dynamic_pointer_cast<AudioRegion> (rp);
if (region == 0) {
throw failed_constructor();
}
- delete rl;
-
uint32_t n;
ChannelList::iterator chan;
}
void
-AudioDiskstream::check_record_status (jack_nframes_t transport_frame, jack_nframes_t nframes, bool can_record)
+AudioDiskstream::check_record_status (nframes_t transport_frame, nframes_t nframes, bool can_record)
{
int possibly_recording;
int rolling;
if (_alignment_style == ExistingMaterial) {
-
- if (!_session.get_punch_in()) {
+ if (!Config->get_punch_in()) {
/* manual punch in happens at the correct transport frame
because the user hit a button. but to get alignment correct
} else {
- if (_session.get_punch_in()) {
+ if (Config->get_punch_in()) {
first_recordable_frame += _roll_delay;
} else {
capture_start_frame -= _roll_delay;
}
int
-AudioDiskstream::process (jack_nframes_t transport_frame, jack_nframes_t nframes, jack_nframes_t offset, bool can_record, bool rec_monitors_input)
+AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_t offset, bool can_record, bool rec_monitors_input)
{
uint32_t n;
ChannelList::iterator c;
int ret = -1;
- jack_nframes_t rec_offset = 0;
- jack_nframes_t rec_nframes = 0;
+ nframes_t rec_offset = 0;
+ nframes_t rec_nframes = 0;
bool nominally_recording;
bool re = record_enabled ();
bool collect_playback = false;
(*c).current_playback_buffer = 0;
}
- if (nominally_recording || (_session.get_record_enabled() && _session.get_punch_in())) {
+ if (nominally_recording || (_session.get_record_enabled() && Config->get_punch_in())) {
OverlapType ot;
ot = coverage (first_recordable_frame, last_recordable_frame, transport_frame, transport_frame + nframes);
} else {
- jack_nframes_t total = chan.capture_vector.len[0] + chan.capture_vector.len[1];
+ nframes_t total = chan.capture_vector.len[0] + chan.capture_vector.len[1];
if (rec_nframes > total) {
DiskOverrun ();
assert(ap);
Sample* buf = ap->get_audio_buffer().data(nframes, offset);
- jack_nframes_t first = chan.capture_vector.len[0];
+ nframes_t first = chan.capture_vector.len[0];
memcpy (chan.capture_wrap_buffer, buf, sizeof (Sample) * first);
memcpy (chan.capture_vector.buf[0], buf, sizeof (Sample) * first);
/* we're doing playback */
- jack_nframes_t necessary_samples;
+ nframes_t necessary_samples;
/* no varispeed playback if we're recording, because the output .... TBD */
if (rec_nframes == 0 && _actual_speed != 1.0f) {
- necessary_samples = (jack_nframes_t) floor ((nframes * fabs (_actual_speed))) + 1;
+ necessary_samples = (nframes_t) floor ((nframes * fabs (_actual_speed))) + 1;
} else {
necessary_samples = nframes;
}
chan.current_playback_buffer = chan.playback_vector.buf[0];
} else {
- jack_nframes_t total = chan.playback_vector.len[0] + chan.playback_vector.len[1];
+ nframes_t total = chan.playback_vector.len[0] + chan.playback_vector.len[1];
if (necessary_samples > total) {
DiskUnderrun ();
if (rec_nframes == 0 && _actual_speed != 1.0f && _actual_speed != -1.0f) {
uint64_t phase = last_phase;
- jack_nframes_t i = 0;
+ nframes_t i = 0;
// Linearly interpolate into the alt buffer
// using 40.24 fixp maths (swh)
i = 0;
phase = last_phase;
- for (jack_nframes_t outsample = 0; outsample < nframes; ++outsample) {
+ for (nframes_t outsample = 0; outsample < nframes; ++outsample) {
i = phase >> 24;
fr = (phase & 0xFFFFFF) / 16777216.0f;
chan.speed_buffer[outsample] =
}
bool
-AudioDiskstream::commit (jack_nframes_t nframes)
+AudioDiskstream::commit (nframes_t nframes)
{
bool need_butler = false;
overwrite_queued = false;
/* assume all are the same size */
- jack_nframes_t size = channels[0].playback_buf->bufsize();
+ nframes_t size = channels[0].playback_buf->bufsize();
mixdown_buffer = new Sample[size];
gain_buffer = new float[size];
size--;
uint32_t n=0;
- jack_nframes_t start;
+ nframes_t start;
for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan, ++n) {
start = overwrite_frame;
- jack_nframes_t cnt = size;
+ nframes_t cnt = size;
/* to fill the buffer without resetting the playback sample, we need to
do it one or two chunks (normally two).
*/
- jack_nframes_t to_read = size - overwrite_offset;
+ nframes_t to_read = size - overwrite_offset;
if (read ((*chan).playback_buf->buffer() + overwrite_offset, mixdown_buffer, gain_buffer, start, to_read, *chan, n, reversed)) {
error << string_compose(_("AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3"),
}
int
-AudioDiskstream::seek (jack_nframes_t frame, bool complete_refill)
+AudioDiskstream::seek (nframes_t frame, bool complete_refill)
{
Glib::Mutex::Lock lm (state_lock);
uint32_t n;
}
int
-AudioDiskstream::can_internal_playback_seek (jack_nframes_t distance)
+AudioDiskstream::can_internal_playback_seek (nframes_t distance)
{
ChannelList::iterator chan;
}
int
-AudioDiskstream::internal_playback_seek (jack_nframes_t distance)
+AudioDiskstream::internal_playback_seek (nframes_t distance)
{
ChannelList::iterator chan;
}
int
-AudioDiskstream::read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer, jack_nframes_t& start, jack_nframes_t cnt,
+AudioDiskstream::read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer, nframes_t& start, nframes_t cnt,
ChannelInfo& channel_info, int channel, bool reversed)
{
- jack_nframes_t this_read = 0;
+ nframes_t this_read = 0;
bool reloop = false;
- jack_nframes_t loop_end = 0;
- jack_nframes_t loop_start = 0;
- jack_nframes_t loop_length = 0;
- jack_nframes_t offset = 0;
+ nframes_t loop_end = 0;
+ nframes_t loop_start = 0;
+ nframes_t loop_length = 0;
+ nframes_t offset = 0;
Location *loc = 0;
if (!reversed) {
AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer)
{
int32_t ret = 0;
- jack_nframes_t to_read;
+ nframes_t to_read;
RingBufferNPT<Sample>::rw_vector vector;
bool reversed = (_visible_speed * _session.transport_speed()) < 0.0f;
- jack_nframes_t total_space;
- jack_nframes_t zero_fill;
+ nframes_t total_space;
+ nframes_t zero_fill;
uint32_t chan_n;
ChannelList::iterator i;
- jack_nframes_t ts;
+ nframes_t ts;
assert(mixdown_buffer);
assert(gain_buffer);
}
}
- jack_nframes_t file_frame_tmp = 0;
+ nframes_t file_frame_tmp = 0;
for (chan_n = 0, i = channels.begin(); i != channels.end(); ++i, ++chan_n) {
ChannelInfo& chan (*i);
Sample* buf1;
Sample* buf2;
- jack_nframes_t len1, len2;
+ nframes_t len1, len2;
chan.playback_buf->get_write_vector (&vector);
int32_t ret = 0;
RingBufferNPT<Sample>::rw_vector vector;
RingBufferNPT<CaptureTransition>::rw_vector transvec;
- jack_nframes_t total;
+ nframes_t total;
_write_data_count = 0;
ret = 1;
}
- to_write = min (disk_io_chunk_frames, (jack_nframes_t) vector.len[0]);
+ to_write = min (disk_io_chunk_frames, (nframes_t) vector.len[0]);
// check the transition buffer when recording destructive
// important that we get this after the capture buf
of vector.len[1] to be flushed to disk as well.
*/
- to_write = min ((jack_nframes_t)(disk_io_chunk_frames - to_write), (jack_nframes_t) vector.len[1]);
+ to_write = min ((nframes_t)(disk_io_chunk_frames - to_write), (nframes_t) vector.len[1]);
if ((*chan).write_source->write (vector.buf[1], to_write) != to_write) {
error << string_compose(_("AudioDiskstream %1: cannot write to disk"), _id) << endmsg;
bool more_work = true;
int err = 0;
boost::shared_ptr<AudioRegion> region;
- jack_nframes_t total_capture;
+ nframes_t total_capture;
SourceList srcs;
SourceList::iterator src;
ChannelList::iterator chan;
if (abort_capture) {
- ChannelList::iterator chan;
-
- list<boost::shared_ptr<Source> >* deletion_list = new list<boost::shared_ptr<Source> >;
+ if (destructive()) {
+ goto outout;
+ }
- for ( chan = channels.begin(); chan != channels.end(); ++chan) {
+ for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
if ((*chan).write_source) {
(*chan).write_source->mark_for_remove ();
-
- deletion_list->push_back ((*chan).write_source);
-
+ (*chan).write_source->drop_references ();
(*chan).write_source.reset ();
}
/* new source set up in "out" below */
}
-
- if (!deletion_list->empty()) {
- DeleteSources (deletion_list);
- } else {
- delete deletion_list;
- }
goto out;
}
mark_write_completed = true;
+ out:
reset_write_sources (mark_write_completed);
- out:
+ outout:
+
for (ci = capture_info.begin(); ci != capture_info.end(); ++ci) {
delete *ci;
}
g_atomic_int_set (&_record_enabled, 1);
capturing_sources.clear ();
- if (Config->get_use_hardware_monitoring()) {
+ if (Config->get_monitoring_model() == HardwareMonitoring) {
for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
if ((*chan).source) {
- (*chan).source->ensure_monitor_input (!(_session.get_auto_input() && rolling));
+ (*chan).source->ensure_monitor_input (!(Config->get_auto_input() && rolling));
}
capturing_sources.push_back ((*chan).write_source);
}
AudioDiskstream::disengage_record_enable ()
{
g_atomic_int_set (&_record_enabled, 0);
- if (Config->get_use_hardware_monitoring()) {
+ if (Config->get_monitoring_model() == HardwareMonitoring) {
for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
if ((*chan).source) {
(*chan).source->ensure_monitor_input (false);
node->add_property ("playlist", _playlist->name());
- snprintf (buf, sizeof(buf), "%f", _visible_speed);
+ snprintf (buf, sizeof(buf), "%.12g", _visible_speed);
node->add_property ("speed", buf);
node->add_property("name", _name);
- id().print (buf);
+ id().print (buf, sizeof (buf));
node->add_property("id", buf);
if (!capturing_sources.empty() && _session.get_record_enabled()) {
Location* pi;
- if (_session.get_punch_in() && ((pi = _session.locations()->auto_punch_location()) != 0)) {
+ if (Config->get_punch_in() && ((pi = _session.locations()->auto_punch_location()) != 0)) {
snprintf (buf, sizeof (buf), "%" PRIu32, pi->start());
} else {
snprintf (buf, sizeof (buf), "%" PRIu32, _session.transport_frame());
ChannelInfo &chan = channels[n];
if (chan.write_source) {
-
- if (AudioFileSource::is_empty (_session, chan.write_source->path())) {
- chan.write_source->mark_for_remove ();
- chan.write_source.reset ();
- } else {
- chan.write_source.reset ();
- }
+ chan.write_source->set_allow_remove_if_empty (true);
+ chan.write_source.reset ();
}
try {
}
void
-AudioDiskstream::set_block_size (jack_nframes_t nframes)
+AudioDiskstream::set_block_size (nframes_t nframes)
{
if (_session.get_block_size() > speed_buffer_size) {
speed_buffer_size = _session.get_block_size();
*/
double sp = max (fabsf (_actual_speed), 1.2f);
- jack_nframes_t required_wrap_size = (jack_nframes_t) floor (_session.get_block_size() * sp) + 1;
+ nframes_t required_wrap_size = (nframes_t) floor (_session.get_block_size() * sp) + 1;
if (required_wrap_size > wrap_buffer_size) {
boost::shared_ptr<AudioFileSource> fs;
boost::shared_ptr<AudioFileSource> first_fs;
SourceList pending_sources;
- jack_nframes_t position;
+ nframes_t position;
if ((prop = node.property (X_("at"))) == 0) {
return -1;
}
}
-AudioPlaylist::AudioPlaylist (const AudioPlaylist& other, jack_nframes_t start, jack_nframes_t cnt, string name, bool hidden)
+AudioPlaylist::AudioPlaylist (const AudioPlaylist& other, nframes_t start, nframes_t cnt, string name, bool hidden)
: Playlist (other, start, cnt, name, hidden)
{
save_state (_("initial state"));
}
};
-jack_nframes_t
-AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, jack_nframes_t start,
- jack_nframes_t cnt, unsigned chan_n)
+ARDOUR::nframes_t
+AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, nframes_t start,
+ nframes_t cnt, unsigned chan_n)
{
- jack_nframes_t ret = cnt;
- jack_nframes_t end;
- jack_nframes_t read_frames;
- jack_nframes_t skip_frames;
+ nframes_t ret = cnt;
+ nframes_t end;
+ nframes_t read_frames;
+ nframes_t skip_frames;
/* optimizing this memset() away involves a lot of conditionals
that may well cause more of a hit due to cache misses
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
if ((*i)->coverage (start, end) != OverlapNone) {
-
relevant_regions[(*i)->layer()].push_back (*i);
relevant_layers.push_back ((*i)->layer());
}
audio engineering.
*/
- jack_nframes_t xfade_length = min ((jack_nframes_t) 720, top->length());
+ nframes_t xfade_length = min ((nframes_t) 720, top->length());
/* in, out */
xfade = new Crossfade (top, bottom, xfade_length, top->first_frame(), StartOfIn);
} else {
- xfade = new Crossfade (other, region, _session.get_xfade_model(), _session.get_crossfades_active());
+ xfade = new Crossfade (other, region, Config->get_xfade_model(), Config->get_crossfades_active());
add_crossfade (*xfade);
}
}
_crossfades.push_back (xfade);
xfade->Invalidated.connect (mem_fun (*this, &AudioPlaylist::crossfade_invalidated));
xfade->StateChanged.connect (mem_fun (*this, &AudioPlaylist::crossfade_changed));
- /* no need to notify here */
+ NewCrossfade(xfade);
} else {
delete xfade;
}
}
void
-AudioPlaylist::crossfades_at (jack_nframes_t frame, Crossfades& clist)
+AudioPlaylist::crossfades_at (nframes_t frame, Crossfades& clist)
{
RegionLock rlock (this);
for (Crossfades::iterator i = _crossfades.begin(); i != _crossfades.end(); ++i) {
- jack_nframes_t start, end;
+ nframes_t start, end;
start = (*i)->position();
end = start + (*i)->overlap_length(); // not length(), important difference
sscanf (prop->value().c_str(), "%d", &x);
set_remote_control_id (x);
}
+
+ } else if (child->name() == X_("recenable")) {
+ _rec_enable_control.set_state (*child);
+ _session.add_controllable (&_rec_enable_control);
}
}
for (vector<FreezeRecordInsertInfo*>::iterator i = _freeze_record.insert_info.begin(); i != _freeze_record.insert_info.end(); ++i) {
inode = new XMLNode (X_("insert"));
- (*i)->id.print (buf);
+ (*i)->id.print (buf, sizeof (buf));
inode->add_property (X_("id"), buf);
inode->add_child_copy ((*i)->state);
diskstream.
*/
- _diskstream->id().print (buf);
+ _diskstream->id().print (buf, sizeof (buf));
root.add_property ("diskstream-id", buf);
+ root.add_child_nocopy (_rec_enable_control.get_state());
+
return root;
}
}
int
-AudioTrack::no_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t offset,
+AudioTrack::no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset,
bool session_state_changing, bool can_record, bool rec_monitors_input)
{
if (n_outputs().get_total() == 0) {
send_silence = true;
} else {
- if (_session.get_auto_input()) {
- if (Config->get_use_sw_monitoring()) {
+ if (Config->get_auto_input()) {
+ if (Config->get_monitoring_model() == SoftwareMonitoring) {
send_silence = false;
} else {
send_silence = true;
}
} else {
if (_diskstream->record_enabled()) {
- if (Config->get_use_sw_monitoring()) {
+ if (Config->get_monitoring_model() == SoftwareMonitoring) {
send_silence = false;
} else {
send_silence = true;
}
int
-AudioTrack::roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t offset, int declick,
+AudioTrack::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, int declick,
bool can_record, bool rec_monitors_input)
{
int dret;
Sample* b;
Sample* tmpb;
- jack_nframes_t transport_frame;
+ nframes_t transport_frame;
boost::shared_ptr<AudioDiskstream> diskstream = audio_diskstream();
- {
- Glib::RWLock::ReaderLock lm (redirect_lock, Glib::TRY_LOCK);
- if (lm.locked()) {
- // automation snapshot can also be called from the non-rt context
- // and it uses the redirect list, so we take the lock out here
- automation_snapshot (start_frame);
- }
- }
-
if (n_outputs().get_total() == 0 && _redirects.empty()) {
return 0;
}
just_meter_input (start_frame, end_frame, nframes, offset);
}
- if (diskstream->record_enabled() && !can_record && !_session.get_auto_input()) {
+ if (diskstream->record_enabled() && !can_record && !Config->get_auto_input()) {
/* not actually recording, but we want to hear the input material anyway,
at least potentially (depending on monitoring options)
}
}
- process_output_buffers (bufs, start_frame, end_frame, nframes, offset, (!_session.get_record_enabled() || !_session.get_do_not_record_plugins()), declick, (_meter_point != MeterInput));
+ process_output_buffers (bufs, start_frame, end_frame, nframes, offset, (!_session.get_record_enabled() || !Config->get_do_not_record_plugins()), declick, (_meter_point != MeterInput));
} else {
/* problem with the diskstream; just be quiet for a bit */
}
int
-AudioTrack::silent_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t offset,
+AudioTrack::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset,
bool can_record, bool rec_monitors_input)
{
if (n_outputs().get_total() == 0 && _redirects.empty()) {
}
int
-AudioTrack::export_stuff (BufferSet& buffers, jack_nframes_t start, jack_nframes_t nframes)
+AudioTrack::export_stuff (BufferSet& buffers, nframes_t start, nframes_t nframes)
{
gain_t gain_automation[nframes];
gain_t gain_buffer[nframes];
for (BufferSet::audio_iterator bi = buffers.audio_begin(); bi != buffers.audio_end(); ++bi) {
Sample *b = bi->data(nframes);
- for (jack_nframes_t n = 0; n < nframes; ++n) {
+ for (nframes_t n = 0; n < nframes; ++n) {
b[n] *= gain_automation[n];
}
}
for (BufferSet::audio_iterator bi = buffers.audio_begin(); bi != buffers.audio_end(); ++bi) {
Sample *b = bi->data(nframes);
- for (jack_nframes_t n = 0; n < nframes; ++n) {
+ for (nframes_t n = 0; n < nframes; ++n) {
b[n] *= this_gain;
}
}
void
-AudioTrack::bounce_range (jack_nframes_t start, jack_nframes_t end, InterThreadInfo& itt)
+AudioTrack::bounce_range (nframes_t start, nframes_t end, InterThreadInfo& itt)
{
vector<boost::shared_ptr<Source> > srcs;
_session.write_one_audio_track (*this, start, end, false, srcs, itt);
return 0;
}
-jack_nframes_t
+nframes_t
AUPlugin::latency () const
{
return unit->Latency ();
}
void
-AUPlugin::set_block_size (jack_nframes_t nframes)
+AUPlugin::set_block_size (nframes_t nframes)
{
}
int
-AUPlugin::connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, jack_nframes_t nframes, jack_nframes_t offset)
+AUPlugin::connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset)
{
AudioUnitRenderActionFlags flags = 0;
AudioTimeStamp ts;
using namespace ARDOUR;
using namespace PBD;
+gint AudioEngine::m_meter_exit;
+
AudioEngine::AudioEngine (string client_name)
: ports (new Ports)
{
_freewheel_thread_registered = false;
m_meter_thread = 0;
- m_meter_exit = false;
+ g_atomic_int_set (&m_meter_exit, 0);
if (connect_to_jack (client_name)) {
throw NoBackendAvailable ();
jack_client_close (_jack);
}
- if(m_meter_thread) {
- g_atomic_int_inc(&m_meter_exit);
- }
+ stop_metering_thread ();
}
void
if (!_running) {
if (session) {
- jack_nframes_t blocksize = jack_get_buffer_size (_jack);
+ nframes_t blocksize = jack_get_buffer_size (_jack);
session->set_block_size (blocksize);
session->set_frame_rate (jack_get_sample_rate (_jack));
bool
-AudioEngine::get_sync_offset (jack_nframes_t& offset) const
+AudioEngine::get_sync_offset (nframes_t& offset) const
{
#ifdef HAVE_JACK_VIDEO_SUPPORT
}
void
-AudioEngine::_jack_timebase_callback (jack_transport_state_t state, jack_nframes_t nframes,
+AudioEngine::_jack_timebase_callback (jack_transport_state_t state, nframes_t nframes,
jack_position_t* pos, int new_position, void *arg)
{
static_cast<AudioEngine*> (arg)->jack_timebase_callback (state, nframes, pos, new_position);
}
void
-AudioEngine::jack_timebase_callback (jack_transport_state_t state, jack_nframes_t nframes,
+AudioEngine::jack_timebase_callback (jack_transport_state_t state, nframes_t nframes,
jack_position_t* pos, int new_position)
{
if (session && session->synced_to_jack()) {
}
int
-AudioEngine::_process_callback (jack_nframes_t nframes, void *arg)
+AudioEngine::_process_callback (nframes_t nframes, void *arg)
{
return static_cast<AudioEngine *> (arg)->process_callback (nframes);
}
}
int
-AudioEngine::process_callback (jack_nframes_t nframes)
+AudioEngine::process_callback (nframes_t nframes)
{
// CycleTimer ct ("AudioEngine::process");
Glib::Mutex::Lock tm (_process_lock, Glib::TRY_LOCK);
- jack_nframes_t next_processed_frames;
+ nframes_t next_processed_frames;
/* handle wrap around of total frames counter */
}
int
-AudioEngine::_sample_rate_callback (jack_nframes_t nframes, void *arg)
+AudioEngine::_sample_rate_callback (nframes_t nframes, void *arg)
{
return static_cast<AudioEngine *> (arg)->jack_sample_rate_callback (nframes);
}
int
-AudioEngine::jack_sample_rate_callback (jack_nframes_t nframes)
+AudioEngine::jack_sample_rate_callback (nframes_t nframes)
{
_frame_rate = nframes;
_usecs_per_cycle = (int) floor ((((double) frames_per_cycle() / nframes)) * 1000000.0);
}
int
-AudioEngine::_bufsize_callback (jack_nframes_t nframes, void *arg)
+AudioEngine::_bufsize_callback (nframes_t nframes, void *arg)
{
return static_cast<AudioEngine *> (arg)->jack_bufsize_callback (nframes);
}
int
-AudioEngine::jack_bufsize_callback (jack_nframes_t nframes)
+AudioEngine::jack_bufsize_callback (nframes_t nframes)
{
_buffer_size = nframes;
_usecs_per_cycle = (int) floor ((((double) nframes / frame_rate())) * 1000000.0);
return 0;
}
+void
+AudioEngine::stop_metering_thread ()
+{
+ if (m_meter_thread) {
+ g_atomic_int_set (&m_meter_exit, 1);
+ }
+ m_meter_thread->join ();
+ m_meter_thread = 0;
+}
+
void
AudioEngine::start_metering_thread ()
{
- if(m_meter_thread == 0) {
- m_meter_thread = Glib::Thread::create (sigc::mem_fun(this, &AudioEngine::meter_thread), false);
+ if (m_meter_thread == 0) {
+ m_meter_thread = Glib::Thread::create (sigc::mem_fun(this, &AudioEngine::meter_thread), true);
}
}
AudioEngine::meter_thread ()
{
while (g_atomic_int_get(&m_meter_exit) != true) {
- Glib::usleep (10000); /* 1/100th sec interval */
- IO::update_meters ();
+ Glib::usleep (10000); /* 1/100th sec interval */
+ IO::update_meters ();
}
- return;
}
void
if (ret == 0) {
pair<string,string> c (s, d);
port_connections.push_back (c);
+ } else if (ret == EEXIST) {
+ error << string_compose(_("AudioEngine: connection already exists: %1 (%2) to %3 (%4)"),
+ source, s, destination, d)
+ << endmsg;
} else {
error << string_compose(_("AudioEngine: cannot connect %1 (%2) to %3 (%4)"),
source, s, destination, d)
}
-jack_nframes_t
+ARDOUR::nframes_t
AudioEngine::frame_rate ()
{
if (_jack) {
}
}
-jack_nframes_t
+ARDOUR::nframes_t
AudioEngine::frames_per_cycle ()
{
if (_jack) {
return ret;
}
-jack_nframes_t
+ARDOUR::nframes_t
AudioEngine::get_port_total_latency (const Port& port)
{
if (!_jack) {
}
void
-AudioEngine::transport_locate (jack_nframes_t where)
+AudioEngine::transport_locate (nframes_t where)
{
// cerr << "tell JACK to locate to " << where << endl;
if (_jack) {
if (session) {
- jack_nframes_t blocksize = jack_get_buffer_size (_jack);
+ nframes_t blocksize = jack_get_buffer_size (_jack);
session->set_block_size (blocksize);
session->set_frame_rate (jack_get_sample_rate (_jack));
}
}
int
-AudioEngine::request_buffer_size (jack_nframes_t nframes)
+AudioEngine::request_buffer_size (nframes_t nframes)
{
if (_jack) {
int ret = jack_set_buffer_size (_jack, nframes);
sigc::signal<void> AudioFileSource::HeaderPositionOffsetChanged;
uint64_t AudioFileSource::header_position_offset = 0;
+/* XXX turn this into a Config option */
char AudioFileSource::bwf_country_code[3] = "US";
+/* XXX turn this into a Config option */
char AudioFileSource::bwf_organization_code[4] = "LAS";
+/* XXX maybe this too */
char AudioFileSource::bwf_serial_number[13] = "000000000000";
AudioFileSource::AudioFileSource (Session& s, string idstr, Flag flags)
AudioFileSource::~AudioFileSource ()
{
if (removable()) {
- cerr << "Removing file " << _path << " because its removable\n";
unlink (_path.c_str());
unlink (peakpath.c_str());
}
bool is_new = false;
_length = 0;
+ timeline_position = 0;
next_peak_clear_should_notify = false;
-
+ _peaks_built = false;
+ file_is_new = false;
+
if (!find (pathstr, must_exist, is_new)) {
return -1;
}
if (!writable()) {
return;
}
- _flags = Flag (_flags | RemoveAtDestroy);
+
+ _flags = Flag (_flags | Removable | RemoveAtDestroy);
}
void
}
void
-AudioFileSource::set_header_position_offset (jack_nframes_t offset)
+AudioFileSource::set_header_position_offset (nframes_t offset)
{
header_position_offset = offset;
HeaderPositionOffsetChanged ();
}
void
-AudioFileSource::set_timeline_position (jack_nframes_t pos)
+AudioFileSource::set_timeline_position (nframes_t pos)
{
timeline_position = pos;
}
void
AudioFileSource::set_allow_remove_if_empty (bool yn)
{
- if (writable()) {
+ if (!writable()) {
+ return;
+ }
+
+ if (yn) {
_flags = Flag (_flags | RemovableIfEmpty);
+ } else {
+ _flags = Flag (_flags & ~RemovableIfEmpty);
}
}
return ret;
}
+int
+AudioFileSource::setup_peakfile ()
+{
+ if (!(_flags & NoPeakFile)) {
+ return initialize_peakfile (file_is_new, _path);
+ } else {
+ return 0;
+ }
+}
#include <pbd/basename.h>
#include <pbd/xml++.h>
+#include <pbd/stacktrace.h>
#include <ardour/audioregion.h>
#include <ardour/session.h>
#include <ardour/playlist.h>
#include <ardour/audiofilter.h>
#include <ardour/audiofilesource.h>
+#include <ardour/destructive_filesource.h>
#include "i18n.h"
#include <locale.h>
}
/** Basic AudioRegion constructor (one channel) */
-AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, jack_nframes_t start, jack_nframes_t length)
+AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, nframes_t start, nframes_t length)
: Region (src, start, length, PBD::basename_nosuffix(src->name()), DataType::AUDIO, 0, Region::Flag(Region::DefaultFlags|Region::External)),
_fade_in (0.0, 2.0, 1.0, false),
_fade_out (0.0, 2.0, 1.0, false),
}
/* Basic AudioRegion constructor (one channel) */
-AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t layer, Flag flags)
+AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, nframes_t start, nframes_t length, const string& name, layer_t layer, Flag flags)
: Region (src, start, length, name, DataType::AUDIO, layer, flags)
, _fade_in (0.0, 2.0, 1.0, false)
, _fade_out (0.0, 2.0, 1.0, false)
}
/* Basic AudioRegion constructor (many channels) */
-AudioRegion::AudioRegion (SourceList& srcs, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t layer, Flag flags)
+AudioRegion::AudioRegion (SourceList& srcs, nframes_t start, nframes_t length, const string& name, layer_t layer, Flag flags)
: Region (srcs, start, length, name, DataType::AUDIO, layer, flags)
, _fade_in (0.0, 2.0, 1.0, false)
, _fade_out (0.0, 2.0, 1.0, false)
/** Create a new AudioRegion, that is part of an existing one */
-AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other, jack_nframes_t offset, jack_nframes_t length, const string& name, layer_t layer, Flag flags)
+AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other, nframes_t offset, nframes_t length, const string& name, layer_t layer, Flag flags)
: Region (other, offset, length, name, layer, flags),
_fade_in (other->_fade_in),
_fade_out (other->_fade_out),
AudioRegion::~AudioRegion ()
{
+ notify_callbacks ();
GoingAway (); /* EMIT SIGNAL */
}
}
}
-jack_nframes_t
-AudioRegion::read_peaks (PeakData *buf, jack_nframes_t npeaks, jack_nframes_t offset, jack_nframes_t cnt, uint32_t chan_n, double samples_per_unit) const
+ARDOUR::nframes_t
+AudioRegion::read_peaks (PeakData *buf, nframes_t npeaks, nframes_t offset, nframes_t cnt, uint32_t chan_n, double samples_per_unit) const
{
if (chan_n >= _sources.size()) {
return 0;
return 0;
} else {
if (_scale_amplitude != 1.0) {
- for (jack_nframes_t n = 0; n < npeaks; ++n) {
+ for (nframes_t n = 0; n < npeaks; ++n) {
buf[n].max *= _scale_amplitude;
buf[n].min *= _scale_amplitude;
}
}
}
-jack_nframes_t
-AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, jack_nframes_t position,
- jack_nframes_t cnt,
- uint32_t chan_n, jack_nframes_t read_frames, jack_nframes_t skip_frames) const
+ARDOUR::nframes_t
+AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, nframes_t position,
+ nframes_t cnt,
+ uint32_t chan_n, nframes_t read_frames, nframes_t skip_frames) const
{
return _read_at (_sources, buf, mixdown_buffer, gain_buffer, position, cnt, chan_n, read_frames, skip_frames);
}
-jack_nframes_t
-AudioRegion::master_read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, jack_nframes_t position,
- jack_nframes_t cnt, uint32_t chan_n) const
+ARDOUR::nframes_t
+AudioRegion::master_read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, nframes_t position,
+ nframes_t cnt, uint32_t chan_n) const
{
return _read_at (_master_sources, buf, mixdown_buffer, gain_buffer, position, cnt, chan_n, 0, 0);
}
-jack_nframes_t
+ARDOUR::nframes_t
AudioRegion::_read_at (const SourceList& srcs, Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
- jack_nframes_t position, jack_nframes_t cnt,
- uint32_t chan_n, jack_nframes_t read_frames, jack_nframes_t skip_frames) const
+ nframes_t position, nframes_t cnt,
+ uint32_t chan_n, nframes_t read_frames, nframes_t skip_frames) const
{
- jack_nframes_t internal_offset;
- jack_nframes_t buf_offset;
- jack_nframes_t to_read;
-
+ nframes_t internal_offset;
+ nframes_t buf_offset;
+ nframes_t to_read;
+
/* precondition: caller has verified that we cover the desired section */
if (chan_n >= _sources.size()) {
if (internal_offset >= _length) {
return 0; /* read nothing */
}
-
if ((to_read = min (cnt, _length - internal_offset)) == 0) {
return 0; /* read nothing */
if (_flags & FadeIn) {
- jack_nframes_t fade_in_length = (jack_nframes_t) _fade_in.back()->when;
+ nframes_t fade_in_length = (nframes_t) _fade_in.back()->when;
/* see if this read is within the fade in */
if (internal_offset < fade_in_length) {
- jack_nframes_t limit;
+ nframes_t limit;
limit = min (to_read, fade_in_length - internal_offset);
_fade_in.get_vector (internal_offset, internal_offset+limit, gain_buffer, limit);
- for (jack_nframes_t n = 0; n < limit; ++n) {
+ for (nframes_t n = 0; n < limit; ++n) {
mixdown_buffer[n] *= gain_buffer[n];
}
}
if (_flags & FadeOut) {
-
-
-
/* see if some part of this read is within the fade out */
/* ................. >| REGION
*/
- jack_nframes_t fade_out_length = (jack_nframes_t) _fade_out.back()->when;
- jack_nframes_t fade_interval_start = max(internal_offset, _length-fade_out_length);
- jack_nframes_t fade_interval_end = min(internal_offset + to_read, _length);
+ nframes_t fade_out_length = (nframes_t) _fade_out.back()->when;
+ nframes_t fade_interval_start = max(internal_offset, _length-fade_out_length);
+ nframes_t fade_interval_end = min(internal_offset + to_read, _length);
if (fade_interval_end > fade_interval_start) {
/* (part of the) the fade out is in this buffer */
- jack_nframes_t limit = fade_interval_end - fade_interval_start;
- jack_nframes_t curve_offset = fade_interval_start - (_length-fade_out_length);
- jack_nframes_t fade_offset = fade_interval_start - internal_offset;
+ nframes_t limit = fade_interval_end - fade_interval_start;
+ nframes_t curve_offset = fade_interval_start - (_length-fade_out_length);
+ nframes_t fade_offset = fade_interval_start - internal_offset;
_fade_out.get_vector (curve_offset,curve_offset+limit, gain_buffer, limit);
- for (jack_nframes_t n = 0, m = fade_offset; n < limit; ++n, ++m) {
+ for (nframes_t n = 0, m = fade_offset; n < limit; ++n, ++m) {
mixdown_buffer[m] *= gain_buffer[n];
}
}
_envelope.get_vector (internal_offset, internal_offset + to_read, gain_buffer, to_read);
if (_scale_amplitude != 1.0f) {
- for (jack_nframes_t n = 0; n < to_read; ++n) {
+ for (nframes_t n = 0; n < to_read; ++n) {
mixdown_buffer[n] *= gain_buffer[n] * _scale_amplitude;
}
} else {
- for (jack_nframes_t n = 0; n < to_read; ++n) {
+ for (nframes_t n = 0; n < to_read; ++n) {
mixdown_buffer[n] *= gain_buffer[n];
}
}
buf += buf_offset;
- for (jack_nframes_t n = 0; n < to_read; ++n) {
+ for (nframes_t n = 0; n < to_read; ++n) {
buf[n] += mixdown_buffer[n];
}
}
for (uint32_t n=0; n < _sources.size(); ++n) {
snprintf (buf2, sizeof(buf2), "source-%d", n);
- _sources[n]->id().print (buf);
+ _sources[n]->id().print (buf, sizeof (buf));
node.add_property (buf2, buf);
}
void
AudioRegion::set_fade_in_shape (FadeShape shape)
{
- set_fade_in (shape, (jack_nframes_t) _fade_in.back()->when);
+ set_fade_in (shape, (nframes_t) _fade_in.back()->when);
}
void
AudioRegion::set_fade_out_shape (FadeShape shape)
{
- set_fade_out (shape, (jack_nframes_t) _fade_out.back()->when);
+ set_fade_out (shape, (nframes_t) _fade_out.back()->when);
}
void
-AudioRegion::set_fade_in (FadeShape shape, jack_nframes_t len)
+AudioRegion::set_fade_in (FadeShape shape, nframes_t len)
{
_fade_in.freeze ();
_fade_in.clear ();
}
void
-AudioRegion::set_fade_out (FadeShape shape, jack_nframes_t len)
+AudioRegion::set_fade_out (FadeShape shape, nframes_t len)
{
_fade_out.freeze ();
_fade_out.clear ();
}
void
-AudioRegion::set_fade_in_length (jack_nframes_t len)
+AudioRegion::set_fade_in_length (nframes_t len)
{
bool changed = _fade_in.extend_to (len);
}
void
-AudioRegion::set_fade_out_length (jack_nframes_t len)
+AudioRegion::set_fade_out_length (nframes_t len)
{
bool changed = _fade_out.extend_to (len);
int
AudioRegion::exportme (Session& session, AudioExportSpecification& spec)
{
- const jack_nframes_t blocksize = 4096;
- jack_nframes_t to_read;
+ const nframes_t blocksize = 4096;
+ nframes_t to_read;
int status = -1;
spec.channels = _sources.size();
goto out;
}
- for (jack_nframes_t x = 0; x < to_read; ++x) {
+ for (nframes_t x = 0; x < to_read; ++x) {
spec.dataF[chan+(x*spec.channels)] = buf[x];
}
}
void
AudioRegion::normalize_to (float target_dB)
{
- const jack_nframes_t blocksize = 64 * 1024;
+ const nframes_t blocksize = 64 * 1024;
Sample buf[blocksize];
- jack_nframes_t fpos;
- jack_nframes_t fend;
- jack_nframes_t to_read;
+ nframes_t fpos;
+ nframes_t fend;
+ nframes_t to_read;
double maxamp = 0;
gain_t target = dB_to_coefficient (target_dB);
void
AudioRegion::source_offset_changed ()
{
- set_position (source()->natural_position() + start(), this);
+ if (boost::dynamic_pointer_cast<DestructiveFileSource>(_sources.front())) {
+ set_start (source()->natural_position(), this);
+ set_position (source()->natural_position(), this);
+ }
}
boost::shared_ptr<AudioSource>
int region_read_peaks_from_c (void *arg, uint32_t npeaks, uint32_t start, uint32_t cnt, intptr_t data, uint32_t n_chan, double samples_per_unit)
{
- return ((AudioRegion *) arg)->read_peaks ((PeakData *) data, (jack_nframes_t) npeaks, (jack_nframes_t) start, (jack_nframes_t) cnt, n_chan,samples_per_unit);
+ return ((AudioRegion *) arg)->read_peaks ((PeakData *) data, (nframes_t) npeaks, (nframes_t) start, (nframes_t) cnt, n_chan,samples_per_unit);
}
uint32_t region_length_from_c (void *arg)
#include <fcntl.h>
#include <poll.h>
#include <float.h>
+#include <utime.h>
#include <cerrno>
#include <ctime>
#include <cmath>
pthread_t AudioSource::peak_thread;
bool AudioSource::have_peak_thread = false;
-vector<AudioSource*> AudioSource::pending_peak_sources;
+vector<boost::shared_ptr<AudioSource> > AudioSource::pending_peak_sources;
Glib::Mutex* AudioSource::pending_peak_sources_lock = 0;
int AudioSource::peak_request_pipe[2];
while (!pending_peak_sources.empty()) {
- AudioSource* s = pending_peak_sources.front();
+ boost::shared_ptr<AudioSource> s = pending_peak_sources.front();
pending_peak_sources.erase (pending_peak_sources.begin());
pending_peak_sources_lock->unlock ();
}
void
-AudioSource::queue_for_peaks (AudioSource* source)
+AudioSource::queue_for_peaks (boost::shared_ptr<AudioSource> source)
{
if (have_peak_thread) {
return ret;
}
+void
+AudioSource::touch_peakfile ()
+{
+ struct stat statbuf;
+
+ if (stat (peakpath.c_str(), &statbuf) != 0 || statbuf.st_size == 0) {
+ return;
+ }
+
+ struct utimbuf tbuf;
+
+ tbuf.actime = statbuf.st_atime;
+ tbuf.modtime = time ((time_t) 0);
+
+ utime (peakpath.c_str(), &tbuf);
+}
+
int
AudioSource::rename_peakfile (string newpath)
{
error << string_compose(_("AudioSource: cannot stat peakfile \"%1\""), peakpath) << endmsg;
return -1;
}
-
} else {
/* we found it in the peaks dir */
}
}
}
-
+
if (!newfile && !_peaks_built && _build_missing_peakfiles && _build_peakfiles) {
build_peaks_from_scratch ();
}
-
+
return 0;
}
-jack_nframes_t
-AudioSource::read (Sample *dst, jack_nframes_t start, jack_nframes_t cnt) const
+nframes_t
+AudioSource::read (Sample *dst, nframes_t start, nframes_t cnt) const
{
Glib::Mutex::Lock lm (_lock);
return read_unlocked (dst, start, cnt);
}
-jack_nframes_t
-AudioSource::write (Sample *dst, jack_nframes_t cnt)
+nframes_t
+AudioSource::write (Sample *dst, nframes_t cnt)
{
Glib::Mutex::Lock lm (_lock);
return write_unlocked (dst, cnt);
}
int
-AudioSource::read_peaks (PeakData *peaks, jack_nframes_t npeaks, jack_nframes_t start, jack_nframes_t cnt, double samples_per_visual_peak) const
+AudioSource::read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nframes_t cnt, double samples_per_visual_peak) const
{
Glib::Mutex::Lock lm (_lock);
double scale;
PeakData::PeakDatum xmin;
int32_t to_read;
uint32_t nread;
- jack_nframes_t zero_fill = 0;
+ nframes_t zero_fill = 0;
int ret = -1;
PeakData* staging = 0;
Sample* raw_staging = 0;
if (cnt > _length - start) {
// cerr << "too close to end @ " << _length << " given " << start << " + " << cnt << endl;
cnt = _length - start;
- jack_nframes_t old = npeaks;
- npeaks = min ((jack_nframes_t) floor (cnt / samples_per_visual_peak), npeaks);
+ nframes_t old = npeaks;
+ npeaks = min ((nframes_t) floor (cnt / samples_per_visual_peak), npeaks);
zero_fill = old - npeaks;
}
if (npeaks == cnt) {
- // cerr << "RAW DATA\n";
+ cerr << "RAW DATA\n";
/* no scaling at all, just get the sample data and duplicate it for
both max and min peak values.
return -1;
}
- for (jack_nframes_t i = 0; i < npeaks; ++i) {
+ for (nframes_t i = 0; i < npeaks; ++i) {
peaks[i].max = raw_staging[i];
peaks[i].min = raw_staging[i];
}
}
- jack_nframes_t tnp;
+ nframes_t tnp;
if (scale < 1.0) {
/* compute the rounded up frame position */
- jack_nframes_t current_frame = start;
- jack_nframes_t current_stored_peak = (jack_nframes_t) ceil (current_frame / (double) frames_per_peak);
+ nframes_t current_frame = start;
+ nframes_t current_stored_peak = (nframes_t) ceil (current_frame / (double) frames_per_peak);
uint32_t next_visual_peak = (uint32_t) ceil (current_frame / samples_per_visual_peak);
double next_visual_peak_frame = next_visual_peak * samples_per_visual_peak;
- uint32_t stored_peak_before_next_visual_peak = (jack_nframes_t) next_visual_peak_frame / frames_per_peak;
+ uint32_t stored_peak_before_next_visual_peak = (nframes_t) next_visual_peak_frame / frames_per_peak;
uint32_t nvisual_peaks = 0;
uint32_t stored_peaks_read = 0;
uint32_t i = 0;
if (i == stored_peaks_read) {
uint32_t start_byte = current_stored_peak * sizeof(PeakData);
- tnp = min ((_length/frames_per_peak - current_stored_peak), (jack_nframes_t) expected_peaks);
+ tnp = min ((_length/frames_per_peak - current_stored_peak), (nframes_t) expected_peaks);
to_read = min (chunksize, tnp);
off_t fend = lseek (peakfile, 0, SEEK_END);
data on the fly.
*/
- jack_nframes_t frames_read = 0;
- jack_nframes_t current_frame = start;
- jack_nframes_t i = 0;
- jack_nframes_t nvisual_peaks = 0;
- jack_nframes_t chunksize = (jack_nframes_t) min (cnt, (jack_nframes_t) 4096);
+ nframes_t frames_read = 0;
+ nframes_t current_frame = start;
+ nframes_t i = 0;
+ nframes_t nvisual_peaks = 0;
+ nframes_t chunksize = (nframes_t) min (cnt, (nframes_t) 4096);
raw_staging = new Sample[chunksize];
- jack_nframes_t frame_pos = start;
+ nframes_t frame_pos = start;
double pixel_pos = floor (frame_pos / samples_per_visual_peak);
double next_pixel_pos = ceil (frame_pos / samples_per_visual_peak);
double pixels_per_frame = 1.0 / samples_per_visual_peak;
if (i == frames_read) {
to_read = min (chunksize, (_length - current_frame));
-
+
if ((frames_read = read_unlocked (raw_staging, current_frame, to_read)) == 0) {
error << string_compose(_("AudioSource[%1]: peak read - cannot read %2 samples at offset %3")
, _name, to_read, current_frame)
}
int
-AudioSource::do_build_peak (jack_nframes_t first_frame, jack_nframes_t cnt)
+AudioSource::do_build_peak (nframes_t first_frame, nframes_t cnt)
{
- jack_nframes_t current_frame;
+ nframes_t current_frame;
Sample buf[frames_per_peak];
Sample xmin, xmax;
uint32_t peaki;
PeakData* peakbuf;
- jack_nframes_t frames_read;
- jack_nframes_t frames_to_read;
+ nframes_t frames_read;
+ nframes_t frames_to_read;
off_t first_peak_byte;
int peakfile = -1;
int ret = -1;
xmin = buf[0];
xmax = buf[0];
- for (jack_nframes_t n = 1; n < frames_read; ++n) {
+ for (nframes_t n = 1; n < frames_read; ++n) {
xmax = max (xmax, buf[n]);
xmin = min (xmin, buf[n]);
next_peak_clear_should_notify = true;
pending_peak_builds.push_back (new PeakBuildRecord (0, _length));
- queue_for_peaks (this);
+ queue_for_peaks (shared_from_this());
}
bool
}
}
-jack_nframes_t
+nframes_t
AudioSource::available_peaks (double zoom_factor) const
{
int peakfile;
}
int
-Auditioner::play_audition (jack_nframes_t nframes)
+Auditioner::play_audition (nframes_t nframes)
{
bool need_butler;
- jack_nframes_t this_nframes;
+ nframes_t this_nframes;
int ret;
if (g_atomic_int_get (&_active) == 0) {
XMLNode *pointnode = new XMLNode ("point");
- snprintf (buf, sizeof (buf), "%" PRIu32, (jack_nframes_t) floor ((*i)->when));
+ snprintf (buf, sizeof (buf), "%" PRIu32, (nframes_t) floor ((*i)->when));
pointnode->add_property ("x", buf);
snprintf (buf, sizeof (buf), "%.12g", (*i)->value);
pointnode->add_property ("y", buf);
const XMLNodeList& elist = node.children();
XMLNodeConstIterator i;
XMLProperty* prop;
- jack_nframes_t x;
+ nframes_t x;
double y;
clear ();
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
- user_configuration (false)
+ current_owner (ConfigVariableBase::Default)
{
_control_protocol_state = 0;
}
{
}
+void
+Configuration::set_current_owner (ConfigVariableBase::Owner owner)
+{
+ current_owner = owner;
+}
+
int
Configuration::load_state ()
{
return -1;
}
+ current_owner = ConfigVariableBase::System;
+
if (set_state (*tree.root())) {
error << string_compose(_("Ardour: system configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
return -1;
}
}
- /* from this point on, all configuration changes are user driven */
-
- user_configuration = true;
/* now load configuration file for user */
return -1;
}
+ current_owner = ConfigVariableBase::Config;
+
if (set_state (*tree.root())) {
error << string_compose(_("Ardour: user configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
return -1;
XMLTree tree;
string rcfile;
- /* Note: this only writes the per-user file, and therefore
- only saves variables marked as user-set or modified
- */
-
rcfile = get_user_ardour_path ();
rcfile += "ardour.rc";
if (rcfile.length()) {
- tree.set_root (&state (true));
+ tree.set_root (&get_state());
if (!tree.write (rcfile.c_str())){
error << string_compose (_("Config file %1 not saved"), rcfile) << endmsg;
return -1;
return 0;
}
-XMLNode&
-Configuration::get_state ()
+bool
+Configuration::save_config_options_predicate (ConfigVariableBase::Owner owner)
{
- return state (false);
+ /* only save things that were in the config file to start with */
+ return owner & ConfigVariableBase::Config;
}
XMLNode&
-Configuration::state (bool user_only)
+Configuration::get_state ()
{
- XMLNode* root = new XMLNode("Ardour");
+ XMLNode* root;
LocaleGuard lg (X_("POSIX"));
+ root = new XMLNode("Ardour");
typedef map<string, MidiPortDescriptor*>::const_iterator CI;
for(CI m = midi_ports.begin(); m != midi_ports.end(); ++m){
root->add_child_nocopy(m->second->get_state());
}
-
- XMLNode* node = new XMLNode("Config");
+ root->add_child_nocopy (get_variables (sigc::mem_fun (*this, &Configuration::save_config_options_predicate)));
+
+ if (_extra_xml) {
+ root->add_child_copy (*_extra_xml);
+ }
+
+ root->add_child_nocopy (ControlProtocolManager::instance().get_state());
+ root->add_child_nocopy (Library->get_state());
+
+ return *root;
+}
+
+XMLNode&
+Configuration::get_variables (sigc::slot<bool,ConfigVariableBase::Owner> predicate)
+{
+ XMLNode* node;
+ LocaleGuard lg (X_("POSIX"));
+
+ node = new XMLNode("Config");
+
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
#define CONFIG_VARIABLE(type,var,name,value) \
- if (!user_only || var.is_user()) var.add_to_node (*node);
+ if (predicate (var.owner())) { var.add_to_node (*node); }
#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) \
- if (!user_only || var.is_user()) var.add_to_node (*node);
+ if (predicate (var.owner())) { var.add_to_node (*node); }
#include "ardour/configuration_vars.h"
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
-
- root->add_child_nocopy (*node);
-
- if (_extra_xml) {
- root->add_child_copy (*_extra_xml);
- }
-
- root->add_child_nocopy (ControlProtocolManager::instance().get_state());
- root->add_child_nocopy (Library->get_state());
-
- return *root;
+
+ return *node;
}
int
}
} else if (node->name() == "Config") {
-
-#undef CONFIG_VARIABLE
-#undef CONFIG_VARIABLE_SPECIAL
-#define CONFIG_VARIABLE(type,var,name,value) \
- var.set_from_node (*node); \
- var.set_is_user (user_configuration);
-#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) \
- var.set_from_node (*node); \
- var.set_is_user (user_configuration);
-#include "ardour/configuration_vars.h"
-#undef CONFIG_VARIABLE
-#undef CONFIG_VARIABLE_SPECIAL
+
+ set_variables (*node, ConfigVariableBase::Config);
} else if (node->name() == "extra") {
_extra_xml = new XMLNode (*node);
return 0;
}
+void
+Configuration::set_variables (const XMLNode& node, ConfigVariableBase::Owner owner)
+{
+#undef CONFIG_VARIABLE
+#undef CONFIG_VARIABLE_SPECIAL
+#define CONFIG_VARIABLE(type,var,name,value) \
+ if (var.set_from_node (node, owner)) { \
+ ParameterChanged (name); \
+ }
+#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) \
+ if (var.set_from_node (node, owner)) { \
+ ParameterChanged (name); \
+ }
+#include "ardour/configuration_vars.h"
+#undef CONFIG_VARIABLE
+#undef CONFIG_VARIABLE_SPECIAL
+
+}
+
Configuration::MidiPortDescriptor::MidiPortDescriptor (const XMLNode& node)
{
const XMLProperty *prop;
return *root;
}
+void
+Configuration::map_parameters (sigc::slot<void,const char*> theSlot)
+{
+#undef CONFIG_VARIABLE
+#undef CONFIG_VARIABLE_SPECIAL
+#define CONFIG_VARIABLE(type,var,name,value) theSlot (name);
+#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) theSlot (name);
+#include "ardour/configuration_vars.h"
+#undef CONFIG_VARIABLE
+#undef CONFIG_VARIABLE_SPECIAL
+}
instantiate (**i);
(*i)->requested = false;
- if ((*i)->state) {
+ if ((*i)->protocol && (*i)->state) {
(*i)->protocol->set_state (*(*i)->state);
}
}
Glib::Mutex::Lock lm (protocols_lock);
control_protocols.push_back (cpi.protocol);
+ if (cpi.state) {
+ cpi.protocol->set_state (*cpi.state);
+ }
+
return cpi.protocol;
}
vector<string *> *found;
PathScanner scanner;
- cerr << "looking for control protocols in " << path << endl;
+ info << string_compose (_("looking for control protocols in %1"), path) << endmsg;
found = scanner (path, protocol_filter, 0, false, true);
cpi->protocol = 0;
cpi->requested = false;
cpi->mandatory = descriptor->mandatory;
+ cpi->supports_feedback = descriptor->supports_feedback;
cpi->state = 0;
control_protocol_info.push_back (cpi);
for (citer = clist.begin(); citer != clist.end(); ++citer) {
if ((*citer)->name() == X_("Protocol")) {
+
prop = (*citer)->property (X_("active"));
+
if (prop && prop->value() == X_("yes")) {
if ((prop = (*citer)->property (X_("name"))) != 0) {
ControlProtocolInfo* cpi = cpi_by_name (prop->value());
if (cpi) {
+
+ if (!(*citer)->children().empty()) {
+ cpi->state = (*citer)->children().front ();
+ } else {
+ cpi->state = 0;
+ }
+
if (_session) {
instantiate (*cpi);
} else {
return *root;
}
+
+void
+ControlProtocolManager::set_protocol_states (const XMLNode& node)
+{
+ XMLNodeList nlist;
+ XMLNodeConstIterator niter;
+ XMLProperty* prop;
+
+ nlist = node.children();
+
+ for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
+
+ XMLNode* child = (*niter);
+
+ if ((prop = child->property ("name")) == 0) {
+ error << _("control protocol XML node has no name property. Ignored.") << endmsg;
+ continue;
+ }
+
+ ControlProtocolInfo* cpi = cpi_by_name (prop->value());
+
+ if (!cpi) {
+ warning << string_compose (_("control protocol \"%1\" is not known. Ignored"), prop->value()) << endmsg;
+ continue;
+ }
+
+ /* copy the node so that ownership is clear */
+
+ cpi->state = new XMLNode (*child);
+ }
+}
}
if (_build_peakfiles) {
- if (initialize_peakfile (false, _path)) {
- error << string_compose("CoreAudioSource: initialize peakfile failed (%1)", name()) << endmsg;
- throw failed_constructor ();
- }
+ _need_peakfile = true;
}
}
cerr << "deletion done" << endl;
}
-jack_nframes_t
-CoreAudioSource::read_unlocked (Sample *dst, jack_nframes_t start, jack_nframes_t cnt) const
+nframes_t
+CoreAudioSource::read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const
{
try {
af.Seek (start);
}
int
-CoreAudioSource::update_header (jack_nframes_t when, struct tm&, time_t)
+CoreAudioSource::update_header (nframes_t when, struct tm&, time_t)
{
return 0;
}
using namespace ARDOUR;
using namespace PBD;
-jack_nframes_t Crossfade::_short_xfade_length = 0;
+nframes_t Crossfade::_short_xfade_length = 0;
Change Crossfade::ActiveChanged = new_change();
/* XXX if and when we ever implement parallel processing of the process()
Sample* Crossfade::crossfade_buffer_in = 0;
void
-Crossfade::set_buffer_size (jack_nframes_t sz)
+Crossfade::set_buffer_size (nframes_t sz)
{
if (crossfade_buffer_out) {
delete [] crossfade_buffer_out;
}
Crossfade::Crossfade (boost::shared_ptr<AudioRegion> in, boost::shared_ptr<AudioRegion> out,
- jack_nframes_t length,
- jack_nframes_t position,
+ nframes_t length,
+ nframes_t position,
AnchorPoint ap)
: _fade_in (0.0, 2.0, 1.0), // linear (gain coefficient) => -inf..+6dB
_fade_out (0.0, 2.0, 1.0) // linear (gain coefficient) => -inf..+6dB
{
boost::shared_ptr<AudioRegion> top;
boost::shared_ptr<AudioRegion> bottom;
- jack_nframes_t short_xfade_length;
+ nframes_t short_xfade_length;
short_xfade_length = _short_xfade_length;
return 0;
}
-jack_nframes_t
+nframes_t
Crossfade::read_at (Sample *buf, Sample *mixdown_buffer,
- float *gain_buffer, jack_nframes_t start, jack_nframes_t cnt, uint32_t chan_n,
- jack_nframes_t read_frames, jack_nframes_t skip_frames)
+ float *gain_buffer, nframes_t start, nframes_t cnt, uint32_t chan_n,
+ nframes_t read_frames, nframes_t skip_frames)
{
- jack_nframes_t offset;
- jack_nframes_t to_write;
+ nframes_t offset;
+ nframes_t to_write;
if (!_active) {
return 0;
position and length, and so we know precisely how much data they could return.
*/
- for (jack_nframes_t n = 0; n < to_write; ++n) {
+ for (nframes_t n = 0; n < to_write; ++n) {
buf[n] = (crossfade_buffer_out[n] * fov[n]) + (crossfade_buffer_in[n] * fiv[n]);
}
}
OverlapType
-Crossfade::coverage (jack_nframes_t start, jack_nframes_t end) const
+Crossfade::coverage (nframes_t start, nframes_t end) const
{
- jack_nframes_t my_end = _position + _length;
+ nframes_t my_end = _position + _length;
if ((start >= _position) && (end <= my_end)) {
return OverlapInternal;
bool
Crossfade::update (bool force)
{
- jack_nframes_t newlen;
+ nframes_t newlen;
bool save = false;
if (_follow_overlap) {
char buf[64];
LocaleGuard lg (X_("POSIX"));
- _out->id().print (buf);
+ _out->id().print (buf, sizeof (buf));
node->add_property ("out", buf);
- _in->id().print (buf);
+ _in->id().print (buf, sizeof (buf));
node->add_property ("in", buf);
node->add_property ("active", (_active ? "yes" : "no"));
node->add_property ("follow-overlap", (_follow_overlap ? "yes" : "no"));
pnode = new XMLNode ("point");
- snprintf (buf, sizeof (buf), "%" PRIu32, (jack_nframes_t) floor ((*ii)->when));
+ snprintf (buf, sizeof (buf), "%" PRIu32, (nframes_t) floor ((*ii)->when));
pnode->add_property ("x", buf);
snprintf (buf, sizeof (buf), "%.12g", (*ii)->value);
pnode->add_property ("y", buf);
pnode = new XMLNode ("point");
- snprintf (buf, sizeof (buf), "%" PRIu32, (jack_nframes_t) floor ((*ii)->when));
+ snprintf (buf, sizeof (buf), "%" PRIu32, (nframes_t) floor ((*ii)->when));
pnode->add_property ("x", buf);
snprintf (buf, sizeof (buf), "%.12g", (*ii)->value);
pnode->add_property ("y", buf);
for (i = children.begin(); i != children.end(); ++i) {
if ((*i)->name() == "point") {
- jack_nframes_t x;
+ nframes_t x;
float y;
prop = (*i)->property ("x");
for (i = children.begin(); i != children.end(); ++i) {
if ((*i)->name() == "point") {
- jack_nframes_t x;
+ nframes_t x;
float y;
XMLProperty* prop;
}
}
-jack_nframes_t
-Crossfade::set_length (jack_nframes_t len)
+nframes_t
+Crossfade::set_length (nframes_t len)
{
- jack_nframes_t limit;
+ nframes_t limit;
switch (_anchor_point) {
case StartOfIn:
return len;
}
-jack_nframes_t
+nframes_t
Crossfade::overlap_length () const
{
if (_fixed) {
}
void
-Crossfade::set_short_xfade_length (jack_nframes_t n)
+Crossfade::set_short_xfade_length (nframes_t n)
{
_short_xfade_length = n;
}
0, 0,
};
-const jack_nframes_t Session::default_click_emphasis_length = sizeof (default_click_emphasis) / sizeof (default_click_emphasis[0]);
+const nframes_t Session::default_click_emphasis_length = sizeof (default_click_emphasis) / sizeof (default_click_emphasis[0]);
const Sample Session::default_click[] = {
0, -0.014312744, -0.03338623, 0.019165039, 0.042541504,
0, 0, 0, 0, 0, 0, 0, 0,
};
-const jack_nframes_t Session::default_click_length = sizeof (default_click) / sizeof (default_click[0]);
+const nframes_t Session::default_click_length = sizeof (default_click) / sizeof (default_click[0]);
gain_t* DestructiveFileSource::out_coefficient = 0;
gain_t* DestructiveFileSource::in_coefficient = 0;
-jack_nframes_t DestructiveFileSource::xfade_frames = 64;
+nframes_t DestructiveFileSource::xfade_frames = 64;
-DestructiveFileSource::DestructiveFileSource (Session& s, string path, SampleFormat samp_format, HeaderFormat hdr_format, jack_nframes_t rate, Flag flags)
+DestructiveFileSource::DestructiveFileSource (Session& s, string path, SampleFormat samp_format, HeaderFormat hdr_format, nframes_t rate, Flag flags)
: SndFileSource (s, path, samp_format, hdr_format, rate, flags)
{
init ();
}
void
-DestructiveFileSource::setup_standard_crossfades (jack_nframes_t rate)
+DestructiveFileSource::setup_standard_crossfades (nframes_t rate)
{
/* This static method is assumed to have been called by the Session
before any DFS's are created.
*/
- xfade_frames = (jack_nframes_t) floor ((Config->get_destructive_xfade_msecs () / 1000.0) * rate);
+ xfade_frames = (nframes_t) floor ((Config->get_destructive_xfade_msecs () / 1000.0) * rate);
if (out_coefficient) {
delete [] out_coefficient;
}
void
-DestructiveFileSource::mark_capture_start (jack_nframes_t pos)
+DestructiveFileSource::mark_capture_start (nframes_t pos)
{
if (pos < timeline_position) {
_capture_start = false;
_capture_end = false;
}
-jack_nframes_t
-DestructiveFileSource::crossfade (Sample* data, jack_nframes_t cnt, int fade_in)
+nframes_t
+DestructiveFileSource::crossfade (Sample* data, nframes_t cnt, int fade_in)
{
- jack_nframes_t xfade = min (xfade_frames, cnt);
- jack_nframes_t nofade = cnt - xfade;
+ nframes_t xfade = min (xfade_frames, cnt);
+ nframes_t nofade = cnt - xfade;
Sample* fade_data = 0;
- jack_nframes_t fade_position = 0; // in frames
+ nframes_t fade_position = 0; // in frames
ssize_t retval;
- jack_nframes_t file_cnt;
+ nframes_t file_cnt;
if (fade_in) {
fade_position = file_pos;
}
if (file_cnt) {
+
if ((retval = read_unlocked (xfade_buf, fade_position, file_cnt)) != (ssize_t) file_cnt) {
if (retval >= 0 && errno == EAGAIN) {
/* XXX - can we really trust that errno is meaningful here? yes POSIX, i'm talking to you.
}
if (file_cnt != xfade) {
- jack_nframes_t delta = xfade - file_cnt;
+ nframes_t delta = xfade - file_cnt;
memset (xfade_buf+file_cnt, 0, sizeof (Sample) * delta);
}
if (nofade && !fade_in) {
- if (write_float (data, file_pos - timeline_position, nofade) != nofade) {
+ if (write_float (data, file_pos, nofade) != nofade) {
error << string_compose(_("DestructiveFileSource: \"%1\" bad write (%2)"), _path, strerror (errno)) << endmsg;
return 0;
}
if (xfade == xfade_frames) {
- jack_nframes_t n;
+ nframes_t n;
/* use the standard xfade curve */
compute_equal_power_fades (xfade, in, out);
- for (jack_nframes_t n = 0; n < xfade; ++n) {
+ for (nframes_t n = 0; n < xfade; ++n) {
xfade_buf[n] = (xfade_buf[n] * out[n]) + (fade_data[n] * in[n]);
}
}
if (xfade) {
- if (write_float (xfade_buf, fade_position - timeline_position, xfade) != xfade) {
+ if (write_float (xfade_buf, fade_position, xfade) != xfade) {
error << string_compose(_("DestructiveFileSource: \"%1\" bad write (%2)"), _path, strerror (errno)) << endmsg;
return 0;
}
}
if (fade_in && nofade) {
- if (write_float (data + xfade, file_pos + xfade - timeline_position, nofade) != nofade) {
+ if (write_float (data + xfade, file_pos + xfade, nofade) != nofade) {
error << string_compose(_("DestructiveFileSource: \"%1\" bad write (%2)"), _path, strerror (errno)) << endmsg;
return 0;
}
return cnt;
}
-jack_nframes_t
-DestructiveFileSource::write_unlocked (Sample* data, jack_nframes_t cnt)
+nframes_t
+DestructiveFileSource::write_unlocked (Sample* data, nframes_t cnt)
{
- jack_nframes_t old_file_pos;
+ nframes_t old_file_pos;
if (!writable()) {
return 0;
file_pos = capture_start_frame;
// split cnt in half
- jack_nframes_t subcnt = cnt / 2;
- jack_nframes_t ofilepos = file_pos;
+ nframes_t subcnt = cnt / 2;
+ nframes_t ofilepos = file_pos;
// fade in
if (crossfade (data, subcnt, 1) != subcnt) {
_capture_end = false;
/* move to the correct location place */
- file_pos = capture_start_frame;
-
+ file_pos = capture_start_frame - timeline_position;
+
if (crossfade (data, cnt, 1) != cnt) {
return 0;
}
/* in the middle of recording */
- if (write_float (data, file_pos - timeline_position, cnt) != cnt) {
+
+ if (write_float (data, file_pos, cnt) != cnt) {
return 0;
}
}
}
if (_build_peakfiles) {
- queue_for_peaks (this);
+ queue_for_peaks (shared_from_this ());
}
return cnt;
}
-jack_nframes_t
+nframes_t
DestructiveFileSource::last_capture_start_frame () const
{
return capture_start_frame;
}
void
-DestructiveFileSource::set_timeline_position (jack_nframes_t pos)
+DestructiveFileSource::set_timeline_position (nframes_t pos)
{
//destructive track timeline postion does not change except at instantion or when header_position_offset (session start) changes
}
* default from configuration_vars.h). 0 is not a good value for
* allocating buffer sizes..
*/
-jack_nframes_t Diskstream::disk_io_chunk_frames = 1024 * 256;
+ARDOUR::nframes_t Diskstream::disk_io_chunk_frames = 1024 * 256;
-sigc::signal<void,list<boost::shared_ptr<Source> >*> Diskstream::DeleteSources;
sigc::signal<void> Diskstream::DiskOverrun;
sigc::signal<void> Diskstream::DiskUnderrun;
if (_seek_required) {
if (speed() != 1.0f || speed() != -1.0f) {
- seek ((jack_nframes_t) (_session.transport_frame() * (double) speed()), true);
+ seek ((nframes_t) (_session.transport_frame() * (double) speed()), true);
}
else {
seek (_session.transport_frame(), true);
if (new_speed != _actual_speed) {
- jack_nframes_t required_wrap_size = (jack_nframes_t) floor (_session.get_block_size() *
+ nframes_t required_wrap_size = (nframes_t) floor (_session.get_block_size() *
fabs (new_speed)) + 1;
if (required_wrap_size > wrap_buffer_size) {
return 0;
}
-jack_nframes_t
+ARDOUR::nframes_t
Diskstream::get_capture_start_frame (uint32_t n)
{
Glib::Mutex::Lock lm (capture_info_lock);
}
}
-jack_nframes_t
+ARDOUR::nframes_t
Diskstream::get_captured_frames (uint32_t n)
{
Glib::Mutex::Lock lm (capture_info_lock);
}
void
-Diskstream::set_roll_delay (jack_nframes_t nframes)
+Diskstream::set_roll_delay (ARDOUR::nframes_t nframes)
{
_roll_delay = nframes;
}
}
void
-Gain::fill_linear_volume_fade_in (Gain& gain, jack_nframes_t frames)
+Gain::fill_linear_volume_fade_in (Gain& gain, nframes_t frames)
{
}
void
-Gain::fill_linear_volume_fade_out (Gain& gain, jack_nframes_t frames)
+Gain::fill_linear_volume_fade_out (Gain& gain, nframes_t frames)
{
}
void
-Gain::fill_linear_fade_in (Gain& gain, jack_nframes_t frames)
+Gain::fill_linear_fade_in (Gain& gain, nframes_t frames)
{
}
void
-Gain::fill_linear_fade_out (Gain& gain, jack_nframes_t frames)
+Gain::fill_linear_fade_out (Gain& gain, nframes_t frames)
{
}
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
*/
#include <cstdio> // Needed so that libraptor (included in lrdf) won't complain
return c;
}
+string
+ARDOUR::get_ardour_revision ()
+{
+ return "$Rev$";
+}
+
string
ARDOUR::get_user_ardour_path ()
{
}
ARDOUR::OverlapType
-ARDOUR::coverage (jack_nframes_t sa, jack_nframes_t ea,
- jack_nframes_t sb, jack_nframes_t eb)
+ARDOUR::coverage (nframes_t sa, nframes_t ea,
+ nframes_t sb, nframes_t eb)
{
/* OverlapType returned reflects how the second (B)
range overlaps the first (A).
/* not sure where to put these */
-std::istream& operator>>(std::istream& o, HeaderFormat& hf) {
+template<class T>
+std::istream& int_to_type (std::istream& o, T& hf) {
int val;
o >> val;
- hf = (HeaderFormat) val;
+ hf = (T) val;
return o;
}
-std::istream& operator>>(std::istream& o, SampleFormat& sf) {
- int val;
- o >> val;
- sf = (SampleFormat) val;
- return o;
-}
+std::istream& operator>>(std::istream& o, HeaderFormat& var) { return int_to_type<HeaderFormat> (o, var); }
+std::istream& operator>>(std::istream& o, SampleFormat& var) { return int_to_type<SampleFormat> (o, var); }
+std::istream& operator>>(std::istream& o, AutoConnectOption& var) { return int_to_type<AutoConnectOption> (o, var); }
+std::istream& operator>>(std::istream& o, MonitorModel& var) { return int_to_type<MonitorModel> (o, var); }
+std::istream& operator>>(std::istream& o, EditMode& var) { return int_to_type<EditMode> (o, var); }
+std::istream& operator>>(std::istream& o, SoloModel& var) { return int_to_type<SoloModel> (o, var); }
+std::istream& operator>>(std::istream& o, LayerModel& var) { return int_to_type<LayerModel> (o, var); }
+std::istream& operator>>(std::istream& o, CrossfadeModel& var) { return int_to_type<CrossfadeModel> (o, var); }
+std::istream& operator>>(std::istream& o, SlaveSource& var) { return int_to_type<SlaveSource> (o, var); }
+std::istream& operator>>(std::istream& o, ShuttleBehaviour& var) { return int_to_type<ShuttleBehaviour> (o, var); }
+std::istream& operator>>(std::istream& o, ShuttleUnits& var) { return int_to_type<ShuttleUnits> (o, var); }
+
long n;
string basepath;
string sounds_dir;
- jack_nframes_t so_far;
+ nframes_t so_far;
char buf[PATH_MAX+1];
int ret = -1;
vector<string> new_paths;
}
void
-PluginInsert::set_block_size (jack_nframes_t nframes)
+PluginInsert::set_block_size (nframes_t nframes)
{
for (vector<boost::shared_ptr<Plugin> >::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
(*i)->set_block_size (nframes);
}
void
-PluginInsert::connect_and_run (BufferSet& bufs, jack_nframes_t nframes, jack_nframes_t offset, bool with_auto, jack_nframes_t now)
+PluginInsert::connect_and_run (BufferSet& bufs, nframes_t nframes, nframes_t offset, bool with_auto, nframes_t now)
{
uint32_t in_index = 0;
uint32_t out_index = 0;
}
void
-PluginInsert::automation_snapshot (jack_nframes_t now)
-{
- map<uint32_t,AutomationList*>::iterator li;
-
- for (li = parameter_automation.begin(); li != parameter_automation.end(); ++li) {
-
- AutomationList *alist = ((*li).second);
- if (alist != 0 && alist->automation_write ()) {
-
- float val = _plugins[0]->get_parameter ((*li).first);
- alist->rt_add (now, val);
- last_automation_snapshot = now;
- }
- }
-}
-
-void
-PluginInsert::transport_stopped (jack_nframes_t now)
+PluginInsert::transport_stopped (nframes_t now)
{
map<uint32_t,AutomationList*>::iterator li;
}
void
-PluginInsert::silence (jack_nframes_t nframes, jack_nframes_t offset)
+PluginInsert::silence (nframes_t nframes, nframes_t offset)
{
uint32_t in_index = 0;
uint32_t out_index = 0;
}
void
-PluginInsert::run (BufferSet& bufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset)
+PluginInsert::run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset)
{
if (active()) {
}
void
-PluginInsert::automation_run (BufferSet& bufs, jack_nframes_t nframes, jack_nframes_t offset)
+PluginInsert::automation_run (BufferSet& bufs, nframes_t nframes, nframes_t offset)
{
ControlEvent next_event (0, 0.0f);
- jack_nframes_t now = _session.transport_frame ();
- jack_nframes_t end = now + nframes;
+ nframes_t now = _session.transport_frame ();
+ nframes_t end = now + nframes;
Glib::Mutex::Lock lm (_automation_lock, Glib::TRY_LOCK);
while (nframes) {
- jack_nframes_t cnt = min (((jack_nframes_t) floor (next_event.when) - now), nframes);
+ nframes_t cnt = min (((nframes_t) floor (next_event.when) - now), nframes);
connect_and_run (bufs, cnt, offset, true, now);
if (s != al.automation_state()) {
al.set_automation_state (s);
- last_automation_snapshot = 0;
_session.set_dirty ();
}
}
return _plugins[0]->describe_parameter (what);
}
-jack_nframes_t
+ARDOUR::nframes_t
PluginInsert::latency()
{
return _plugins[0]->latency ();
}
void
-PortInsert::run (BufferSet& bufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset)
+PortInsert::run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset)
{
if (n_outputs().get(_default_type) == 0) {
return;
return 0;
}
-jack_nframes_t
+ARDOUR::nframes_t
PortInsert::latency()
{
/* because we deliver and collect within the same cycle,
using namespace ARDOUR;
using namespace PBD;
-
static float current_automation_version_number = 1.0;
-jack_nframes_t IO::_automation_interval = 0;
const string IO::state_node_name = "IO";
bool IO::connecting_legal = false;
bool IO::ports_legal = false;
_output_buffers(new BufferSet()),
_name (name),
_default_type(default_type),
- _gain_control (*this),
+ _gain_control (X_("gaincontrol"), *this),
_gain_automation_curve (0.0, 2.0, 1.0),
_input_minimum (ChanCount::ZERO),
_input_maximum (ChanCount::INFINITE),
deferred_state = 0;
apply_gain_automation = false;
-
- last_automation_snapshot = 0;
-
+
_gain_automation_state = Off;
_gain_automation_style = Absolute;
}
void
-IO::silence (jack_nframes_t nframes, jack_nframes_t offset)
+IO::silence (nframes_t nframes, nframes_t offset)
{
/* io_lock, not taken: function must be called from Session::process() calltree */
* to the outputs, eg applying gain or pan or whatever else needs to be done.
*/
void
-IO::deliver_output (BufferSet& bufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset)
+IO::deliver_output (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset)
{
// FIXME: type specific code doesn't actually need to be here, it will go away in time
-
/* ********** AUDIO ********** */
if (dm.locked()) {
dg = _desired_gain;
}
+
}
Amp::run(bufs, nframes, _gain, dg, _phase_invert);
}
void
-IO::collect_input (BufferSet& outs, jack_nframes_t nframes, jack_nframes_t offset)
+IO::collect_input (BufferSet& outs, nframes_t nframes, nframes_t offset)
{
assert(outs.available() >= n_inputs());
}
void
-IO::just_meter_input (jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t nframes, jack_nframes_t offset)
+IO::just_meter_input (nframes_t start_frame, nframes_t end_frame,
+ nframes_t nframes, nframes_t offset)
{
BufferSet& bufs = _session.get_scratch_buffers (n_inputs());
Glib::Mutex::Lock lm (io_lock);
node->add_property("name", _name);
- id().print (buf);
+ id().print (buf, sizeof (buf));
node->add_property("id", buf);
str = "";
}
node->add_child_nocopy (_panner->state (full_state));
+ node->add_child_nocopy (_gain_control.get_state ());
snprintf (buf, sizeof(buf), "%2.12f", gain());
node->add_property ("gain", buf);
}
for (iter = node.children().begin(); iter != node.children().end(); ++iter) {
+
if ((*iter)->name() == "Panner") {
_panner->set_state (**iter);
}
+
+ if ((*iter)->name() == X_("gaincontrol")) {
+ _gain_control.set_state (**iter);
+ _session.add_controllable (&_gain_control);
+ }
}
if ((prop = node.property ("automation-state")) != 0) {
}
void
-IO::set_port_latency (jack_nframes_t nframes)
+IO::set_port_latency (nframes_t nframes)
{
Glib::Mutex::Lock lm (io_lock);
}
}
-jack_nframes_t
+nframes_t
IO::output_latency () const
{
- jack_nframes_t max_latency;
- jack_nframes_t latency;
+ nframes_t max_latency;
+ nframes_t latency;
max_latency = 0;
return max_latency;
}
-jack_nframes_t
+nframes_t
IO::input_latency () const
{
- jack_nframes_t max_latency;
- jack_nframes_t latency;
+ nframes_t max_latency;
+ nframes_t latency;
max_latency = 0;
void
IO::meter ()
{
- // FIXME: Remove this function and just connect signal directly to PeakMeter::meter
+ // FIXME: Ugly. Meter should manage the lock, if it's necessary
Glib::Mutex::Lock lm (io_lock); // READER: meter thread.
_meter->meter();
/* XXX use apply_to_points to get thread safety */
for (AutomationList::iterator i = _gain_automation_curve.begin(); i != _gain_automation_curve.end(); ++i) {
- out << "g " << (jack_nframes_t) floor ((*i)->when) << ' ' << (*i)->value << endl;
+ out << "g " << (nframes_t) floor ((*i)->when) << ' ' << (*i)->value << endl;
}
_panner->save ();
while (in.getline (line, sizeof(line), '\n')) {
char type;
- jack_nframes_t when;
+ nframes_t when;
double value;
if (++linecnt == 1) {
if (state != _gain_automation_curve.automation_state()) {
changed = true;
- last_automation_snapshot = 0;
_gain_automation_curve.set_automation_state (state);
if (state != Off) {
}
void
-IO::automation_snapshot (jack_nframes_t now)
-{
- if (last_automation_snapshot > now || (now - last_automation_snapshot) > _automation_interval) {
-
- if (gain_automation_recording()) {
- _gain_automation_curve.rt_add (now, gain());
- }
-
- _panner->snapshot (now);
-
- last_automation_snapshot = now;
- }
-}
-
-void
-IO::transport_stopped (jack_nframes_t frame)
+IO::transport_stopped (nframes_t frame)
{
_gain_automation_curve.reposition_for_rt_add (frame);
: jack (j)
{
float x;
- jack_nframes_t p;
+ nframes_t p;
/* call this to initialize things */
speed_and_position (x, p);
}
}
bool
-JACK_Slave::speed_and_position (float& sp, jack_nframes_t& position)
+JACK_Slave::speed_and_position (float& sp, nframes_t& position)
{
jack_position_t pos;
jack_transport_state_t state;
$Id$
*/
+#define __STDC_FORMAT_MACROS 1
+#include <inttypes.h>
+
#include <vector>
#include <string>
using namespace ARDOUR;
using namespace PBD;
-LadspaPlugin::LadspaPlugin (void *mod, AudioEngine& e, Session& session, uint32_t index, jack_nframes_t rate)
+LadspaPlugin::LadspaPlugin (void *mod, AudioEngine& e, Session& session, uint32_t index, nframes_t rate)
: Plugin (e, session)
{
init (mod, index, rate);
}
void
-LadspaPlugin::init (void *mod, uint32_t index, jack_nframes_t rate)
+LadspaPlugin::init (void *mod, uint32_t index, nframes_t rate)
{
LADSPA_Descriptor_Function dfunc;
uint32_t i, port_cnt;
}
}
-jack_nframes_t
+ARDOUR::nframes_t
LadspaPlugin::latency () const
{
if (latency_control_port) {
- return (jack_nframes_t) floor (*latency_control_port);
+ return (nframes_t) floor (*latency_control_port);
} else {
return 0;
}
}
int
-LadspaPlugin::connect_and_run (BufferSet& bufs, uint32_t& in_index, uint32_t& out_index, jack_nframes_t nframes, jack_nframes_t offset)
+LadspaPlugin::connect_and_run (BufferSet& bufs, uint32_t& in_index, uint32_t& out_index, nframes_t nframes, nframes_t offset)
{
uint32_t port_index = 0;
cycles_t then, now;
}
void
-LadspaPlugin::run (jack_nframes_t nframes)
+LadspaPlugin::run (nframes_t nframes)
{
for (uint32_t i = 0; i < parameter_count(); ++i) {
if (LADSPA_IS_PORT_INPUT(port_descriptor (i)) && LADSPA_IS_PORT_CONTROL(port_descriptor (i))) {
uint32_t port_index = 0;
uint32_t in_index = 0;
uint32_t out_index = 0;
- const jack_nframes_t bufsize = 1024;
+ const nframes_t bufsize = 1024;
LADSPA_Data buffer[bufsize];
memset(buffer,0,sizeof(LADSPA_Data)*bufsize);
}
int
-Location::set_start (jack_nframes_t s)
+Location::set_start (nframes_t s)
{
if (is_mark()) {
if (_start != s) {
}
int
-Location::set_end (jack_nframes_t e)
+Location::set_end (nframes_t e)
{
if (is_mark()) {
if (_start != e) {
}
int
-Location::set (jack_nframes_t start, jack_nframes_t end)
+Location::set (nframes_t start, nframes_t end)
{
if (is_mark() && start != end) {
return -1;
node->add_child_nocopy(cd_info_node(m->first, m->second));
}
- id().print (buf);
+ id().print (buf, sizeof (buf));
node->add_property("id", buf);
node->add_property ("name", name());
snprintf (buf, sizeof (buf), "%u", start());
};
Location *
-Locations::first_location_before (jack_nframes_t frame)
+Locations::first_location_before (nframes_t frame)
{
LocationList locs;
}
Location *
-Locations::first_location_after (jack_nframes_t frame)
+Locations::first_location_after (nframes_t frame)
{
LocationList locs;
return 0;
}
-jack_nframes_t
-Locations::first_mark_before (jack_nframes_t frame)
+nframes_t
+Locations::first_mark_before (nframes_t frame)
{
LocationList locs;
return 0;
}
-jack_nframes_t
-Locations::first_mark_after (jack_nframes_t frame)
+nframes_t
+Locations::first_mark_after (nframes_t frame)
{
LocationList locs;
new_peak = minus_infinity();
}
- if (_session.meter_falloff() == 0.0f || new_peak > _visible_peak_power[n]) {
+ if (Config->get_meter_falloff() == 0.0f || new_peak > _visible_peak_power[n]) {
_visible_peak_power[n] = new_peak;
} else {
// do falloff
- new_peak = _visible_peak_power[n] - _session.meter_falloff();
+ new_peak = _visible_peak_power[n] - Config->get_meter_falloff();
_visible_peak_power[n] = std::max (new_peak, -INFINITY);
}
}
if (_alignment_style == ExistingMaterial) {
- if (!_session.get_punch_in()) {
+ if (!Config->get_punch_in()) {
/* manual punch in happens at the correct transport frame
because the user hit a button. but to get alignment correct
} else {
- if (_session.get_punch_in()) {
+ if (Config->get_punch_in()) {
first_recordable_frame += _roll_delay;
} else {
capture_start_frame -= _roll_delay;
adjust_capture_position = 0;
- if (nominally_recording || (_session.get_record_enabled() && _session.get_punch_in())) {
+ if (nominally_recording || (_session.get_record_enabled() && Config->get_punch_in())) {
OverlapType ot;
ot = coverage (first_recordable_frame, last_recordable_frame, transport_frame, transport_frame + nframes);
if (abort_capture) {
- list<boost::shared_ptr<Source> >* deletion_list = new list<boost::shared_ptr<Source> >;
-
if (_write_source) {
_write_source->mark_for_remove ();
-
- deletion_list->push_back (_write_source);
-
+ _write_source->drop_references ();
_write_source.reset();
}
/* new source set up in "out" below */
- if (!deletion_list->empty()) {
- DeleteSources (deletion_list);
- } else {
- delete deletion_list;
- }
-
} else {
assert(_write_source);
g_atomic_int_set (&_record_enabled, 1);
- if (Config->get_use_hardware_monitoring() && _source_port) {
- _source_port->request_monitor_input (!(_session.get_auto_input() && rolling));
+ if (_source_port && Config->get_monitoring_model() == HardwareMonitoring) {
+ _source_port->request_monitor_input (!(Config->get_auto_input() && rolling));
}
RecordEnableChanged (); /* EMIT SIGNAL */
MidiDiskstream::disengage_record_enable ()
{
g_atomic_int_set (&_record_enabled, 0);
- if (Config->get_use_hardware_monitoring()) {
+ if (_source_port && Config->get_monitoring_model() == HardwareMonitoring) {
if (_source_port) {
_source_port->request_monitor_input (false);
}
node->add_property ("speed", buf);
node->add_property("name", _name);
- id().print(buf);
+ id().print(buf, sizeof(buf));
node->add_property("id", buf);
if (_write_source && _session.get_record_enabled()) {
Location* pi;
- if (_session.get_punch_in() && ((pi = _session.locations()->auto_punch_location()) != 0)) {
+ if (Config->get_punch_in() && ((pi = _session.locations()->auto_punch_location()) != 0)) {
snprintf (buf, sizeof (buf), "%" PRIu32, pi->start());
} else {
snprintf (buf, sizeof (buf), "%" PRIu32, _session.transport_frame());
for (uint32_t n=0; n < _sources.size(); ++n) {
snprintf (buf2, sizeof(buf2), "source-%d", n);
- _sources[n]->id().print (buf);
+ _sources[n]->id().print (buf, sizeof(buf));
node.add_property (buf2, buf);
}
for (vector<FreezeRecordInsertInfo*>::iterator i = _freeze_record.insert_info.begin(); i != _freeze_record.insert_info.end(); ++i) {
inode = new XMLNode (X_("insert"));
- (*i)->id.print (buf);
+ (*i)->id.print (buf, sizeof(buf));
inode->add_property (X_("id"), buf);
inode->add_child_copy ((*i)->state);
diskstream.
*/
- _diskstream->id().print (buf);
+ _diskstream->id().print (buf, sizeof(buf));
root.add_property ("diskstream-id", buf);
return root;
send_silence = true;
} else {
- if (_session.get_auto_input()) {
- if (Config->get_use_sw_monitoring()) {
+ if (Config->get_auto_input()) {
+ if (Config->get_monitoring_model() == SoftwareMonitoring) {
send_silence = false;
} else {
send_silence = true;
}
} else {
if (_diskstream->record_enabled()) {
- if (Config->get_use_sw_monitoring()) {
+ if (Config->get_monitoring_model() == SoftwareMonitoring) {
send_silence = false;
} else {
send_silence = true;
int dret;
boost::shared_ptr<MidiDiskstream> diskstream = midi_diskstream();
- {
- Glib::RWLock::ReaderLock lm (redirect_lock, Glib::TRY_LOCK);
- if (lm.locked()) {
- // automation snapshot can also be called from the non-rt context
- // and it uses the redirect list, so we take the lock out here
- automation_snapshot (start_frame);
- }
- }
-
if (n_outputs().get_total() == 0 && _redirects.empty()) {
return 0;
}
just_meter_input (start_frame, end_frame, nframes, offset);
}
- if (diskstream->record_enabled() && !can_record && !_session.get_auto_input()) {
+ if (diskstream->record_enabled() && !can_record && !Config->get_auto_input()) {
/* not actually recording, but we want to hear the input material anyway,
at least potentially (depending on monitoring options)
diskstream->get_playback(bufs.get_midi(0), start_frame, end_frame);
process_output_buffers (bufs, start_frame, end_frame, nframes, offset,
- (!_session.get_record_enabled() || !_session.get_do_not_record_plugins()), declick, (_meter_point != MeterInput));
+ (!_session.get_record_enabled() || !Config->get_do_not_record_plugins()), declick, (_meter_point != MeterInput));
}
// Debug wrappers
float
-debug_compute_peak (ARDOUR::Sample *buf, jack_nframes_t nsamples, float current)
+debug_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current)
{
if ( ((intptr_t)buf % 16) != 0) {
cerr << "compute_peak(): buffer unaligned!" << endl;
}
void
-debug_apply_gain_to_buffer (ARDOUR::Sample *buf, jack_nframes_t nframes, float gain)
+debug_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain)
{
if ( ((intptr_t)buf % 16) != 0) {
cerr << "apply_gain_to_buffer(): buffer unaligned!" << endl;
}
void
-debug_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes, float gain)
+debug_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain)
{
if ( ((intptr_t)dst & 15) != 0) {
cerr << "mix_buffers_with_gain(): dst unaligned!" << endl;
}
void
-debug_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes)
+debug_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes)
{
if ( ((intptr_t)dst & 15) != 0) {
cerr << "mix_buffers_no_gain(): dst unaligned!" << endl;
float
-compute_peak (ARDOUR::Sample *buf, jack_nframes_t nsamples, float current)
+compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current)
{
- for (jack_nframes_t i = 0; i < nsamples; ++i) {
+ for (nframes_t i = 0; i < nsamples; ++i) {
current = f_max (current, fabsf (buf[i]));
}
}
void
-apply_gain_to_buffer (ARDOUR::Sample *buf, jack_nframes_t nframes, float gain)
+apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain)
{
- for (jack_nframes_t i=0; i<nframes; i++)
+ for (nframes_t i=0; i<nframes; i++)
buf[i] *= gain;
}
void
-mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes, float gain)
+mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain)
{
- for (jack_nframes_t i = 0; i < nframes; i++) {
+ for (nframes_t i = 0; i < nframes; i++) {
dst[i] += src[i] * gain;
}
}
void
-mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes)
+mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes)
{
- for (jack_nframes_t i=0; i < nframes; i++) {
+ for (nframes_t i=0; i < nframes; i++) {
dst[i] += src[i];
}
}
#include <Accelerate/Accelerate.h>
float
-veclib_compute_peak (ARDOUR::Sample *buf, jack_nframes_t nsamples, float current)
+veclib_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current)
{
float tmpmax = 0.0f;
vDSP_maxmgv(buf, 1, &tmpmax, nsamples);
}
void
-veclib_apply_gain_to_buffer (ARDOUR::Sample *buf, jack_nframes_t nframes, float gain)
+veclib_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain)
{
vDSP_vsmul(buf, 1, &gain, buf, 1, nframes);
}
void
-veclib_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes, float gain)
+veclib_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain)
{
vDSP_vsma(src, 1, &gain, dst, 1, dst, 1, nframes);
}
void
-veclib_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes)
+veclib_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes)
{
// It seems that a vector mult only operation does not exist...
float gain = 1.0f;
MTC_Slave::update_mtc_qtr (Parser& p)
{
cycles_t cnow = get_cycles ();
- jack_nframes_t now = session.engine().frame_time();
- jack_nframes_t qtr;
+ nframes_t now = session.engine().frame_time();
+ nframes_t qtr;
static cycles_t last_qtr = 0;
qtr = (long) (session.frames_per_smpte_frame() / 4);
void
MTC_Slave::update_mtc_time (const byte *msg, bool was_full)
{
- jack_nframes_t now = session.engine().frame_time();
+ nframes_t now = session.engine().frame_time();
SMPTE::Time smpte;
smpte.hours = msg[3];
}
bool
-MTC_Slave::speed_and_position (float& speed, jack_nframes_t& pos)
+MTC_Slave::speed_and_position (float& speed, nframes_t& pos)
{
- jack_nframes_t now = session.engine().frame_time();
+ nframes_t now = session.engine().frame_time();
SafeTime last;
- jack_nframes_t frame_rate;
- jack_nframes_t elapsed;
+ nframes_t frame_rate;
+ nframes_t elapsed;
float speed_now;
read_current (&last);
/* scale elapsed time by the current MTC speed */
if (last.timestamp && (now > last.timestamp)) {
- elapsed = (jack_nframes_t) floor (mtc_speed * (now - last.timestamp));
+ elapsed = (nframes_t) floor (mtc_speed * (now - last.timestamp));
} else {
elapsed = 0; /* XXX is this right? */
}
return true;
}
-jack_nframes_t
+ARDOUR::nframes_t
MTC_Slave::resolution() const
{
- return (jack_nframes_t) session.frames_per_smpte_frame();
+ return (nframes_t) session.frames_per_smpte_frame();
}
void
$Id$
*/
+#define __STDC_FORMAT_MACROS 1
+#include <inttypes.h>
+
#include <cmath>
#include <cerrno>
#include <fstream>
StreamPanner::StreamPanner (Panner& p)
: parent (p),
- _control (*this)
+ _control (X_("panner"), *this)
{
_muted = false;
}
void
-BaseStereoPanner::snapshot (jack_nframes_t now)
+BaseStereoPanner::snapshot (nframes_t now)
{
if (_automation.automation_state() == Write || _automation.automation_state() == Touch) {
_automation.rt_add (now, x);
}
void
-BaseStereoPanner::transport_stopped (jack_nframes_t frame)
+BaseStereoPanner::transport_stopped (nframes_t frame)
{
_automation.reposition_for_rt_add (frame);
out << "begin" << endl;
for (AutomationList::const_iterator i = _automation.const_begin(); i != _automation.const_end(); ++i) {
- out << '\t' << (jack_nframes_t) floor ((*i)->when) << ' ' << (*i)->value << endl;
+ out << '\t' << (nframes_t) floor ((*i)->when) << ' ' << (*i)->value << endl;
if (!out) {
error << string_compose (_("error writing pan automation file (%s)"), strerror (errno)) << endmsg;
return -1;
_automation.clear ();
while (in.getline (line, sizeof (line), '\n')) {
- jack_nframes_t when;
+ nframes_t when;
double value;
++linecnt;
}
void
-BaseStereoPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coeff, jack_nframes_t nframes)
+BaseStereoPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes)
{
assert(obufs.count().get(DataType::AUDIO) == 2);
/* interpolate over 64 frames or nframes, whichever is smaller */
- jack_nframes_t limit = min ((jack_nframes_t)64, nframes);
- jack_nframes_t n;
+ nframes_t limit = min ((nframes_t)64, nframes);
+ nframes_t n;
delta = -(delta / (float) (limit));
/* interpolate over 64 frames or nframes, whichever is smaller */
- jack_nframes_t limit = min ((jack_nframes_t)64, nframes);
- jack_nframes_t n;
+ nframes_t limit = min ((nframes_t)64, nframes);
+ nframes_t n;
delta = -(delta / (float) (limit));
void
EqualPowerStereoPanner::distribute_automated (AudioBuffer& srcbuf, BufferSet& obufs,
- jack_nframes_t start, jack_nframes_t end, jack_nframes_t nframes,
+ nframes_t start, nframes_t end, nframes_t nframes,
pan_t** buffers)
{
assert(obufs.count().get(DataType::AUDIO) == 2);
const float pan_law_attenuation = -3.0f;
const float scale = 2.0f - 4.0f * powf (10.0f,pan_law_attenuation/20.0f);
- for (jack_nframes_t n = 0; n < nframes; ++n) {
+ for (nframes_t n = 0; n < nframes; ++n) {
float panR = buffers[0][n];
float panL = 1 - panR;
dst = obufs.get_audio(0).data(nframes);
pbuf = buffers[0];
- for (jack_nframes_t n = 0; n < nframes; ++n) {
+ for (nframes_t n = 0; n < nframes; ++n) {
dst[n] += src[n] * pbuf[n];
}
dst = obufs.get_audio(1).data(nframes);
pbuf = buffers[1];
- for (jack_nframes_t n = 0; n < nframes; ++n) {
+ for (nframes_t n = 0; n < nframes; ++n) {
dst[n] += src[n] * pbuf[n];
}
root->add_property (X_("automation-style"), buf);
StreamPanner::add_state (*root);
+ root->add_child_nocopy (_control.get_state ());
return *root;
}
}
StreamPanner::set_state (node);
+
+ for (XMLNodeConstIterator iter = node.children().begin(); iter != node.children().end(); ++iter) {
+ if ((*iter)->name() == X_("panner")) {
+ _control.set_state (**iter);
+ parent.session().add_controllable (&_control);
+ }
+ }
return 0;
}
}
void
-Multi2dPanner::snapshot (jack_nframes_t now)
+Multi2dPanner::snapshot (nframes_t now)
{
// how?
}
void
-Multi2dPanner::transport_stopped (jack_nframes_t frame)
+Multi2dPanner::transport_stopped (nframes_t frame)
{
//what?
}
}
void
-Multi2dPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coeff, jack_nframes_t nframes)
+Multi2dPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes)
{
Sample* dst;
pan_t pan;
/* interpolate over 64 frames or nframes, whichever is smaller */
- jack_nframes_t limit = min ((jack_nframes_t)64, nframes);
- jack_nframes_t n;
+ nframes_t limit = min ((nframes_t)64, nframes);
+ nframes_t n;
delta = -(delta / (float) (limit));
if (pan != 0.0f) {
- for (jack_nframes_t n = 0; n < nframes; ++n) {
+ for (nframes_t n = 0; n < nframes; ++n) {
dst[n] += src[n] * pan;
}
} else {
- for (jack_nframes_t n = 0; n < nframes; ++n) {
+ for (nframes_t n = 0; n < nframes; ++n) {
dst[n] += src[n];
}
void
Multi2dPanner::distribute_automated (AudioBuffer& src, BufferSet& obufs,
- jack_nframes_t start, jack_nframes_t end, jack_nframes_t nframes,
+ nframes_t start, nframes_t end, nframes_t nframes,
pan_t** buffers)
{
if (_muted) {
}
void
-Panner::transport_stopped (jack_nframes_t frame)
+Panner::transport_stopped (nframes_t frame)
{
for (vector<StreamPanner*>::iterator i = begin(); i != end(); ++i) {
(*i)->transport_stopped (frame);
}
void
-Panner::snapshot (jack_nframes_t now)
+Panner::snapshot (nframes_t now)
{
for (vector<StreamPanner*>::iterator i = begin(); i != end(); ++i) {
(*i)->snapshot (now);
}
void
-Panner::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, jack_nframes_t nframes, jack_nframes_t offset, gain_t gain_coeff)
+Panner::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, nframes_t nframes, nframes_t offset, gain_t gain_coeff)
{
if (outbufs.count().get(DataType::AUDIO) == 0) {
// Don't want to lose audio...
}
void
-Panner::distribute (BufferSet& inbufs, BufferSet& outbufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset)
+Panner::distribute (BufferSet& inbufs, BufferSet& outbufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset)
{
if (outbufs.count().get(DataType::AUDIO) == 0) {
// Failing to deliver audio we were asked to deliver is a bug
}
-Playlist::Playlist (const Playlist& other, jack_nframes_t start, jack_nframes_t cnt, string str, bool hide)
+Playlist::Playlist (const Playlist& other, nframes_t start, nframes_t cnt, string str, bool hide)
: _name (str), _session (other._session), _type(other._type), _orig_diskstream_id(other._orig_diskstream_id)
{
RegionLock rlock2 (&((Playlist&)other));
- jack_nframes_t end = start + cnt - 1;
+ nframes_t end = start + cnt - 1;
init (hide);
boost::shared_ptr<Region> region;
boost::shared_ptr<Region> new_region;
- jack_nframes_t offset = 0;
- jack_nframes_t position = 0;
- jack_nframes_t len = 0;
+ nframes_t offset = 0;
+ nframes_t position = 0;
+ nframes_t len = 0;
string new_name;
OverlapType overlap;
_splicing = false;
_nudging = false;
in_set_state = false;
- _edit_mode = _session.get_edit_mode();
+ _edit_mode = Config->get_edit_mode();
in_flush = false;
in_partition = false;
subcnt = 0;
// pending_bounds.sort (cmp);
for (RegionList::iterator r = pending_bounds.begin(); r != pending_bounds.end(); ++r) {
- if (_session.get_layer_model() == Session::MoveAddHigher) {
+ if (Config->get_layer_model() == MoveAddHigher) {
timestamp_layer_op (*r);
}
pending_length = true;
*************************************************************/
void
-Playlist::add_region (boost::shared_ptr<Region> region, jack_nframes_t position, float times, bool with_save)
+Playlist::add_region (boost::shared_ptr<Region> region, nframes_t position, float times, bool with_save)
{
RegionLock rlock (this);
int itimes = (int) floor (times);
- jack_nframes_t pos = position;
+ nframes_t pos = position;
if (itimes >= 1) {
add_region_internal (region, pos, true);
}
if (floor (times) != times) {
- jack_nframes_t length = (jack_nframes_t) floor (region->length() * (times - floor (times)));
+ nframes_t length = (nframes_t) floor (region->length() * (times - floor (times)));
string name;
_session.region_name (name, region->name(), false);
boost::shared_ptr<Region> sub = RegionFactory::create (region, 0, length, name, region->layer(), region->flags());
}
void
-Playlist::add_region_internal (boost::shared_ptr<Region> region, jack_nframes_t position, bool delay_sort)
+Playlist::add_region_internal (boost::shared_ptr<Region> region, nframes_t position, bool delay_sort)
{
RegionSortByPosition cmp;
- jack_nframes_t old_length = 0;
+ nframes_t old_length = 0;
if (!holding_state()) {
old_length = _get_maximum_extent();
}
}
- region->StateChanged.connect (sigc::bind (mem_fun (this, &Playlist::region_changed_proxy), region));
+ region->StateChanged.connect (sigc::bind (mem_fun (this, &Playlist::region_changed_proxy),
+ boost::weak_ptr<Region> (region)));
}
void
-Playlist::replace_region (boost::shared_ptr<Region> old, boost::shared_ptr<Region> newr, jack_nframes_t pos)
+Playlist::replace_region (boost::shared_ptr<Region> old, boost::shared_ptr<Region> newr, nframes_t pos)
{
RegionLock rlock (this);
Playlist::remove_region_internal (boost::shared_ptr<Region>region, bool delay_sort)
{
RegionList::iterator i;
- jack_nframes_t old_length = 0;
+ nframes_t old_length = 0;
// cerr << "removing region " << region->name() << endl;
}
void
-Playlist::partition (jack_nframes_t start, jack_nframes_t end, bool just_top_level)
+Playlist::partition (nframes_t start, nframes_t end, bool just_top_level)
{
RegionList thawlist;
}
void
-Playlist::partition_internal (jack_nframes_t start, jack_nframes_t end, bool cutting, RegionList& thawlist)
+Playlist::partition_internal (nframes_t start, nframes_t end, bool cutting, RegionList& thawlist)
{
RegionLock rlock (this);
boost::shared_ptr<Region> region;
string new_name;
RegionList::iterator tmp;
OverlapType overlap;
- jack_nframes_t pos1, pos2, pos3, pos4;
+ nframes_t pos1, pos2, pos3, pos4;
RegionList new_regions;
in_partition = true;
}
Playlist*
-Playlist::cut_copy (Playlist* (Playlist::*pmf)(jack_nframes_t, jack_nframes_t,bool), list<AudioRange>& ranges, bool result_is_hidden)
+Playlist::cut_copy (Playlist* (Playlist::*pmf)(nframes_t, nframes_t,bool), list<AudioRange>& ranges, bool result_is_hidden)
{
Playlist* ret;
Playlist* pl;
- jack_nframes_t start;
+ nframes_t start;
if (ranges.empty()) {
return 0;
Playlist*
Playlist::cut (list<AudioRange>& ranges, bool result_is_hidden)
{
- Playlist* (Playlist::*pmf)(jack_nframes_t,jack_nframes_t,bool) = &Playlist::cut;
+ Playlist* (Playlist::*pmf)(nframes_t,nframes_t,bool) = &Playlist::cut;
return cut_copy (pmf, ranges, result_is_hidden);
}
Playlist*
Playlist::copy (list<AudioRange>& ranges, bool result_is_hidden)
{
- Playlist* (Playlist::*pmf)(jack_nframes_t,jack_nframes_t,bool) = &Playlist::copy;
+ Playlist* (Playlist::*pmf)(nframes_t,nframes_t,bool) = &Playlist::copy;
return cut_copy (pmf, ranges, result_is_hidden);
}
Playlist *
-Playlist::cut (jack_nframes_t start, jack_nframes_t cnt, bool result_is_hidden)
+Playlist::cut (nframes_t start, nframes_t cnt, bool result_is_hidden)
{
Playlist *the_copy;
RegionList thawlist;
}
Playlist *
-Playlist::copy (jack_nframes_t start, jack_nframes_t cnt, bool result_is_hidden)
+Playlist::copy (nframes_t start, nframes_t cnt, bool result_is_hidden)
{
char buf[32];
}
int
-Playlist::paste (Playlist& other, jack_nframes_t position, float times)
+Playlist::paste (Playlist& other, nframes_t position, float times)
{
times = fabs (times);
- jack_nframes_t old_length;
+ nframes_t old_length;
{
RegionLock rl1 (this);
old_length = _get_maximum_extent();
int itimes = (int) floor (times);
- jack_nframes_t pos = position;
- jack_nframes_t shift = other._get_maximum_extent();
+ nframes_t pos = position;
+ nframes_t shift = other._get_maximum_extent();
layer_t top_layer = regions.size();
while (itimes--) {
void
-Playlist::duplicate (boost::shared_ptr<Region> region, jack_nframes_t position, float times)
+Playlist::duplicate (boost::shared_ptr<Region> region, nframes_t position, float times)
{
times = fabs (times);
RegionLock rl (this);
int itimes = (int) floor (times);
- jack_nframes_t pos = position;
+ nframes_t pos = position;
while (itimes--) {
boost::shared_ptr<Region> copy = RegionFactory::create (region);
}
if (floor (times) != times) {
- jack_nframes_t length = (jack_nframes_t) floor (region->length() * (times - floor (times)));
+ nframes_t length = (nframes_t) floor (region->length() * (times - floor (times)));
string name;
_session.region_name (name, region->name(), false);
boost::shared_ptr<Region> sub = RegionFactory::create (region, 0, length, name, region->layer(), region->flags());
}
void
-Playlist::split_region (boost::shared_ptr<Region> region, jack_nframes_t playlist_position)
+Playlist::split_region (boost::shared_ptr<Region> region, nframes_t playlist_position)
{
RegionLock rl (this);
boost::shared_ptr<Region> left;
boost::shared_ptr<Region> right;
- jack_nframes_t before;
- jack_nframes_t after;
+ nframes_t before;
+ nframes_t after;
string before_name;
string after_name;
if (holding_state ()) {
pending_bounds.push_back (region);
} else {
- if (_session.get_layer_model() == Session::MoveAddHigher) {
+ if (Config->get_layer_model() == MoveAddHigher) {
/* it moved or changed length, so change the timestamp */
timestamp_layer_op (region);
}
}
void
-Playlist::region_changed_proxy (Change what_changed, boost::shared_ptr<Region> region)
+Playlist::region_changed_proxy (Change what_changed, boost::weak_ptr<Region> weak_region)
{
+ boost::shared_ptr<Region> region (weak_region.lock());
+
+ if (!region) {
+ return;
+ }
+
/* this makes a virtual call to the right kind of playlist ... */
region_changed (what_changed, region);
**********************************************************************/
Playlist::RegionList *
-Playlist::regions_at (jack_nframes_t frame)
+Playlist::regions_at (nframes_t frame)
{
RegionLock rlock (this);
}
boost::shared_ptr<Region>
-Playlist::top_region_at (jack_nframes_t frame)
+Playlist::top_region_at (nframes_t frame)
{
RegionLock rlock (this);
}
Playlist::RegionList *
-Playlist::find_regions_at (jack_nframes_t frame)
+Playlist::find_regions_at (nframes_t frame)
{
RegionList *rlist = new RegionList;
}
Playlist::RegionList *
-Playlist::regions_touched (jack_nframes_t start, jack_nframes_t end)
+Playlist::regions_touched (nframes_t start, nframes_t end)
{
RegionLock rlock (this);
RegionList *rlist = new RegionList;
boost::shared_ptr<Region>
-Playlist::find_next_region (jack_nframes_t frame, RegionPoint point, int dir)
+Playlist::find_next_region (nframes_t frame, RegionPoint point, int dir)
{
RegionLock rlock (this);
boost::shared_ptr<Region> ret;
- jack_nframes_t closest = max_frames;
+ nframes_t closest = max_frames;
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
- jack_nframes_t distance;
+ nframes_t distance;
boost::shared_ptr<Region> r = (*i);
- jack_nframes_t pos = 0;
+ nframes_t pos = 0;
switch (point) {
case Start:
if (child->name() == "Region") {
+ if ((prop = child->property ("id")) == 0) {
+ error << _("region state node has no ID, ignored") << endmsg;
+ continue;
+ }
+
if ((region = RegionFactory::create (_session, *child, true)) == 0) {
error << _("Playlist: cannot create region from state file") << endmsg;
continue;
node->add_property (X_("name"), _name);
node->add_property (X_("type"), _type.to_string());
- _orig_diskstream_id.print (buf);
+ _orig_diskstream_id.print (buf, sizeof (buf));
node->add_property (X_("orig_diskstream_id"), buf);
node->add_property (X_("frozen"), _frozen ? "yes" : "no");
return regions.empty();
}
-jack_nframes_t
+ARDOUR::nframes_t
Playlist::get_maximum_extent () const
{
RegionLock rlock (const_cast<Playlist *>(this));
return _get_maximum_extent ();
}
-jack_nframes_t
+ARDOUR::nframes_t
Playlist::_get_maximum_extent () const
{
RegionList::const_iterator i;
- jack_nframes_t max_extent = 0;
- jack_nframes_t end = 0;
+ nframes_t max_extent = 0;
+ nframes_t end = 0;
for (i = regions.begin(); i != regions.end(); ++i) {
if ((end = (*i)->position() + (*i)->length()) > max_extent) {
freeze ();
- if (_session.get_layer_model() == Session::MoveAddHigher ||
- _session.get_layer_model() == Session::AddHigher) {
+ if (Config->get_layer_model() == MoveAddHigher ||
+ Config->get_layer_model() == AddHigher) {
RegionSortByLastLayerOp cmp;
RegionList copy = regions;
Playlist::raise_region_to_top (boost::shared_ptr<Region> region)
{
/* does nothing useful if layering mode is later=higher */
- if ((_session.get_layer_model() == Session::MoveAddHigher) ||
- (_session.get_layer_model() == Session::AddHigher)) {
+ if ((Config->get_layer_model() == MoveAddHigher) ||
+ (Config->get_layer_model() == AddHigher)) {
timestamp_layer_op (region);
relayer ();
}
Playlist::lower_region_to_bottom (boost::shared_ptr<Region> region)
{
/* does nothing useful if layering mode is later=higher */
- if ((_session.get_layer_model() == Session::MoveAddHigher) ||
- (_session.get_layer_model() == Session::AddHigher)) {
+ if ((Config->get_layer_model() == MoveAddHigher) ||
+ (Config->get_layer_model() == AddHigher)) {
region->set_last_layer_op (0);
relayer ();
}
}
void
-Playlist::nudge_after (jack_nframes_t start, jack_nframes_t distance, bool forwards)
+Playlist::nudge_after (nframes_t start, nframes_t distance, bool forwards)
{
RegionList::iterator i;
- jack_nframes_t new_pos;
+ nframes_t new_pos;
bool moved = false;
_nudging = true;
using namespace PBD;
Playlist*
-Playlist::copyPlaylist (const Playlist& playlist, jack_nframes_t start, jack_nframes_t length,
+Playlist::copyPlaylist (const Playlist& playlist, nframes_t start, nframes_t length,
string name, bool result_is_hidden)
{
const AudioPlaylist* apl;
Plugin::ParameterDescriptor desc;
get_parameter_descriptor (n, desc);
-
- controls[n] = new PortControllable (*this, n, desc.lower, desc.upper, desc.toggled, desc.logarithmic);
+
+ controls[n] = new PortControllable (describe_parameter (n), *this, n,
+ desc.lower, desc.upper, desc.toggled, desc.logarithmic);
}
return controls[n];
}
-Plugin::PortControllable::PortControllable (Plugin& p, uint32_t port_id, float low, float up, bool t, bool loga)
- : plugin (p), absolute_port (port_id)
+Plugin::PortControllable::PortControllable (string name, Plugin& p, uint32_t port_id,
+ float low, float up, bool t, bool loga)
+ : Controllable (name), plugin (p), absolute_port (port_id)
{
toggled = t;
logarithmic = loga;
$Id$
*/
+#define __STDC_FORMAT_MACROS 1
+#include <stdint.h>
+
#include <sys/types.h>
#include <cstdio>
#include <lrdf.h>
path = _session.snap_name();
path += "-redirect-";
- id().print (buf);
+ id().print (buf, sizeof (buf));
path += buf;
path += ".automation";
}
bool
-Redirect::find_next_event (jack_nframes_t now, jack_nframes_t end, ControlEvent& next_event) const
+Redirect::find_next_event (nframes_t now, nframes_t end, ControlEvent& next_event) const
{
map<uint32_t,AutomationList*>::const_iterator li;
AutomationList::TimeComparator cmp;
}
/** Create a new Region from part of an existing one */
-Region::Region (boost::shared_ptr<const Region> other, jack_nframes_t offset, jack_nframes_t length, const string& name, layer_t layer, Flag flags)
+Region::Region (boost::shared_ptr<const Region> other, nframes_t offset, nframes_t length, const string& name, layer_t layer, Flag flags)
: _name(name)
, _type(other->data_type())
, _flags(Flag(flags & ~(Locked|WholeFile|Hidden)))
Region::~Region ()
{
- notify_callbacks ();
-
- /* derived classes must emit GoingAway */
+ /* derived classes must call notify_callbacks() and then emit GoingAway */
}
void
}
void
-Region::set_length (jack_nframes_t len, void *src)
+Region::set_length (nframes_t len, void *src)
{
if (_flags & Locked) {
return;
if (_length != len && len != 0) {
+ /* check that the current _position wouldn't make the new
+ length impossible.
+ */
+
+ if (max_frames - len < _position) {
+ return;
+ }
+
if (!verify_length (len)) {
return;
}
if (!_playlist) {
return;
}
-
+
boost::shared_ptr<Region> whole_file_region = get_parent();
if (whole_file_region) {
}
void
-Region::special_set_position (jack_nframes_t pos)
+Region::special_set_position (nframes_t pos)
{
/* this is used when creating a whole file region as
a way to store its "natural" or "captured" position.
}
void
-Region::set_position (jack_nframes_t pos, void *src)
+Region::set_position (nframes_t pos, void *src)
{
if (_flags & Locked) {
return;
if (_position != pos) {
_position = pos;
+ /* check that the new _position wouldn't make the current
+ length impossible - if so, change the length.
+
+ XXX is this the right thing to do?
+ */
+
+ if (max_frames - _length < _position) {
+ _length = max_frames - _position;
+ }
+
if (!_frozen) {
char buf[64];
snprintf (buf, sizeof (buf), "position set to %u", pos);
}
void
-Region::set_position_on_top (jack_nframes_t pos, void *src)
+Region::set_position_on_top (nframes_t pos, void *src)
{
if (_flags & Locked) {
return;
_position += n;
}
} else {
- if (_position < (jack_nframes_t) -n) {
+ if (_position < (nframes_t) -n) {
_position = 0;
} else {
_position += n;
}
void
-Region::set_start (jack_nframes_t pos, void *src)
+Region::set_start (nframes_t pos, void *src)
{
if (_flags & Locked) {
return;
}
void
-Region::trim_start (jack_nframes_t new_position, void *src)
+Region::trim_start (nframes_t new_position, void *src)
{
if (_flags & Locked) {
return;
}
- jack_nframes_t new_start;
+ nframes_t new_start;
int32_t start_shift;
if (new_position > _position) {
} else if (start_shift < 0) {
- if (_start < (jack_nframes_t) -start_shift) {
+ if (_start < (nframes_t) -start_shift) {
new_start = 0;
} else {
new_start = _start + start_shift;
}
void
-Region::trim_front (jack_nframes_t new_position, void *src)
+Region::trim_front (nframes_t new_position, void *src)
{
if (_flags & Locked) {
return;
}
- jack_nframes_t end = _position + _length - 1;
- jack_nframes_t source_zero;
+ nframes_t end = last_frame();
+ nframes_t source_zero;
if (_position > _start) {
source_zero = _position - _start;
if (new_position < end) { /* can't trim it zero or negative length */
- jack_nframes_t newlen;
+ nframes_t newlen;
/* can't trim it back passed where source position zero is located */
}
void
-Region::trim_end (jack_nframes_t new_endpoint, void *src)
+Region::trim_end (nframes_t new_endpoint, void *src)
{
if (_flags & Locked) {
return;
}
void
-Region::trim_to (jack_nframes_t position, jack_nframes_t length, void *src)
+Region::trim_to (nframes_t position, nframes_t length, void *src)
{
if (_flags & Locked) {
return;
}
void
-Region::trim_to_internal (jack_nframes_t position, jack_nframes_t length, void *src)
+Region::trim_to_internal (nframes_t position, nframes_t length, void *src)
{
int32_t start_shift;
- jack_nframes_t new_start;
+ nframes_t new_start;
if (_flags & Locked) {
return;
} else if (start_shift < 0) {
- if (_start < (jack_nframes_t) -start_shift) {
+ if (_start < (nframes_t) -start_shift) {
new_start = 0;
} else {
new_start = _start + start_shift;
}
void
-Region::set_sync_position (jack_nframes_t absolute_pos)
+Region::set_sync_position (nframes_t absolute_pos)
{
- jack_nframes_t file_pos;
+ nframes_t file_pos;
file_pos = _start + (absolute_pos - _position);
}
}
-jack_nframes_t
+nframes_t
Region::sync_offset (int& dir) const
{
/* returns the sync point relative the first frame of the region */
}
}
-jack_nframes_t
-Region::adjust_to_sync (jack_nframes_t pos)
+nframes_t
+Region::adjust_to_sync (nframes_t pos)
{
int sync_dir;
- jack_nframes_t offset = sync_offset (sync_dir);
+ nframes_t offset = sync_offset (sync_dir);
if (sync_dir > 0) {
if (max_frames - pos > offset) {
return pos;
}
-jack_nframes_t
+nframes_t
Region::sync_position() const
{
if (_flags & SyncMarked) {
XMLNode *node = new XMLNode ("Region");
char buf[64];
- _id.print (buf);
+ _id.print (buf, sizeof (buf));
node->add_property ("id", buf);
node->add_property ("name", _name);
node->add_property ("type", _type.to_string());
}
if ((prop = node.property ("start")) != 0) {
- _start = (jack_nframes_t) atoi (prop->value().c_str());
+ sscanf (prop->value().c_str(), "%" PRIu32, &_start);
}
if ((prop = node.property ("length")) != 0) {
- _length = (jack_nframes_t) atoi (prop->value().c_str());
+ sscanf (prop->value().c_str(), "%" PRIu32, &_length);
}
if ((prop = node.property ("position")) != 0) {
- _position = (jack_nframes_t) atoi (prop->value().c_str());
+ sscanf (prop->value().c_str(), "%" PRIu32, &_position);
}
if ((prop = node.property ("layer")) != 0) {
/* note: derived classes set flags */
if ((prop = node.property ("sync-position")) != 0) {
- _sync_position = (jack_nframes_t) atoi (prop->value().c_str());
+ sscanf (prop->value().c_str(), "%" PRIu32, &_sync_position);
} else {
_sync_position = _start;
}
sigc::signal<void,boost::shared_ptr<Region> > RegionFactory::CheckNewRegion;
boost::shared_ptr<Region>
-RegionFactory::create (boost::shared_ptr<Region> region, jack_nframes_t start,
- jack_nframes_t length, std::string name,
+RegionFactory::create (boost::shared_ptr<Region> region, nframes_t start,
+ nframes_t length, std::string name,
layer_t layer, Region::Flag flags, bool announce)
{
boost::shared_ptr<const AudioRegion> other_a;
}
boost::shared_ptr<Region>
-RegionFactory::create (boost::shared_ptr<AudioRegion> region, jack_nframes_t start,
- jack_nframes_t length, std::string name,
+RegionFactory::create (boost::shared_ptr<AudioRegion> region, nframes_t start,
+ nframes_t length, std::string name,
layer_t layer, Region::Flag flags, bool announce)
{
return create (boost::static_pointer_cast<Region> (region), start, length, name, layer, flags, announce);
}
boost::shared_ptr<Region>
-RegionFactory::create (SourceList& srcs, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t layer, Region::Flag flags, bool announce)
+RegionFactory::create (SourceList& srcs, nframes_t start, nframes_t length, const string& name, layer_t layer, Region::Flag flags, bool announce)
{
if (srcs.empty()) {
return boost::shared_ptr<Region>();
}
boost::shared_ptr<Region>
-RegionFactory::create (boost::shared_ptr<Source> src, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t layer, Region::Flag flags, bool announce)
+RegionFactory::create (boost::shared_ptr<Source> src, nframes_t start, nframes_t length, const string& name, layer_t layer, Region::Flag flags, bool announce)
{
boost::shared_ptr<AudioSource> as;
boost::shared_ptr<MidiSource> ms;
{
SourceList nsrcs;
SourceList::iterator si;
- const jack_nframes_t blocksize = 256 * 1048;
+ const nframes_t blocksize = 256 * 1048;
Sample buf[blocksize];
- jack_nframes_t fpos;
- jack_nframes_t fend;
- jack_nframes_t fstart;
- jack_nframes_t to_read;
+ nframes_t fpos;
+ nframes_t fend;
+ nframes_t fstart;
+ nframes_t to_read;
int ret = -1;
/* create new sources */
/* swap memory order */
- for (jack_nframes_t i = 0; i < to_read/2; ++i) {
+ for (nframes_t i = 0; i < to_read/2; ++i) {
swap (buf[i],buf[to_read-1-i]);
}
using namespace ARDOUR;
using namespace PBD;
-
uint32_t Route::order_key_cnt = 0;
Route::Route (Session& sess, string name, int input_min, int input_max, int output_min, int output_max, Flag flg, DataType default_type)
: IO (sess, name, input_min, input_max, output_min, output_max, default_type),
_flags (flg),
- _solo_control (*this, ToggleControllable::SoloControl),
- _mute_control (*this, ToggleControllable::MuteControl)
+ _solo_control (X_("solo"), *this, ToggleControllable::SoloControl),
+ _mute_control (X_("mute"), *this, ToggleControllable::MuteControl)
{
init ();
}
Route::Route (Session& sess, const XMLNode& node)
: IO (sess, "route"),
- _solo_control (*this, ToggleControllable::SoloControl),
- _mute_control (*this, ToggleControllable::MuteControl)
+ _solo_control (X_("solo"), *this, ToggleControllable::SoloControl),
+ _mute_control (X_("mute"), *this, ToggleControllable::MuteControl)
{
init ();
set_state (node);
_declickable = false;
_pending_declick = true;
_remote_control_id = 0;
-
+
_edit_group = 0;
_mix_group = 0;
*/
void
Route::process_output_buffers (BufferSet& bufs,
- jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t nframes, jack_nframes_t offset, bool with_redirects, int declick,
+ nframes_t start_frame, nframes_t end_frame,
+ nframes_t nframes, nframes_t offset, bool with_redirects, int declick,
bool meter)
{
// This is definitely very audio-only for now
IO *co;
bool mute_audible;
bool solo_audible;
- bool no_monitor = (Config->get_use_hardware_monitoring() || !Config->get_use_sw_monitoring ());
+ bool no_monitor;
gain_t* gab = _session.gain_automation_buffer();
+ switch (Config->get_monitoring_model()) {
+ case HardwareMonitoring:
+ case ExternalMonitoring:
+ no_monitor = true;
+ break;
+ default:
+ no_monitor = false;
+ }
+
declick = _pending_declick;
{
// TODO: this is probably wrong
- (no_monitor && record_enabled() && (!_session.get_auto_input() || _session.actively_recording()))
+ (no_monitor && record_enabled() && (!Config->get_auto_input() || _session.actively_recording()))
) {
// rec-enabled but not s/w monitoring
- (no_monitor && record_enabled() && (!_session.get_auto_input() || _session.actively_recording()))
+ (no_monitor && record_enabled() && (!Config->get_auto_input() || _session.actively_recording()))
) {
// h/w monitoring not in use
- (!Config->get_use_hardware_monitoring() &&
+ (!Config->get_monitoring_model() == HardwareMonitoring &&
// AND software monitoring required
- Config->get_use_sw_monitoring())) {
+ Config->get_monitoring_model() == SoftwareMonitoring)) {
if (apply_gain_automation) {
for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) {
Sample* const sp = i->data(nframes);
- for (jack_nframes_t nx = 0; nx < nframes; ++nx) {
+ for (nframes_t nx = 0; nx < nframes; ++nx) {
sp[nx] *= -gab[nx];
}
}
for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) {
Sample* const sp = i->data(nframes);
- for (jack_nframes_t nx = 0; nx < nframes; ++nx) {
+ for (nframes_t nx = 0; nx < nframes; ++nx) {
sp[nx] *= gab[nx];
}
}
for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) {
Sample* const sp = i->data(nframes);
- apply_gain_to_buffer(sp,nframes,this_gain);
+ Session::apply_gain_to_buffer(sp,nframes,this_gain);
}
} else if (_gain == 0) {
// recording but not s/w monitoring
- (no_monitor && record_enabled() && (!_session.get_auto_input() || _session.actively_recording()))
+ (no_monitor && record_enabled() && (!Config->get_auto_input() || _session.actively_recording()))
) {
/* relax */
- } else if (no_monitor && record_enabled() && (!_session.get_auto_input() || _session.actively_recording())) {
+ } else if (no_monitor && record_enabled() && (!Config->get_auto_input() || _session.actively_recording())) {
IO::silence (nframes, offset);
// muted by solo of another track, but not using control outs for solo
- (!solo_audible && (_session.solo_model() != Session::SoloBus)) ||
+ (!solo_audible && (Config->get_solo_model() != SoloBus)) ||
// muted by mute of this track
}
void
-Route::passthru (jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset, int declick, bool meter_first)
+Route::passthru (nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset, int declick, bool meter_first)
{
BufferSet& bufs = _session.get_scratch_buffers(n_process_buffers());
uint32_t i_cnt;
uint32_t s_cnt;
map<Placement,list<InsertCount> > insert_map;
- jack_nframes_t initial_streams;
+ nframes_t initial_streams;
redirect_max_outs.reset();
i_cnt = 0;
node->add_property ("order-keys", order_string);
node->add_child_nocopy (IO::state (full_state));
+ node->add_child_nocopy (_solo_control.get_state ());
+ node->add_child_nocopy (_mute_control.get_state ());
if (_control_outs) {
XMLNode* cnode = new XMLNode (X_("ControlOuts"));
} else if (child->name() == "extra") {
_extra_xml = new XMLNode (*child);
+ } else if (child->name() == "solo") {
+ _solo_control.set_state (*child);
+ _session.add_controllable (&_solo_control);
+ } else if (child->name() == "mute") {
+ _mute_control.set_state (*child);
+ _session.add_controllable (&_mute_control);
}
}
}
void
-Route::silence (jack_nframes_t nframes, jack_nframes_t offset)
+Route::silence (nframes_t nframes, nframes_t offset)
{
if (!_silent) {
void
Route::handle_transport_stopped (bool abort_ignored, bool did_locate, bool can_flush_redirects)
{
- jack_nframes_t now = _session.transport_frame();
+ nframes_t now = _session.transport_frame();
{
Glib::RWLock::ReaderLock lm (redirect_lock);
- if (!did_locate) {
- automation_snapshot (now);
- }
-
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
if (Config->get_plugins_stop_with_transport() && can_flush_redirects) {
}
int
-Route::no_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t offset,
+Route::no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset,
bool session_state_changing, bool can_record, bool rec_monitors_input)
{
if (n_outputs().get_total() == 0) {
return 0;
}
-jack_nframes_t
-Route::check_initial_delay (jack_nframes_t nframes, jack_nframes_t& offset, jack_nframes_t& transport_frame)
+nframes_t
+Route::check_initial_delay (nframes_t nframes, nframes_t& offset, nframes_t& transport_frame)
{
if (_roll_delay > nframes) {
}
int
-Route::roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t offset, int declick,
+Route::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, int declick,
bool can_record, bool rec_monitors_input)
{
- {
- Glib::RWLock::ReaderLock lm (redirect_lock, Glib::TRY_LOCK);
- if (lm.locked()) {
- // automation snapshot can also be called from the non-rt context
- // and it uses the redirect list, so we take the lock out here
- automation_snapshot (_session.transport_frame());
- }
- }
-
if ((n_outputs().get_total() == 0 && _redirects.empty()) || n_inputs().get_total() == 0 || !_active) {
silence (nframes, offset);
return 0;
}
- jack_nframes_t unused = 0;
+ nframes_t unused = 0;
if ((nframes = check_initial_delay (nframes, offset, unused)) == 0) {
return 0;
}
int
-Route::silent_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t offset,
+Route::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset,
bool can_record, bool rec_monitors_input)
{
silence (nframes, offset);
}
}
-jack_nframes_t
+nframes_t
Route::update_total_latency ()
{
_own_latency = 0;
}
void
-Route::set_latency_delay (jack_nframes_t longest_session_latency)
+Route::set_latency_delay (nframes_t longest_session_latency)
{
_initial_delay = longest_session_latency - _own_latency;
}
}
-void
-Route::automation_snapshot (jack_nframes_t now)
-{
- IO::automation_snapshot (now);
-
- for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
- (*i)->automation_snapshot (now);
- }
-}
-
-Route::ToggleControllable::ToggleControllable (Route& s, ToggleType tp)
- : route (s), type(tp)
+Route::ToggleControllable::ToggleControllable (std::string name, Route& s, ToggleType tp)
+ : Controllable (name), route (s), type(tp)
{
}
}
void
-Route::set_block_size (jack_nframes_t nframes)
+Route::set_block_size (nframes_t nframes)
{
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
(*i)->set_block_size (nframes);
}
void
-Send::run (BufferSet& bufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset)
+Send::run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset)
{
if (active()) {
#include <ardour/data_type.h>
#include <ardour/buffer_set.h>
#include <ardour/source_factory.h>
+#include <ardour/region_factory.h>
#ifdef HAVE_LIBLO
#include <ardour/osc.h>
sigc::signal<void> Session::SendFeedback;
sigc::signal<void> Session::SMPTEOffsetChanged;
-sigc::signal<void> Session::SMPTETypeChanged;
-sigc::signal<void> Session::PullupChanged;
sigc::signal<void> Session::StartTimeChanged;
sigc::signal<void> Session::EndTimeChanged;
first_stage_init (fullpath, snapshot_name);
- if (create (new_session, mix_template, _engine.frame_rate() * 60 * 5)) {
- cerr << "create failed\n";
- throw failed_constructor ();
+ new_session = !g_file_test (_path.c_str(), GFileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR));
+ if (new_session) {
+ if (create (new_session, mix_template, _engine.frame_rate() * 60 * 5)) {
+ cerr << "create failed\n";
+ throw failed_constructor ();
+ }
}
if (second_stage_init (new_session)) {
_state_of_the_state = StateOfTheState (_state_of_the_state & ~Dirty);
- Config->ParameterChanged.connect (mem_fun (*this, &Session::handle_configuration_change));
+ Config->ParameterChanged.connect (mem_fun (*this, &Session::config_changed));
if (was_dirty) {
DirtyChanged (); /* EMIT SIGNAL */
uint32_t master_out_channels,
uint32_t requested_physical_in,
uint32_t requested_physical_out,
- jack_nframes_t initial_length)
+ nframes_t initial_length)
: _engine (eng),
_scratch_buffers(new BufferSet()),
n_physical_inputs = max (requested_physical_in, _engine.n_physical_inputs());
first_stage_init (fullpath, snapshot_name);
-
- if (create (new_session, 0, initial_length)) {
- throw failed_constructor ();
+
+ new_session = !g_file_test (_path.c_str(), GFileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR));
+ if (new_session) {
+ if (create (new_session, 0, initial_length)) {
+ throw failed_constructor ();
+ }
}
if (control_out_channels) {
output_ac = AutoConnectOption (output_ac & ~AutoConnectMaster);
}
- input_auto_connect = input_ac;
- output_auto_connect = output_ac;
+ Config->set_input_auto_connect (input_ac);
+ Config->set_output_auto_connect (output_ac);
if (second_stage_init (new_session)) {
throw failed_constructor ();
set_block_size (_engine.frames_per_cycle());
set_frame_rate (_engine.frame_rate());
+ Config->map_parameters (mem_fun (*this, &Session::config_changed));
+
/* every time we reconnect, recompute worst case output latencies */
_engine.Running.connect (mem_fun (*this, &Session::set_worst_io_latencies));
if (_click_io->set_state (*child->children().front()) == 0) {
- _clicking = click_requested;
+ _clicking = Config->get_clicking ();
} else {
if (_click_io->add_output_port (first_physical_output, this)) {
// relax, even though its an error
} else {
- _clicking = click_requested;
+ _clicking = Config->get_clicking ();
}
}
}
set_worst_io_latencies ();
if (_clicking) {
- ControlChanged (Clicking); /* EMIT SIGNAL */
+ // XXX HOW TO ALERT UI TO THIS ? DO WE NEED TO?
}
if (auditioner == 0) {
// return false;
// }
- if (all_safe) {
+ if (Config->get_all_safe()) {
return false;
}
return true;
}
-void
-Session::set_auto_play (bool yn)
-{
- if (auto_play != yn) {
- auto_play = yn;
- set_dirty ();
- ControlChanged (AutoPlay);
- }
-}
-
-void
-Session::set_auto_return (bool yn)
-{
- if (auto_return != yn) {
- auto_return = yn;
- set_dirty ();
- ControlChanged (AutoReturn);
- }
-}
-
-void
-Session::set_crossfades_active (bool yn)
-{
- if (crossfades_active != yn) {
- crossfades_active = yn;
- set_dirty ();
- ControlChanged (CrossFadesActive);
- }
-}
-
-void
-Session::set_do_not_record_plugins (bool yn)
-{
- if (do_not_record_plugins != yn) {
- do_not_record_plugins = yn;
- set_dirty ();
- ControlChanged (RecordingPlugins);
- }
-}
-
-void
-Session::set_auto_input (bool yn)
-{
- if (auto_input != yn) {
- auto_input = yn;
-
- if (Config->get_use_hardware_monitoring() && transport_rolling()) {
- /* auto-input only makes a difference if we're rolling */
-
- boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
-
- for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
- if ((*i)->record_enabled ()) {
- //cerr << "switching to input = " << !auto_input << __FILE__ << __LINE__ << endl << endl;
- (*i)->monitor_input (!auto_input);
- }
- }
- }
-
- set_dirty();
- ControlChanged (AutoInput);
- }
-}
-
void
Session::reset_input_monitor_state ()
{
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if ((*i)->record_enabled ()) {
//cerr << "switching to input = " << !auto_input << __FILE__ << __LINE__ << endl << endl;
- (*i)->monitor_input (Config->get_use_hardware_monitoring() && !auto_input);
+ (*i)->monitor_input (Config->get_monitoring_model() == HardwareMonitoring && !Config->get_auto_input());
}
}
} else {
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if ((*i)->record_enabled ()) {
- //cerr << "switching to input = " << !auto_input << __FILE__ << __LINE__ << endl << endl;
- (*i)->monitor_input (Config->get_use_hardware_monitoring());
+ //cerr << "switching to input = " << !Config->get_auto_input() << __FILE__ << __LINE__ << endl << endl;
+ (*i)->monitor_input (Config->get_monitoring_model() == HardwareMonitoring);
}
}
}
}
-
-void
-Session::set_input_auto_connect (bool yn)
-{
- if (yn) {
- input_auto_connect = AutoConnectOption (input_auto_connect|AutoConnectPhysical);
- } else {
- input_auto_connect = AutoConnectOption (input_auto_connect|~AutoConnectPhysical);
- }
- set_dirty ();
-}
-
-bool
-Session::get_input_auto_connect () const
-{
- return (input_auto_connect & AutoConnectPhysical);
-}
-
-void
-Session::set_output_auto_connect (AutoConnectOption aco)
-{
- output_auto_connect = aco;
- set_dirty ();
-}
-
void
Session::auto_punch_start_changed (Location* location)
{
replace_event (Event::PunchIn, location->start());
- if (get_record_enabled() && get_punch_in()) {
+ if (get_record_enabled() && Config->get_punch_in()) {
/* capture start has been changed, so save new pending state */
save_state ("", true);
}
void
Session::auto_punch_end_changed (Location* location)
{
- jack_nframes_t when_to_stop = location->end();
+ nframes_t when_to_stop = location->end();
// when_to_stop += _worst_output_latency + _worst_input_latency;
replace_event (Event::PunchOut, when_to_stop);
}
void
Session::auto_punch_changed (Location* location)
{
- jack_nframes_t when_to_stop = location->end();
+ nframes_t when_to_stop = location->end();
replace_event (Event::PunchIn, location->start());
//when_to_stop += _worst_output_latency + _worst_input_latency;
{
replace_event (Event::AutoLoop, location->end(), location->start());
- if (transport_rolling() && get_auto_loop()) {
+ if (transport_rolling() && play_loop) {
//if (_transport_frame < location->start() || _transport_frame > location->end()) {
request_locate (location->start(), true);
}
- else if (seamless_loop && !loop_changing) {
+ else if (Config->get_seamless_loop() && !loop_changing) {
// schedule a locate-roll to refill the diskstreams at the
// previous loop end
auto_punch_location_changed (location);
}
-void
-Session::set_punch_in (bool yn)
-{
- if (punch_in == yn) {
- return;
- }
-
- Location* location;
-
- if ((location = _locations.auto_punch_location()) != 0) {
- if ((punch_in = yn) == true) {
- replace_event (Event::PunchIn, location->start());
- } else {
- remove_event (location->start(), Event::PunchIn);
- }
- }
-
- set_dirty();
- ControlChanged (PunchIn); /* EMIT SIGNAL */
-}
-
-void
-Session::set_punch_out (bool yn)
-{
- if (punch_out == yn) {
- return;
- }
-
- Location* location;
-
- if ((location = _locations.auto_punch_location()) != 0) {
- if ((punch_out = yn) == true) {
- replace_event (Event::PunchOut, location->end());
- } else {
- clear_events (Event::PunchOut);
- }
- }
-
- set_dirty();
- ControlChanged (PunchOut); /* EMIT SIGNAL */
-}
-
void
Session::set_auto_loop_location (Location* location)
{
_last_record_location = _transport_frame;
deliver_mmc(MIDI::MachineControl::cmdRecordStrobe, _last_record_location);
- if (Config->get_use_hardware_monitoring() && auto_input) {
+ if (Config->get_monitoring_model() == HardwareMonitoring && Config->get_auto_input()) {
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if ((*i)->record_enabled ()) {
if (rt_context)
deliver_mmc (MIDI::MachineControl::cmdRecordExit, _transport_frame);
- if (Config->get_use_hardware_monitoring() && auto_input) {
+ if (Config->get_monitoring_model() == HardwareMonitoring && Config->get_auto_input()) {
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
{
g_atomic_int_set (&_record_status, Enabled);
- if (Config->get_use_hardware_monitoring()) {
+ if (Config->get_monitoring_model() == HardwareMonitoring) {
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
- if (auto_input && (*i)->record_enabled ()) {
+ if (Config->get_auto_input() && (*i)->record_enabled ()) {
//cerr << "switching from input" << __FILE__ << __LINE__ << endl << endl;
(*i)->monitor_input (false);
}
{
g_atomic_int_set (&_record_status, Enabled);
- /* XXX this save should really happen in another thread. its needed so that
- pending capture state can be recovered if we crash.
+ /* this function is currently called from somewhere other than an RT thread.
+ this save_state() call therefore doesn't impact anything.
*/
save_state ("", true);
if (_transport_speed) {
- if (!punch_in) {
+ if (!Config->get_punch_in()) {
enable_record ();
}
} else {
set_dirty();
}
-jack_nframes_t
+nframes_t
Session::audible_frame () const
{
- jack_nframes_t ret;
- jack_nframes_t offset;
- jack_nframes_t tf;
+ nframes_t ret;
+ nframes_t offset;
+ nframes_t tf;
/* the first of these two possible settings for "offset"
mean that the audible frame is stationary until
}
void
-Session::set_frame_rate (jack_nframes_t frames_per_second)
+Session::set_frame_rate (nframes_t frames_per_second)
{
- /** \fn void Session::set_frame_size(jack_nframes_t)
+ /** \fn void Session::set_frame_size(nframes_t)
the AudioEngine object that calls this guarantees
that it will not be called while we are also in
::process(). Its fine to do things that block
sync_time_vars();
- Route::set_automation_interval ((jack_nframes_t) ceil ((double) frames_per_second * 0.25));
-
// XXX we need some equivalent to this, somehow
// DestructiveFileSource::setup_standard_crossfades (frames_per_second);
}
void
-Session::set_block_size (jack_nframes_t nframes)
+Session::set_block_size (nframes_t nframes)
{
/* the AudioEngine guarantees
that it will not be called while we are also in
Session::set_default_fade (float steepness, float fade_msecs)
{
#if 0
- jack_nframes_t fade_frames;
+ nframes_t fade_frames;
/* Don't allow fade of less 1 frame */
} else {
- fade_frames = (jack_nframes_t) floor (fade_msecs * _current_frame_rate * 0.001);
+ fade_frames = (nframes_t) floor (fade_msecs * _current_frame_rate * 0.001);
}
} while (track_id < (UINT_MAX-1));
- if (input_auto_connect & AutoConnectPhysical) {
+ if (Config->get_input_auto_connect() & AutoConnectPhysical) {
nphysical_in = min (n_physical_inputs, (uint32_t) physinputs.size());
} else {
nphysical_in = 0;
}
- if (output_auto_connect & AutoConnectPhysical) {
+ if (Config->get_output_auto_connect() & AutoConnectPhysical) {
nphysical_out = min (n_physical_outputs, (uint32_t) physinputs.size());
} else {
nphysical_out = 0;
port = "";
- if (input_auto_connect & AutoConnectPhysical) {
+ if (Config->get_input_auto_connect() & AutoConnectPhysical) {
port = physinputs[(channels_used+x)%nphysical_in];
}
port = "";
- if (nphysical_out && (output_auto_connect & AutoConnectPhysical)) {
+ if (nphysical_out && (Config->get_output_auto_connect() & AutoConnectPhysical)) {
port = physoutputs[(channels_used+x)%nphysical_out];
- } else if (output_auto_connect & AutoConnectMaster) {
+ } else if (Config->get_output_auto_connect() & AutoConnectMaster) {
if (_master_out) {
port = _master_out->input (x%_master_out->n_inputs().get(DataType::AUDIO))->name();
}
port = "";
- if (input_auto_connect & AutoConnectPhysical) {
+ if (Config->get_input_auto_connect() & AutoConnectPhysical) {
port = physinputs[((n+x)%n_physical_inputs)];
}
port = "";
- if (output_auto_connect & AutoConnectPhysical) {
+ if (Config->get_output_auto_connect() & AutoConnectPhysical) {
port = physoutputs[((n+x)%n_physical_outputs)];
- } else if (output_auto_connect & AutoConnectMaster) {
+ } else if (Config->get_output_auto_connect() & AutoConnectMaster) {
if (_master_out) {
port = _master_out->input (x%_master_out->n_inputs().get(DataType::AUDIO))->name();
}
}
for (RouteList::iterator x = new_routes.begin(); x != new_routes.end(); ++x) {
- (*x)->solo_changed.connect (sigc::bind (mem_fun (*this, &Session::route_solo_changed), (*x)));
+
+ boost::weak_ptr<Route> wpr (*x);
+
+ (*x)->solo_changed.connect (sigc::bind (mem_fun (*this, &Session::route_solo_changed), wpr));
(*x)->mute_changed.connect (mem_fun (*this, &Session::route_mute_changed));
(*x)->output_changed.connect (mem_fun (*this, &Session::set_worst_io_latencies_x));
(*x)->redirects_changed.connect (mem_fun (*this, &Session::update_latency_compensation_proxy));
*/
if (route == _master_out) {
- _master_out = shared_ptr<Route> ((Route*) 0);
+ _master_out = shared_ptr<Route> ();
}
if (route == _control_out) {
- _control_out = shared_ptr<Route> ((Route*) 0);
+ _control_out = shared_ptr<Route> ();
/* cancel control outs for all routes */
update_latency_compensation (false, false);
set_dirty();
+
+ // We need to disconnect the routes inputs and outputs
+ route->disconnect_inputs(NULL);
+ route->disconnect_outputs(NULL);
- /* XXX should we disconnect from the Route's signals ? */
+ /* get rid of it from the dead wood collection in the route list manager */
+
+ /* XXX i think this is unsafe as it currently stands, but i am not sure. (pd, october 2nd, 2006) */
- save_state (_current_snapshot_name);
+ routes.flush ();
/* try to cause everyone to drop their references */
route->drop_references ();
+
+ /* save the new state of the world */
+
+ if (save_state (_current_snapshot_name)) {
+ save_history (_current_snapshot_name);
+ }
}
void
}
void
-Session::route_solo_changed (void* src, shared_ptr<Route> route)
+Session::route_solo_changed (void* src, boost::weak_ptr<Route> wpr)
{
if (solo_update_disabled) {
// We know already
}
bool is_track;
-
- is_track = (dynamic_cast<Track*>(route.get()) != 0);
+ boost::shared_ptr<Route> route = wpr.lock ();
+
+ if (!route) {
+ /* should not happen */
+ error << string_compose (_("programming error: %1"), X_("invalid route weak ptr passed to route_solo_changed")) << endmsg;
+ return;
+ }
+
+ is_track = (boost::dynamic_pointer_cast<AudioTrack>(route) != 0);
shared_ptr<RouteList> r = routes.reader ();
then leave it as it is.
*/
- if (_solo_latched) {
+ if (Config->get_solo_latched()) {
continue;
}
}
set_dirty();
}
-void
-Session::set_solo_latched (bool yn)
-{
- if (yn != _solo_latched) {
- _solo_latched = yn;
- set_dirty ();
- ControlChanged (SoloLatch);
- }
-}
-
void
Session::update_route_solo_state ()
{
return;
}
- jack_nframes_t max = get_maximum_extent ();
+ nframes_t max = get_maximum_extent ();
if (max > end_location->end()) {
end_location->set_end (max);
}
}
-jack_nframes_t
+nframes_t
Session::get_maximum_extent () const
{
- jack_nframes_t max = 0;
- jack_nframes_t me;
+ nframes_t max = 0;
+ nframes_t me;
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
set_dirty();
if (added) {
- region->GoingAway.connect (sigc::bind (mem_fun (*this, &Session::remove_region), region));
- region->StateChanged.connect (sigc::bind (mem_fun (*this, &Session::region_changed), region));
+ region->GoingAway.connect (sigc::bind (mem_fun (*this, &Session::remove_region), boost::weak_ptr<Region>(region)));
+ region->StateChanged.connect (sigc::bind (mem_fun (*this, &Session::region_changed), boost::weak_ptr<Region>(region)));
RegionAdded (region); /* EMIT SIGNAL */
}
}
void
-Session::region_changed (Change what_changed, boost::shared_ptr<Region> region)
+Session::region_changed (Change what_changed, boost::weak_ptr<Region> weak_region)
{
+ boost::shared_ptr<Region> region (weak_region.lock ());
+
+ if (!region) {
+ return;
+ }
+
if (what_changed & Region::HiddenChanged) {
/* relay hidden changes */
RegionHiddenChange (region);
}
void
-Session::region_renamed (boost::shared_ptr<Region> region)
-{
- add_region (region);
-}
-
-void
-Session::remove_region (boost::shared_ptr<Region> region)
+Session::remove_region (boost::weak_ptr<Region> weak_region)
{
RegionList::iterator i;
+ boost::shared_ptr<Region> region (weak_region.lock ());
+
+ if (!region) {
+ return;
+ }
+
bool removed = false;
-
+
{
Glib::Mutex::Lock lm (region_lock);
}
}
- return boost::shared_ptr<AudioRegion> ((AudioRegion*) 0);
+ return boost::shared_ptr<AudioRegion> ();
}
void
boost::shared_ptr<Source> source = src.lock();
if (!source) {
- cerr << "removing a source DEAD\n";
- } else {
- cerr << "removing a source " << source->name () << endl;
+ return;
+ }
+
+ {
+ Glib::Mutex::Lock lm (source_lock);
{
Glib::Mutex::Lock lm (source_lock);
sources.erase (i);
}
}
+ }
+
+ if (!_state_of_the_state & InCleanup) {
- if (!_state_of_the_state & InCleanup) {
-
- /* save state so we don't end up with a session file
- referring to non-existent sources.
- */
-
- save_state (_current_snapshot_name);
- }
+ /* save state so we don't end up with a session file
+ referring to non-existent sources.
+ */
- SourceRemoved(source); /* EMIT SIGNAL */
+ save_state (_current_snapshot_name);
}
+
+ SourceRemoved(source); /* EMIT SIGNAL */
}
boost::shared_ptr<Source>
set_dirty();
}
-jack_nframes_t
+nframes_t
Session::available_capture_duration ()
{
- const double scale = 4096.0 / sizeof (Sample);
+ float sample_bytes_on_disk;
+
+ switch (Config->get_native_file_data_format()) {
+ case FormatFloat:
+ sample_bytes_on_disk = 4;
+ break;
+
+ case FormatInt24:
+ sample_bytes_on_disk = 3;
+ break;
+ }
+
+ double scale = 4096.0 / sample_bytes_on_disk;
if (_total_free_4k_blocks * scale > (double) max_frames) {
return max_frames;
}
- return (jack_nframes_t) floor (_total_free_4k_blocks * scale);
+ return (nframes_t) floor (_total_free_4k_blocks * scale);
}
void
return 0;
}
-void
-Session::set_edit_mode (EditMode mode)
-{
- _edit_mode = mode;
-
- {
- Glib::Mutex::Lock lm (playlist_lock);
-
- for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) {
- (*i)->set_edit_mode (mode);
- }
- }
-
- set_dirty ();
- ControlChanged (EditingMode); /* EMIT SIGNAL */
-}
-
void
Session::tempo_map_changed (Change ignored)
{
}
void
-Session::set_solo_model (SoloModel sm)
-{
- if (sm != _solo_model) {
- _solo_model = sm;
- ControlChanged (SoloingModel);
- set_dirty ();
- }
-}
-
-void
-Session::allocate_pan_automation_buffers (jack_nframes_t nframes, uint32_t howmany, bool force)
+Session::allocate_pan_automation_buffers (nframes_t nframes, uint32_t howmany, bool force)
{
if (!force && howmany <= _npan_buffers) {
return;
}
int
-Session::write_one_audio_track (AudioTrack& track, jack_nframes_t start, jack_nframes_t len,
+Session::write_one_audio_track (AudioTrack& track, nframes_t start, nframes_t len,
bool overwrite, vector<boost::shared_ptr<Source> >& srcs, InterThreadInfo& itt)
{
boost::shared_ptr<AudioFileSource> fsource;
BufferSet buffers;
// any bigger than this seems to cause stack overflows in called functions
- const jack_nframes_t chunk_size = (128 * 1024)/4;
+ const nframes_t chunk_size = (128 * 1024)/4;
g_atomic_int_set (&processing_prohibited, 1);
to_do = len;
/* create a set of reasonably-sized buffers */
-buffers.ensure_buffers(nchans, chunk_size);
+ buffers.ensure_buffers(nchans, chunk_size);
buffers.set_count(nchans);
while (to_do && !itt.cancel) {
afs->build_peaks ();
}
}
-
+
+ /* construct a region to represent the bounced material */
+
+ boost::shared_ptr<Region> aregion = RegionFactory::create (srcs, 0, srcs.front()->length(),
+ region_name_from_path (srcs.front()->name()));
+
ret = 0;
}
return n;
}
-void
-Session::set_layer_model (LayerModel lm)
-{
- if (lm != layer_model) {
- layer_model = lm;
- set_dirty ();
- ControlChanged (LayeringModel);
- }
-}
-
-void
-Session::set_xfade_model (CrossfadeModel xm)
-{
- if (xm != xfade_model) {
- xfade_model = xm;
- set_dirty ();
- ControlChanged (CrossfadingModel);
- }
-}
-
-void
-Session::handle_configuration_change (const char* parameter)
-{
- if (!strcmp (parameter, "use-video-sync")) {
- if (_transport_speed == 0.0f) {
- waiting_for_sync_offset = true;
- }
- }
-}
-
void
Session::add_curve(Curve *curve)
{
Pool Session::Click::pool ("click", sizeof (Click), 128);
void
-Session::click (jack_nframes_t start, jack_nframes_t nframes, jack_nframes_t offset)
+Session::click (nframes_t start, nframes_t nframes, nframes_t offset)
{
TempoMap::BBTPointList *points;
Sample *buf;
for (list<Click*>::iterator i = clicks.begin(); i != clicks.end(); ) {
- jack_nframes_t copy;
- jack_nframes_t internal_offset;
+ nframes_t copy;
+ nframes_t internal_offset;
Click *clk;
list<Click*>::iterator next;
click_data = 0;
}
- if (click_sound.length() == 0) {
+ string path = Config->get_click_emphasis_sound();
+
+ if (path.empty()) {
click_data = const_cast<Sample*> (default_click);
click_length = default_click_length;
} else {
- if ((sndfile = sf_open (click_sound.c_str(), SFM_READ, &info)) == 0) {
+ if ((sndfile = sf_open (path.c_str(), SFM_READ, &info)) == 0) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
- warning << string_compose (_("cannot open click soundfile %1 (%2)"), click_sound, errbuf) << endmsg;
+ warning << string_compose (_("cannot open click soundfile %1 (%2)"), path, errbuf) << endmsg;
_clicking = false;
return;
}
click_emphasis_data = 0;
}
- if (click_emphasis_sound.length() == 0) {
+ string path = Config->get_click_emphasis_sound();
+
+ if (path.empty()) {
click_emphasis_data = const_cast<Sample*> (default_click_emphasis);
click_emphasis_length = default_click_emphasis_length;
} else {
- if ((sndfile = sf_open (click_emphasis_sound.c_str(), SFM_READ, &info)) == 0) {
+ if ((sndfile = sf_open (path.c_str(), SFM_READ, &info)) == 0) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
- warning << string_compose (_("cannot open click emphasis soundfile %1 (%2)"), click_emphasis_sound, errbuf) << endmsg;
+ warning << string_compose (_("cannot open click emphasis soundfile %1 (%2)"), path, errbuf) << endmsg;
return;
}
clicks.clear ();
}
-
-void
-Session::set_click_sound (string path)
-{
- if (path != click_sound) {
- click_sound = path;
- setup_click_sounds (1);
- }
-}
-
-void
-Session::set_click_emphasis_sound (string path)
-{
- if (path != click_emphasis_sound) {
- click_emphasis_sound = path;
- setup_click_sounds (-1);
- }
-}
-
-void
-Session::set_clicking (bool yn)
-{
- if (click_requested != yn) {
- click_requested = yn;
-
- if (yn) {
- if (_click_io && click_data) {
- _clicking = true;
- }
- } else {
- _clicking = false;
- }
-
- ControlChanged (Clicking); /* EMIT SIGNAL */
- }
-}
-
-bool
-Session::get_clicking () const
-{
- return click_requested;
-}
-
};
void
-Session::add_event (jack_nframes_t frame, Event::Type type, jack_nframes_t target_frame)
+Session::add_event (nframes_t frame, Event::Type type, nframes_t target_frame)
{
Event* ev = new Event (type, Event::Add, frame, target_frame, 0);
queue_event (ev);
}
void
-Session::remove_event (jack_nframes_t frame, Event::Type type)
+Session::remove_event (nframes_t frame, Event::Type type)
{
Event* ev = new Event (type, Event::Remove, frame, 0, 0);
queue_event (ev);
}
void
-Session::replace_event (Event::Type type, jack_nframes_t frame, jack_nframes_t target)
+Session::replace_event (Event::Type type, nframes_t frame, nframes_t target)
{
Event* ev = new Event (type, Event::Replace, frame, target, 0);
queue_event (ev);
switch (ev->type) {
case Event::SetLoop:
- set_auto_loop (ev->yes_or_no);
+ set_play_loop (ev->yes_or_no);
+ break;
+
+ case Event::AutoLoop:
+ if (play_loop) {
+ start_locate (ev->target_frame, true, false, Config->get_seamless_loop());
+ }
+ remove = false;
+ del = false;
break;
case Event::Locate:
case Event::PunchIn:
// cerr << "PunchIN at " << transport_frame() << endl;
- if (punch_in && record_status() == Enabled) {
+ if (Config->get_punch_in() && record_status() == Enabled) {
enable_record ();
}
remove = false;
case Event::PunchOut:
// cerr << "PunchOUT at " << transport_frame() << endl;
- if (punch_out) {
+ if (Config->get_punch_out()) {
step_back_from_record ();
}
remove = false;
del = false;
break;
- case Event::AutoLoop:
- if (auto_loop) {
- start_locate (ev->target_frame, true, false, seamless_loop);
- }
- remove = false;
- del = false;
- break;
-
case Event::Overwrite:
overwrite_some_buffers (static_cast<AudioDiskstream*>(ev->ptr));
break;
break;
case Event::SetSlaveSource:
- set_slave_source (ev->slave, ev->target_frame);
+ set_slave_source (ev->slave);
break;
case Event::Audition:
}
int
-AudioExportSpecification::prepare (jack_nframes_t blocksize, jack_nframes_t frate)
+AudioExportSpecification::prepare (nframes_t blocksize, nframes_t frate)
{
char errbuf[256];
GDitherSize dither_size;
}
src_data.src_ratio = sample_rate / (double) frame_rate;
- out_samples_max = (jack_nframes_t) ceil (blocksize * src_data.src_ratio * channels);
+ out_samples_max = (nframes_t) ceil (blocksize * src_data.src_ratio * channels);
dataF2 = new float[out_samples_max];
max_leftover_frames = 4 * blocksize;
}
int
-AudioExportSpecification::process (jack_nframes_t nframes)
+AudioExportSpecification::process (nframes_t nframes)
{
float* float_buffer = 0;
uint32_t chn;
uint32_t i;
sf_count_t written;
char errbuf[256];
- jack_nframes_t to_write = 0;
+ nframes_t to_write = 0;
int cnt = 0;
do {
break;
}
- if ((jack_nframes_t) written != to_write) {
+ if ((nframes_t) written != to_write) {
sf_error_str (out, errbuf, sizeof (errbuf) - 1);
error << string_compose(_("Export: could not write data to output file (%1)"), errbuf) << endmsg;
return -1;
/* restart slaving */
if (post_export_slave != None) {
- set_slave_source (post_export_slave, post_export_position);
+ Config->set_slave_source (post_export_slave);
} else {
locate (post_export_position, false, false, false);
}
/* no slaving */
- post_export_slave = _slave_type;
+ post_export_slave = Config->get_slave_source ();
post_export_position = _transport_frame;
- set_slave_source (None, 0);
+ Config->set_slave_source (None);
/* get transport ready */
}
int
-Session::process_export (jack_nframes_t nframes, AudioExportSpecification* spec)
+Session::process_export (nframes_t nframes, AudioExportSpecification* spec)
{
uint32_t chn;
uint32_t x;
int ret = -1;
- jack_nframes_t this_nframes;
+ nframes_t this_nframes;
/* This is not required to be RT-safe because we are running while freewheeling */
MTC, MMC, etc.
**********************************************************************/
-void
-Session::set_mmc_control (bool yn)
-{
-#if 0
- if (mmc_control == yn) {
- return;
- }
-
- mmc_control = yn;
- set_dirty();
- poke_midi_thread ();
-#endif
- ControlChanged (MMCControl); /* EMIT SIGNAL */
-}
-
-void
-Session::set_midi_control (bool yn)
-{
-#if 0
- if (midi_control == yn) {
- return;
- }
-
- midi_control = yn;
- set_dirty();
- poke_midi_thread ();
-#endif
- ControlChanged (MidiControl); /* EMIT SIGNAL */
-}
-
-void
-Session::set_send_mtc (bool yn)
-{
- /* set the persistent option value regardless */
-
- send_midi_timecode = yn;
- set_dirty();
-
- /* only set the internal flag if we have
- a port.
- */
-
- if (_mtc_port == 0 || send_mtc == yn) {
- return;
- }
-
- send_mtc = yn;
- ControlChanged (SendMTC); /* EMIT SIGNAL */
-}
-
-void
-Session::set_send_mmc (bool yn)
-{
- cerr << "set send mmc " << yn << endl;
-
- if (_mmc_port == 0) {
- cerr << "\tno 1\n";
- return;
- }
-
- if (send_midi_machine_control == yn) {
- cerr << "\tno 2\n";
- return;
- }
-
- /* only set the internal flag if we have
- a port.
- */
-
- if (_mmc_port) {
- cerr << "\tyes\n";
- send_mmc = yn;
- }
-
- /* set the persistent option value regardless */
-
- send_midi_machine_control = yn;
- set_dirty();
-
- ControlChanged (SendMMC); /* EMIT SIGNAL */
-}
-
-void
-Session::set_midi_feedback (bool yn)
-{
-}
-
-bool
-Session::get_midi_feedback () const
-{
- return false;
-}
-
-bool
-Session::get_send_mtc () const
-{
- return send_mtc;
-}
-
-bool
-Session::get_send_mmc () const
-{
- return send_mmc;
-}
-
int
Session::set_mtc_port (string port_tag)
{
+#if 0
MTC_Slave *ms;
if (port_tag.length() == 0) {
Config->set_mtc_port_name (port_tag);
out:
+ #endif
MTC_PortChanged(); /* EMIT SIGNAL */
change_midi_ports ();
set_dirty();
int
Session::set_mmc_port (string port_tag)
{
+#if 0
if (port_tag.length() == 0) {
if (_mmc_port == 0) {
return 0;
_mmc_port->input()->stop.connect (mem_fun (*this, &Session::spp_stop));
Config->set_mmc_port_name (port_tag);
-
out:
+#endif
MMC_PortChanged(); /* EMIT SIGNAL */
change_midi_ports ();
set_dirty();
int
Session::set_midi_port (string port_tag)
{
+#if 0
if (port_tag.length() == 0) {
if (_midi_port == 0) {
return 0;
Config->set_midi_port_name (port_tag);
out:
+#endif
MIDI_PortChanged(); /* EMIT SIGNAL */
change_midi_ports ();
set_dirty();
void
Session::set_trace_midi_input (bool yn, MIDI::Port* port)
{
+#if 0
MIDI::Parser* input_parser;
if (port) {
}
}
}
+#endif
Config->set_trace_midi_input (yn);
}
void
Session::set_trace_midi_output (bool yn, MIDI::Port* port)
{
+#if 0
MIDI::Parser* output_parser;
if (port) {
}
}
+#endif
Config->set_trace_midi_output (yn);
}
bool
Session::get_trace_midi_input(MIDI::Port *port)
{
+#if 0
MIDI::Parser* input_parser;
if (port) {
if ((input_parser = port->input()) != 0) {
}
}
}
+#endif
return false;
}
bool
Session::get_trace_midi_output(MIDI::Port *port)
{
+#if 0
MIDI::Parser* output_parser;
if (port) {
if ((output_parser = port->output()) != 0) {
}
}
}
+#endif
return false;
if (_mmc_port != 0) {
- send_mmc = send_midi_machine_control;
+ Config->set_send_mmc (session_send_mmc);
} else {
mmc = 0;
- send_mmc = false;
+ session_send_mmc = false;
}
if (_mtc_port != 0) {
- send_mtc = send_midi_timecode;
+ Config->set_send_mtc (session_send_mtc);
} else {
-
- send_mtc = false;
+ session_send_mtc = false;
}
}
void
Session::spp_start (Parser& ignored)
{
- if (mmc_control && (_slave_type != MTC)) {
+ if (Config->get_mmc_control() && (Config->get_slave_source() != MTC)) {
request_transport_speed (1.0);
}
}
void
Session::spp_stop (Parser& ignored)
{
- if (mmc_control) {
+ if (Config->get_mmc_control()) {
request_stop ();
}
}
void
Session::mmc_deferred_play (MIDI::MachineControl &mmc)
{
- if (mmc_control && (_slave_type != MTC)) {
+ if (Config->get_mmc_control() && (Config->get_slave_source() != MTC)) {
request_transport_speed (1.0);
}
}
void
Session::mmc_record_pause (MIDI::MachineControl &mmc)
{
- if (mmc_control) {
+ if (Config->get_mmc_control()) {
maybe_enable_record();
}
}
void
Session::mmc_record_strobe (MIDI::MachineControl &mmc)
{
- if (!mmc_control)
+ if (!Config->get_mmc_control())
return;
/* record strobe does an implicit "Play" command */
void
Session::mmc_record_exit (MIDI::MachineControl &mmc)
{
- if (mmc_control) {
+ if (Config->get_mmc_control()) {
disable_record (false);
}
}
void
Session::mmc_stop (MIDI::MachineControl &mmc)
{
- if (mmc_control) {
+ if (Config->get_mmc_control()) {
request_stop ();
}
}
void
Session::mmc_pause (MIDI::MachineControl &mmc)
{
- if (mmc_control) {
+ if (Config->get_mmc_control()) {
/* We support RECORD_PAUSE, so the spec says that
we must interpret PAUSE like RECORD_PAUSE if
void
Session::mmc_step (MIDI::MachineControl &mmc, int steps)
{
- if (!mmc_control) {
+ if (!Config->get_mmc_control()) {
return;
}
}
double diff_secs = diff.tv_sec + (diff.tv_usec / 1000000.0);
- double cur_speed = (((steps * 0.5) * smpte_frames_per_second) / diff_secs) / smpte_frames_per_second;
+ double cur_speed = (((steps * 0.5) * Config->get_smpte_frames_per_second()) / diff_secs) / Config->get_smpte_frames_per_second();
if (_transport_speed == 0 || cur_speed * _transport_speed < 0) {
/* change direction */
void
Session::mmc_rewind (MIDI::MachineControl &mmc)
{
- if (mmc_control) {
+ if (Config->get_mmc_control()) {
request_transport_speed(-8.0f);
}
}
void
Session::mmc_fast_forward (MIDI::MachineControl &mmc)
{
- if (mmc_control) {
+ if (Config->get_mmc_control()) {
request_transport_speed(8.0f);
}
}
void
Session::mmc_locate (MIDI::MachineControl &mmc, const MIDI::byte* mmc_tc)
{
- if (!mmc_control) {
+ if (!Config->get_mmc_control()) {
return;
}
- jack_nframes_t target_frame;
+ nframes_t target_frame;
SMPTE::Time smpte;
smpte.hours = mmc_tc[0] & 0xf;
void
Session::mmc_shuttle (MIDI::MachineControl &mmc, float speed, bool forw)
{
- cerr << "MMC shuttle, speed = " << speed << endl;
-
- if (!mmc_control) {
+ if (!Config->get_mmc_control()) {
return;
}
- if (shuttle_speed_threshold >= 0 && speed > shuttle_speed_threshold) {
- speed *= shuttle_speed_factor;
+ if (Config->get_shuttle_speed_threshold() >= 0 && speed > Config->get_shuttle_speed_threshold()) {
+ speed *= Config->get_shuttle_speed_factor();
}
- cerr << "requested MMC control speed = " << speed << endl;
-
if (forw) {
request_transport_speed (speed);
} else {
void
Session::mmc_record_enable (MIDI::MachineControl &mmc, size_t trk, bool enabled)
{
- if (mmc_control) {
+ if (Config->get_mmc_control()) {
RouteList::iterator i;
boost::shared_ptr<RouteList> r = routes.reader();
_send_smpte_update = false;
- if (_mtc_port == 0 || !send_mtc) {
+ if (_mtc_port == 0 || !session_send_mtc) {
return 0;
}
printf("Negative????\n");
}
- if (_mtc_port == 0 || !send_mtc || transmitting_smpte_time.negative
+ if (_mtc_port == 0 || !session_send_mtc || transmitting_smpte_time.negative
/*|| (next_quarter_frame_to_send < 0)*/ ) {
//printf("(MTC) Not sending MTC\n");
return 0;
**********************************************************************/
/*
void
-Session::send_mmc_in_another_thread (MIDI::MachineControl::Command cmd, jack_nframes_t target_frame)
+Session::send_mmc_in_another_thread (MIDI::MachineControl::Command cmd, nframes_t target_frame)
{
MIDIRequest* request;
- if (_mtc_port == 0 || !send_mmc) {
+ if (_mtc_port == 0 || !session_send_mmc) {
return;
}
* this process cycle or horrible things will happen.
*/
void
-Session::deliver_mmc (MIDI::MachineControl::Command cmd, jack_nframes_t where)
+Session::deliver_mmc (MIDI::MachineControl::Command cmd, nframes_t where)
{
using namespace MIDI;
int nbytes = 4;
SMPTE::Time smpte;
- if (_mmc_port == 0 || !send_mmc) {
+ if (_mmc_port == 0 || !session_send_mmc) {
//cerr << "Not delivering MMC " << _mmc_port << " - " << send_mmc << endl;
return;
}
void
Session::poke_midi_thread ()
{
- char c;
+ static char c = 0;
if (write (midi_request_pipe[1], &c, 1) != 1) {
error << string_compose(_("cannot send signal to midi thread! (%1)"), strerror (errno)) << endmsg;
on the appropriate port.
*/
- if (mmc_control && _mmc_port && _mmc_port->selectable() >= 0) {
+ if (Config->get_mmc_control() && _mmc_port && _mmc_port->selectable() >= 0) {
pfd[nfds].fd = _mmc_port->selectable();
pfd[nfds].events = POLLIN|POLLHUP|POLLERR;
ports[nfds] = _mmc_port;
the relevant port.
*/
- if (_mtc_port && (_mtc_port != _mmc_port || !mmc_control) && _mtc_port->selectable() >= 0) {
+ if (_mtc_port && (_mtc_port != _mmc_port || !Config->get_mmc_control()) && _mtc_port->selectable() >= 0) {
pfd[nfds].fd = _mtc_port->selectable();
pfd[nfds].events = POLLIN|POLLHUP|POLLERR;
ports[nfds] = _mtc_port;
nfds++;
}
- if (_midi_port && (_midi_port != _mmc_port || !mmc_control) && (_midi_port != _mtc_port) && _midi_port->selectable() >= 0) {
+ if (_midi_port && (_midi_port != _mmc_port || !Config->get_mmc_control()) && (_midi_port != _mtc_port) && _midi_port->selectable() >= 0) {
pfd[nfds].fd = _midi_port->selectable();
pfd[nfds].events = POLLIN|POLLHUP|POLLERR;
ports[nfds] = _midi_port;
}
#endif
-bool
-Session::get_mmc_control () const
-{
- return mmc_control;
-}
-
-bool
-Session::get_midi_control () const
-{
- return midi_control;
-}
using namespace std;
void
-Session::process (jack_nframes_t nframes)
+Session::process (nframes_t nframes)
{
MIDI::Manager::instance()->cycle_start(nframes);
}
int
-Session::no_roll (jack_nframes_t nframes, jack_nframes_t offset)
+Session::no_roll (nframes_t nframes, nframes_t offset)
{
- jack_nframes_t end_frame = _transport_frame + nframes; // FIXME: varispeed + no_roll ??
+ nframes_t end_frame = _transport_frame + nframes; // FIXME: varispeed + no_roll ??
int ret = 0;
bool declick = get_transport_declick_required();
boost::shared_ptr<RouteList> r = routes.reader ();
}
int
-Session::process_routes (jack_nframes_t nframes, jack_nframes_t offset)
+Session::process_routes (nframes_t nframes, nframes_t offset)
{
bool record_active;
int declick = get_transport_declick_required();
}
int
-Session::silent_process_routes (jack_nframes_t nframes, jack_nframes_t offset)
+Session::silent_process_routes (nframes_t nframes, nframes_t offset)
{
bool record_active = actively_recording();
int declick = get_transport_declick_required();
}
void
-Session::commit_diskstreams (jack_nframes_t nframes, bool &needs_butler)
+Session::commit_diskstreams (nframes_t nframes, bool &needs_butler)
{
int dret;
float pworst = 1.0f;
void
-Session::process_with_events (jack_nframes_t nframes)
+Session::process_with_events (nframes_t nframes)
{
Event* ev;
- jack_nframes_t this_nframes;
- jack_nframes_t end_frame;
- jack_nframes_t offset;
- jack_nframes_t stop_limit;
+ nframes_t this_nframes;
+ nframes_t end_frame;
+ nframes_t offset;
+ nframes_t stop_limit;
long frames_moved;
bool session_needs_butler = false;
nframes -= this_nframes;
offset += this_nframes;
- frames_moved = (jack_nframes_t) floor (_transport_speed * this_nframes);
+ frames_moved = (nframes_t) floor (_transport_speed * this_nframes);
if (frames_moved < 0) {
decrement_transport_position (-frames_moved);
{
Slave* sl = _slave;
- if (!locate_pending() && ((_slave_type == None) || (sl && sl->ok() && sl->locked()))) {
+ if (!locate_pending() && ((Config->get_slave_source() == None) || (sl && sl->ok() && sl->locked()))) {
return true;
}
}
bool
-Session::follow_slave (jack_nframes_t nframes, jack_nframes_t offset)
+Session::follow_slave (nframes_t nframes, nframes_t offset)
{
float slave_speed;
- jack_nframes_t slave_transport_frame;
- jack_nframes_t this_delta;
+ nframes_t slave_transport_frame;
+ nframes_t this_delta;
int dir;
bool starting;
if (!_slave->ok()) {
stop_transport ();
- set_slave_source (None, 0);
+ Config->set_slave_source (None);
goto noroll;
}
Location* al = _locations.auto_loop_location();
- if (al && auto_loop && (slave_transport_frame < al->start() || slave_transport_frame > al->end())) {
+ if (al && play_loop && (slave_transport_frame < al->start() || slave_transport_frame > al->end())) {
// cancel looping
- request_auto_loop(false);
+ request_play_loop(false);
}
if (slave_transport_frame != _transport_frame) {
slave_state = Running;
bool ok = true;
- jack_nframes_t frame_delta = slave_transport_frame - _transport_frame;
+ nframes_t frame_delta = slave_transport_frame - _transport_frame;
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
/* XXX what? */
}
- memset (delta_accumulator, 0, sizeof (jack_nframes_t) * delta_accumulator_size);
+ memset (delta_accumulator, 0, sizeof (nframes_t) * delta_accumulator_size);
average_slave_delta = 0;
this_delta = 0;
}
// << " tf = " << _transport_frame
// << endl;
- if (_slave_type == JACK) {
+ if (Config->get_slave_source() == JACK) {
last_stop_frame = _transport_frame;
}
request_transport_speed (adjusted_speed);
#if 1
- if ((jack_nframes_t) average_slave_delta > _slave->resolution()) {
+ if ((nframes_t) average_slave_delta > _slave->resolution()) {
// cerr << "not locked\n";
goto silent_motion;
}
increment_transport_position (frames_moved);
}
- jack_nframes_t stop_limit;
+ nframes_t stop_limit;
if (actively_recording()) {
stop_limit = max_frames;
}
void
-Session::process_without_events (jack_nframes_t nframes)
+Session::process_without_events (nframes_t nframes)
{
bool session_needs_butler = false;
- jack_nframes_t stop_limit;
+ nframes_t stop_limit;
long frames_moved;
- jack_nframes_t offset = 0;
+ nframes_t offset = 0;
{
if (post_transport_work & (PostTransportLocate|PostTransportStop)) {
} else {
increment_transport_position (frames_moved);
}
-
+
maybe_stop (stop_limit);
check_declick_out ();
}
void
-Session::process_audition (jack_nframes_t nframes)
+Session::process_audition (nframes_t nframes)
{
Event* ev;
boost::shared_ptr<RouteList> r = routes.reader ();
}
bool
-Session::maybe_sync_start (jack_nframes_t& nframes, jack_nframes_t& offset)
+Session::maybe_sync_start (nframes_t& nframes, nframes_t& offset)
{
- jack_nframes_t sync_offset;
+ nframes_t sync_offset;
if (!waiting_for_sync_offset) {
return false;
$Id$
*/
+#define __STDC_FORMAT_MACROS 1
+#include <stdint.h>
+
#include <algorithm>
#include <fstream>
#include <string>
#include <ardour/region_factory.h>
#include <ardour/source_factory.h>
+#include <control_protocol/control_protocol.h>
+
#include "i18n.h"
#include <locale.h>
}
char buf[PATH_MAX+1];
- if (!realpath(fullpath.c_str(), buf) && (errno != ENOENT)) {
+ if (!realpath (fullpath.c_str(), buf) && (errno != ENOENT)) {
error << string_compose(_("Could not use path %1 (%s)"), buf, strerror(errno)) << endmsg;
throw failed_constructor();
}
+
_path = string(buf);
if (_path[_path.length()-1] != '/') {
*/
_name = _current_snapshot_name = snapshot_name;
- setup_raid_path (_path);
_current_frame_rate = _engine.frame_rate ();
_tempo_map = new TempoMap (_current_frame_rate);
start_location = new Location (0, 0, _("start"), Location::Flags ((Location::IsMark|Location::IsStart)));
_end_location_is_free = true;
g_atomic_int_set (&_record_status, Disabled);
- auto_play = false;
- punch_in = false;
- punch_out = false;
- auto_loop = false;
- seamless_loop = false;
loop_changing = false;
- auto_input = true;
- crossfades_active = false;
- all_safe = false;
- auto_return = false;
+ play_loop = false;
_last_roll_location = 0;
_last_record_location = 0;
pending_locate_frame = 0;
outbound_mtc_smpte_frame = 0;
next_quarter_frame_to_send = -1;
current_block_size = 0;
- _solo_latched = true;
- _solo_model = InverseMute;
solo_update_disabled = false;
currently_soloing = false;
_have_captured = false;
_worst_track_latency = 0;
_state_of_the_state = StateOfTheState(CannotSave|InitialConnecting|Loading);
_slave = 0;
- _slave_type = None;
butler_mixdown_buffer = 0;
butler_gain_buffer = 0;
- mmc_control = false;
- midi_control = true;
mmc = 0;
+ session_send_mmc = false;
+ session_send_mtc = false;
post_transport_work = PostTransportWork (0);
g_atomic_int_set (&butler_should_do_transport_work, 0);
g_atomic_int_set (&butler_active, 0);
g_atomic_int_set (&_capture_load, 100);
g_atomic_int_set (&_playback_load_min, 100);
g_atomic_int_set (&_capture_load_min, 100);
- _edit_mode = Slide;
- pending_edit_mode = _edit_mode;
_play_range = false;
- input_auto_connect = AutoConnectOption (0);
- output_auto_connect = AutoConnectOption (0);
waiting_to_start = false;
_exporting = false;
_gain_automation_buffer = 0;
_pan_automation_buffer = 0;
_npan_buffers = 0;
pending_abort = false;
- layer_model = MoveAddHigher;
- xfade_model = ShortCrossfade;
destructive_index = 0;
current_trans = 0;
+ first_file_data_format_reset = true;
+ first_file_header_format_reset = true;
AudioDiskstream::allocate_working_buffers();
/* default short fade = 15ms */
- Crossfade::set_short_xfade_length ((jack_nframes_t) floor ((15.0 * frame_rate()) / 1000.0));
+ Crossfade::set_short_xfade_length ((nframes_t) floor (Config->get_short_xfade_seconds() * frame_rate()));
DestructiveFileSource::setup_standard_crossfades (frame_rate());
last_mmc_step.tv_sec = 0;
last_mmc_step.tv_usec = 0;
step_speed = 0.0;
- preroll.type = AnyTime::Frames;
- preroll.frames = 0;
- postroll.type = AnyTime::Frames;
- postroll.frames = 0;
-
/* click sounds are unset by default, which causes us to internal
waveforms for clicks.
*/
- _clicking = false;
- click_requested = false;
click_data = 0;
click_emphasis_data = 0;
click_length = 0;
click_emphasis_length = 0;
+ _clicking = false;
process_function = &Session::process_with_events;
_current_frame_rate = 48000;
_base_frame_rate = 48000;
- smpte_frames_per_second = 30;
- video_pullup = 0.0;
- smpte_drop_frames = false;
last_smpte_when = 0;
_smpte_offset = 0;
_smpte_offset_negative = true;
last_smpte_valid = false;
+ sync_time_vars ();
+
last_rr_session_dir = session_dirs.begin();
refresh_disk_space ();
// set_default_fade (0.2, 5.0); /* steepness, millisecs */
- /* default configuration */
-
- do_not_record_plugins = false;
- over_length_short = 2;
- over_length_long = 10;
- send_midi_timecode = false;
- send_midi_machine_control = false;
- shuttle_speed_factor = 1.0;
- shuttle_speed_threshold = 5;
- rf_speed = 2.0;
- _meter_hold = 100; // XXX unknown units: number of calls to meter::set()
- _meter_falloff = 0.375f; // XXX unknown units: refresh_rate
- max_level = 0;
- min_level = 0;
-
/* slave stuff */
average_slave_delta = 1800;
delta_accumulator_cnt = 0;
slave_state = Stopped;
- /* default SMPTE type is 30 FPS, non-drop */
-
- set_smpte_type (30.0, false);
- set_video_pullup (0.0);
-
_engine.GraphReordered.connect (mem_fun (*this, &Session::graph_reordered));
/* These are all static "per-class" signals */
Curve::CurveCreated.connect (mem_fun (*this, &Session::add_curve));
AutomationList::AutomationListCreated.connect (mem_fun (*this, &Session::add_automation_list));
- Controllable::Created.connect (mem_fun (*this, &Session::add_controllable));
Controllable::GoingAway.connect (mem_fun (*this, &Session::remove_controllable));
IO::MoreChannels.connect (mem_fun (*this, &Session::ensure_buffers));
return -1;
}*/
+ // set_state() will call setup_raid_path(), but if it's a new session we need
+ // to call setup_raid_path() here.
if (state_tree) {
if (set_state (*state_tree->root())) {
return -1;
}
+ } else {
+ setup_raid_path(_path);
}
/* we can't save till after ::when_engine_running() is called,
return path.substr (0, path.length() - 1); // drop final colon
}
-void
-Session::set_raid_path (string path)
-{
- /* public-access to setup_raid_path() */
-
- setup_raid_path (path);
-}
-
void
Session::setup_raid_path (string path)
{
}
int
-Session::create (bool& new_session, string* mix_template, jack_nframes_t initial_length)
+Session::create (bool& new_session, string* mix_template, nframes_t initial_length)
{
string dir;
- new_session = !g_file_test (_path.c_str(), GFileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR));
-
if (g_mkdir_with_parents (_path.c_str(), 0755) < 0) {
error << string_compose(_("Session: cannot create session dir \"%1\" (%2)"), _path, strerror (errno)) << endmsg;
return -1;
return -1;
}
-
+
/* check new_session so we don't overwrite an existing one */
-
+
if (mix_template) {
- if (new_session){
- std::string in_path = *mix_template;
+ std::string in_path = *mix_template;
+
+ ifstream in(in_path.c_str());
+
+ if (in){
+ string out_path = _path;
+ out_path += _name;
+ out_path += _statefile_suffix;
+
+ ofstream out(out_path.c_str());
+
+ if (out){
+ out << in.rdbuf();
+
+ // okay, session is set up. Treat like normal saved
+ // session from now on.
+
+ new_session = false;
+ return 0;
- ifstream in(in_path.c_str());
-
- if (in){
- string out_path = _path;
- out_path += _name;
- out_path += _statefile_suffix;
-
- ofstream out(out_path.c_str());
-
- if (out){
- out << in.rdbuf();
-
- // okay, session is set up. Treat like normal saved
- // session from now on.
-
- new_session = false;
- return 0;
-
- } else {
- error << string_compose (_("Could not open %1 for writing mix template"), out_path)
- << endmsg;
- return -1;
- }
-
} else {
- error << string_compose (_("Could not open mix template %1 for reading"), in_path)
- << endmsg;
+ error << string_compose (_("Could not open %1 for writing mix template"), out_path)
+ << endmsg;
return -1;
}
-
-
+
} else {
- warning << _("Session already exists. Not overwriting") << endmsg;
+ error << string_compose (_("Could not open mix template %1 for reading"), in_path)
+ << endmsg;
return -1;
}
+
}
- if (new_session) {
+ /* set initial start + end point */
- /* set initial start + end point */
+ start_location->set_end (0);
+ _locations.add (start_location);
- start_location->set_end (0);
- _locations.add (start_location);
+ end_location->set_end (initial_length);
+ _locations.add (end_location);
- end_location->set_end (initial_length);
- _locations.add (end_location);
-
- _state_of_the_state = Clean;
+ _state_of_the_state = Clean;
- if (save_state (_current_snapshot_name)) {
- save_history (_current_snapshot_name);
- return -1;
- }
+ if (save_state (_current_snapshot_name)) {
+ save_history (_current_snapshot_name);
+ return -1;
}
return 0;
{
XMLNode* child;
XMLProperty* prop;
- bool have_fade_msecs = false;
- bool have_fade_steepness = false;
- float fade_msecs = 0;
- float fade_steepness = 0;
- SlaveSource slave_src = None;
- int x;
LocaleGuard lg (X_("POSIX"));
-
- if ((child = find_named_node (node, "input-auto-connect")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- sscanf (prop->value().c_str(), "%x", &x);
- input_auto_connect = AutoConnectOption (x);
- }
- }
- if ((child = find_named_node (node, "output-auto-connect")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- sscanf (prop->value().c_str(), "%x", &x);
- output_auto_connect = AutoConnectOption (x);
- }
- }
-
- if ((child = find_named_node (node, "slave")) != 0) {
- if ((prop = child->property ("type")) != 0) {
- if (prop->value() == "none") {
- slave_src = None;
- } else if (prop->value() == "mtc") {
- slave_src = MTC;
- } else if (prop->value() == "jack") {
- slave_src = JACK;
- }
- set_slave_source (slave_src, 0);
- }
- }
-
- /* we cannot set edit mode if we are loading a session,
- because it might destroy the playlist's positioning
- */
-
- if ((child = find_named_node (node, "edit-mode")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- if (prop->value() == "slide") {
- pending_edit_mode = Slide;
- } else if (prop->value() == "splice") {
- pending_edit_mode = Splice;
- }
- }
- }
-
- if ((child = find_named_node (node, "send-midi-timecode")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- bool x = (prop->value() == "yes");
- send_mtc = !x; /* force change in value */
- set_send_mtc (x);
- }
- }
- if ((child = find_named_node (node, "send-midi-machine-control")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- bool x = (prop->value() == "yes");
- send_mmc = !x; /* force change in value */
- set_send_mmc (prop->value() == "yes");
- }
- }
- if ((child = find_named_node (node, "max-level")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- max_level = atoi (prop->value().c_str());
- }
- }
- if ((child = find_named_node (node, "min-level")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- min_level = atoi (prop->value().c_str());
- }
- }
- if ((child = find_named_node (node, "meter-hold")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- _meter_hold = atof (prop->value().c_str());
- }
- }
- if ((child = find_named_node (node, "meter-falloff")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- _meter_falloff = atof (prop->value().c_str());
- }
- }
- if ((child = find_named_node (node, "long-over-length")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- over_length_long = atoi (prop->value().c_str());
- }
- }
- if ((child = find_named_node (node, "short-over-length")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- over_length_short = atoi (prop->value().c_str());
- }
- }
- if ((child = find_named_node (node, "shuttle-speed-factor")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- shuttle_speed_factor = atof (prop->value().c_str());
- }
- }
- if ((child = find_named_node (node, "shuttle-speed-threshold")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- shuttle_speed_threshold = atof (prop->value().c_str());
- }
- }
- if ((child = find_named_node (node, "rf-speed")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- rf_speed = atof (prop->value().c_str());
- }
- }
- if ((child = find_named_node (node, "video-pullup")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_video_pullup( atof (prop->value().c_str()) );
- }
- }
- if ((child = find_named_node (node, "smpte-frames-per-second")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_smpte_type( atof (prop->value().c_str()), smpte_drop_frames );
- }
- }
- if ((child = find_named_node (node, "smpte-drop-frames")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_smpte_type( smpte_frames_per_second, (prop->value() == "yes") );
- }
- }
- if ((child = find_named_node (node, "smpte-offset")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_smpte_offset( atoi (prop->value().c_str()) );
- }
- }
- if ((child = find_named_node (node, "smpte-offset-negative")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_smpte_offset_negative( (prop->value() == "yes") );
- }
- }
- if ((child = find_named_node (node, "click-sound")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- click_sound = prop->value();
- }
- }
- if ((child = find_named_node (node, "click-emphasis-sound")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- click_emphasis_sound = prop->value();
- }
- }
-
- if ((child = find_named_node (node, "solo-model")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- if (prop->value() == "SoloBus")
- _solo_model = SoloBus;
- else
- _solo_model = InverseMute;
- }
- }
-
- /* BOOLEAN OPTIONS */
-
- if ((child = find_named_node (node, "auto-play")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_auto_play (prop->value() == "yes");
- }
- }
- if ((child = find_named_node (node, "auto-input")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_auto_input (prop->value() == "yes");
- }
- }
- if ((child = find_named_node (node, "seamless-loop")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_seamless_loop (prop->value() == "yes");
- }
- }
- if ((child = find_named_node (node, "punch-in")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_punch_in (prop->value() == "yes");
- }
- }
- if ((child = find_named_node (node, "punch-out")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_punch_out (prop->value() == "yes");
- }
- }
- if ((child = find_named_node (node, "auto-return")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_auto_return (prop->value() == "yes");
- }
- }
- if ((child = find_named_node (node, "send-mtc")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_send_mtc (prop->value() == "yes");
- }
- }
- if ((child = find_named_node (node, "mmc-control")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_mmc_control (prop->value() == "yes");
- }
- }
- if ((child = find_named_node (node, "midi-control")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_midi_control (prop->value() == "yes");
- }
- }
- if ((child = find_named_node (node, "midi-feedback")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_midi_feedback (prop->value() == "yes");
- }
- }
- // Legacy support for <recording-plugins>
- if ((child = find_named_node (node, "recording-plugins")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_do_not_record_plugins (prop->value() == "no");
- }
- }
- if ((child = find_named_node (node, "do-not-record-plugins")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_do_not_record_plugins (prop->value() == "yes");
- }
- }
- if ((child = find_named_node (node, "crossfades-active")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_crossfades_active (prop->value() == "yes");
- }
- }
- if ((child = find_named_node (node, "audible-click")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- set_clicking (prop->value() == "yes");
- }
- }
+ Config->set_variables (node, ConfigVariableBase::Session);
if ((child = find_named_node (node, "end-marker-is-free")) != 0) {
if ((prop = child->property ("val")) != 0) {
}
}
- if ((child = find_named_node (node, "layer-model")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- if (prop->value() == X_("LaterHigher")) {
- set_layer_model (LaterHigher);
- } else if (prop->value() == X_("AddHigher")) {
- set_layer_model (AddHigher);
- } else {
- set_layer_model (MoveAddHigher);
- }
- }
- }
-
- if ((child = find_named_node (node, "xfade-model")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- if (prop->value() == X_("Short")) {
- set_xfade_model (ShortCrossfade);
- } else {
- set_xfade_model (FullCrossfade);
- }
- }
- }
-
- if ((child = find_named_node (node, "short-xfade-length")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- /* value is stored as a fractional seconds */
- float secs = atof (prop->value().c_str());
- Crossfade::set_short_xfade_length ((jack_nframes_t) floor (secs * frame_rate()));
- }
- }
-
- if ((child = find_named_node (node, "full-xfades-unmuted")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- crossfades_active = (prop->value() == "yes");
- }
- }
-
- /* TIED OPTIONS */
-
- if ((child = find_named_node (node, "default-fade-steepness")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- fade_steepness = atof (prop->value().c_str());
- have_fade_steepness = true;
- }
- }
- if ((child = find_named_node (node, "default-fade-msec")) != 0) {
- if ((prop = child->property ("val")) != 0) {
- fade_msecs = atof (prop->value().c_str());
- have_fade_msecs = true;
- }
- }
+ return 0;
+}
- if (have_fade_steepness || have_fade_msecs) {
- // set_default_fade (fade_steepness, fade_msecs);
- }
+bool
+Session::save_config_options_predicate (ConfigVariableBase::Owner owner) const
+{
+ const ConfigVariableBase::Owner modified_by_session_or_user = (ConfigVariableBase::Owner)
+ (ConfigVariableBase::Session|ConfigVariableBase::Interface);
- return 0;
+ return owner & modified_by_session_or_user;
}
XMLNode&
Session::get_options () const
{
- XMLNode* opthead;
XMLNode* child;
- char buf[32];
LocaleGuard lg (X_("POSIX"));
- opthead = new XMLNode ("Options");
+ XMLNode& option_root = Config->get_variables (mem_fun (*this, &Session::save_config_options_predicate));
- SlaveSource src = slave_source ();
- string src_string;
- switch (src) {
- case None:
- src_string = "none";
- break;
- case MTC:
- src_string = "mtc";
- break;
- case JACK:
- src_string = "jack";
- break;
- }
- child = opthead->add_child ("slave");
- child->add_property ("type", src_string);
-
- child = opthead->add_child ("send-midi-timecode");
- child->add_property ("val", send_midi_timecode?"yes":"no");
-
- child = opthead->add_child ("send-midi-machine-control");
- child->add_property ("val", send_midi_machine_control?"yes":"no");
-
- snprintf (buf, sizeof(buf)-1, "%x", (int) input_auto_connect);
- child = opthead->add_child ("input-auto-connect");
- child->add_property ("val", buf);
-
- snprintf (buf, sizeof(buf)-1, "%x", (int) output_auto_connect);
- child = opthead->add_child ("output-auto-connect");
- child->add_property ("val", buf);
-
- snprintf (buf, sizeof(buf)-1, "%d", max_level);
- child = opthead->add_child ("max-level");
- child->add_property ("val", buf);
-
- snprintf (buf, sizeof(buf)-1, "%d", min_level);
- child = opthead->add_child ("min-level");
- child->add_property ("val", buf);
-
- snprintf (buf, sizeof(buf)-1, "%f", _meter_hold);
- child = opthead->add_child ("meter-hold");
- child->add_property ("val", buf);
-
- snprintf (buf, sizeof(buf)-1, "%f", _meter_falloff);
- child = opthead->add_child ("meter-falloff");
- child->add_property ("val", buf);
-
- snprintf (buf, sizeof(buf)-1, "%u", over_length_long);
- child = opthead->add_child ("long-over-length");
- child->add_property ("val", buf);
-
- snprintf (buf, sizeof(buf)-1, "%u", over_length_short);
- child = opthead->add_child ("short-over-length");
- child->add_property ("val", buf);
-
- snprintf (buf, sizeof(buf)-1, "%f", shuttle_speed_factor);
- child = opthead->add_child ("shuttle-speed-factor");
- child->add_property ("val", buf);
-
- snprintf (buf, sizeof(buf)-1, "%f", shuttle_speed_threshold);
- child = opthead->add_child ("shuttle-speed-threshold");
- child->add_property ("val", buf);
-
- snprintf (buf, sizeof(buf)-1, "%f", rf_speed);
- child = opthead->add_child ("rf-speed");
- child->add_property ("val", buf);
-
- snprintf (buf, sizeof(buf)-1, "%.4f", video_pullup);
- child = opthead->add_child ("video-pullup");
- child->add_property ("val", buf);
-
- snprintf (buf, sizeof(buf)-1, "%.2f", smpte_frames_per_second);
- child = opthead->add_child ("smpte-frames-per-second");
- child->add_property ("val", buf);
-
- child = opthead->add_child ("smpte-drop-frames");
- child->add_property ("val", smpte_drop_frames ? "yes" : "no");
-
- snprintf (buf, sizeof(buf)-1, "%u", smpte_offset ());
- child = opthead->add_child ("smpte-offset");
- child->add_property ("val", buf);
-
- child = opthead->add_child ("smpte-offset-negative");
- child->add_property ("val", smpte_offset_negative () ? "yes" : "no");
-
- child = opthead->add_child ("edit-mode");
- switch (_edit_mode) {
- case Splice:
- child->add_property ("val", "splice");
- break;
-
- case Slide:
- child->add_property ("val", "slide");
- break;
- }
-
- child = opthead->add_child ("auto-play");
- child->add_property ("val", get_auto_play () ? "yes" : "no");
- child = opthead->add_child ("auto-input");
- child->add_property ("val", get_auto_input () ? "yes" : "no");
- child = opthead->add_child ("seamless-loop");
- child->add_property ("val", get_seamless_loop () ? "yes" : "no");
- child = opthead->add_child ("punch-in");
- child->add_property ("val", get_punch_in () ? "yes" : "no");
- child = opthead->add_child ("punch-out");
- child->add_property ("val", get_punch_out () ? "yes" : "no");
- child = opthead->add_child ("all-safe");
- child->add_property ("val", get_all_safe () ? "yes" : "no");
- child = opthead->add_child ("auto-return");
- child->add_property ("val", get_auto_return () ? "yes" : "no");
- child = opthead->add_child ("mmc-control");
- child->add_property ("val", get_mmc_control () ? "yes" : "no");
- child = opthead->add_child ("midi-control");
- child->add_property ("val", get_midi_control () ? "yes" : "no");
- child = opthead->add_child ("midi-feedback");
- child->add_property ("val", get_midi_feedback () ? "yes" : "no");
- child = opthead->add_child ("do-not-record-plugins");
- child->add_property ("val", get_do_not_record_plugins () ? "yes" : "no");
- child = opthead->add_child ("auto-crossfade");
- child->add_property ("val", get_crossfades_active () ? "yes" : "no");
- child = opthead->add_child ("audible-click");
- child->add_property ("val", get_clicking () ? "yes" : "no");
- child = opthead->add_child ("end-marker-is-free");
+ child = option_root.add_child ("end-marker-is-free");
child->add_property ("val", _end_location_is_free ? "yes" : "no");
- if (click_sound.length()) {
- child = opthead->add_child ("click-sound");
- child->add_property ("val", click_sound);
- }
-
- if (click_emphasis_sound.length()) {
- child = opthead->add_child ("click-emphasis-sound");
- child->add_property ("val", click_emphasis_sound);
- }
-
- child = opthead->add_child ("solo-model");
- child->add_property ("val", _solo_model == SoloBus ? "SoloBus" : "InverseMute");
-
- child = opthead->add_child ("layer-model");
- switch (layer_model) {
- case LaterHigher:
- child->add_property ("val", X_("LaterHigher"));
- break;
- case MoveAddHigher:
- child->add_property ("val", X_("MoveAddHigher"));
- break;
- case AddHigher:
- child->add_property ("val", X_("AddHigher"));
- break;
- }
-
- child = opthead->add_child ("xfade-model");
- switch (xfade_model) {
- case FullCrossfade:
- child->add_property ("val", X_("Full"));
- break;
- case ShortCrossfade:
- child->add_property ("val", X_("Short"));
- }
-
- child = opthead->add_child ("short-xfade-length");
- /* store as fractions of a second */
- snprintf (buf, sizeof(buf)-1, "%f",
- (float) Crossfade::short_xfade_length() / frame_rate());
- child->add_property ("val", buf);
-
- child = opthead->add_child ("full-xfades-unmuted");
- child->add_property ("val", crossfades_active ? "yes" : "no");
-
- return *opthead;
+ return option_root;
}
XMLNode&
node->add_child_nocopy (_tempo_map->get_state());
+ node->add_child_nocopy (get_control_protocol_state());
+
if (_extra_xml) {
node->add_child_copy (*_extra_xml);
}
return *node;
}
+XMLNode&
+Session::get_control_protocol_state ()
+{
+ ControlProtocolManager& cpm (ControlProtocolManager::instance());
+ XMLNode* node = new XMLNode (X_("ControlProtocols"));
+
+ cpm.foreach_known_protocol (bind (mem_fun (*this, &Session::add_control_protocol), node));
+
+ return *node;
+}
+
+void
+Session::add_control_protocol (const ControlProtocolInfo* const cpi, XMLNode* node)
+{
+ if (cpi->protocol) {
+ node->add_child_nocopy (cpi->protocol->get_state());
+ }
+}
+
int
Session::set_state (const XMLNode& node)
{
_name = prop->value ();
}
+ setup_raid_path(_path);
+
if ((prop = node.property (X_("id-counter"))) != 0) {
uint64_t x;
sscanf (prop->value().c_str(), "%" PRIu64, &x);
MIDI
Path
extra
- Options
+ Options/Config
Sources
AudioRegions
AudioDiskstreams
EditGroups
MixGroups
Click
+ ControlProtocols
*/
if (use_config_midi_ports ()) {
}
- if ((child = find_named_node (node, "Path")) != 0) {
- /* XXX this XML content stuff horrible API design */
- string raid_path = _path + ':' + child->children().front()->content();
- setup_raid_path (raid_path);
- } else {
- /* the path is already set */
- }
-
if ((child = find_named_node (node, "extra")) != 0) {
_extra_xml = new XMLNode (*child);
}
- if ((child = find_named_node (node, "Options")) == 0) {
+ if (((child = find_named_node (node, "Options")) != 0)) { /* old style */
+ load_options (*child);
+ } else if ((child = find_named_node (node, "Config")) != 0) { /* new style */
+ load_options (*child);
+ } else {
error << _("Session: XML state has no options section") << endmsg;
- } else if (load_options (*child)) {
}
if ((child = find_named_node (node, "Sources")) == 0) {
_click_io->set_state (*child);
}
- /* OK, now we can set edit mode */
-
- set_edit_mode (pending_edit_mode);
+ if ((child = find_named_node (node, "ControlProtocols")) != 0) {
+ ControlProtocolManager::instance().set_protocol_states (*child);
+ }
/* here beginneth the second phase ... */
nchans = atoi (prop->value().c_str());
}
+
+ if ((prop = node.property ("name")) == 0) {
+ cerr << "no name for this region\n";
+ abort ();
+ }
if ((prop = node.property (X_("source-0"))) == 0) {
if ((prop = node.property ("source")) == 0) {
/* support old session structure */
struct stat statbuf;
- string old;
-
- if (with_path) {
- old = _path;
- }
+ string old_nopath;
+ string old_withpath;
- old += sound_dir_name;
- old += '/';
+ old_nopath += old_sound_dir_name;
+ old_nopath += '/';
+
+ old_withpath = _path;
+ old_withpath += old_sound_dir_name;
+ old_withpath += '/';
- if (stat (old.c_str(), &statbuf) == 0) {
- return old;
+ if (stat (old_withpath.c_str(), &statbuf) == 0) {
+ if (with_path)
+ return old_withpath;
+
+ return old_nopath;
}
string res;
return 0;
}
-void
-Session::set_meter_hold (float val)
-{
- _meter_hold = val;
- MeterHoldChanged(); // emit
-}
-
-void
-Session::set_meter_falloff (float val)
-{
- _meter_falloff = val;
- MeterFalloffChanged(); // emit
-}
-
-
void
Session::begin_reversible_command (string name)
{
Session::add_controllable (Controllable* c)
{
Glib::Mutex::Lock lm (controllables_lock);
- controllables.push_back (c);
+ controllables.insert (c);
}
void
}
Glib::Mutex::Lock lm (controllables_lock);
- controllables.remove (c);
+
+ Controllables::iterator x = controllables.find (c);
+
+ if (x != controllables.end()) {
+ controllables.erase (x);
+ }
}
Controllable*
return 0;
}
+
+void
+Session::config_changed (const char* parameter_name)
+{
+#define PARAM_IS(x) (!strcmp (parameter_name, (x)))
+
+ if (PARAM_IS ("seamless-loop")) {
+
+ } else if (PARAM_IS ("rf-speed")) {
+
+ } else if (PARAM_IS ("auto-loop")) {
+
+ } else if (PARAM_IS ("auto-input")) {
+
+ if (Config->get_monitoring_model() == HardwareMonitoring && transport_rolling()) {
+ /* auto-input only makes a difference if we're rolling */
+
+ boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
+
+ for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
+ if ((*i)->record_enabled ()) {
+ //cerr << "switching to input = " << !auto_input << __FILE__ << __LINE__ << endl << endl;
+ (*i)->monitor_input (!Config->get_auto_input());
+ }
+ }
+ }
+
+ } else if (PARAM_IS ("punch-in")) {
+
+ Location* location;
+
+ if ((location = _locations.auto_punch_location()) != 0) {
+
+ if (Config->get_punch_in ()) {
+ replace_event (Event::PunchIn, location->start());
+ } else {
+ remove_event (location->start(), Event::PunchIn);
+ }
+ }
+
+ } else if (PARAM_IS ("punch-out")) {
+
+ Location* location;
+
+ if ((location = _locations.auto_punch_location()) != 0) {
+
+ if (Config->get_punch_out()) {
+ replace_event (Event::PunchOut, location->end());
+ } else {
+ clear_events (Event::PunchOut);
+ }
+ }
+
+ } else if (PARAM_IS ("edit-mode")) {
+
+ Glib::Mutex::Lock lm (playlist_lock);
+
+ for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) {
+ (*i)->set_edit_mode (Config->get_edit_mode ());
+ }
+
+ } else if (PARAM_IS ("use-video-sync")) {
+
+ if (transport_stopped()) {
+ if (Config->get_use_video_sync()) {
+ waiting_for_sync_offset = true;
+ }
+ }
+
+ } else if (PARAM_IS ("mmc-control")) {
+
+ //poke_midi_thread ();
+
+ } else if (PARAM_IS ("midi-control")) {
+
+ //poke_midi_thread ();
+
+ } else if (PARAM_IS ("raid-path")) {
+
+ setup_raid_path (Config->get_raid_path());
+
+ } else if (PARAM_IS ("smpte-frames-per-second") || PARAM_IS ("smpte-drop-frames")) {
+
+ sync_time_vars ();
+
+ } else if (PARAM_IS ("video-pullup")) {
+
+ sync_time_vars ();
+
+ } else if (PARAM_IS ("seamless-loop")) {
+
+ if (play_loop && transport_rolling()) {
+ // to reset diskstreams etc
+ request_play_loop (true);
+ }
+
+ } else if (PARAM_IS ("rf-speed")) {
+
+ cumulative_rf_motion = 0;
+ reset_rf_scale (0);
+
+ } else if (PARAM_IS ("click-sound")) {
+
+ setup_click_sounds (1);
+
+ } else if (PARAM_IS ("click-emphasis-sound")) {
+
+ setup_click_sounds (-1);
+
+ } else if (PARAM_IS ("clicking")) {
+
+ if (Config->get_clicking()) {
+ if (_click_io && click_data) { // don't require emphasis data
+ _clicking = true;
+ }
+ } else {
+ _clicking = false;
+ }
+
+ } else if (PARAM_IS ("send-mtc")) {
+
+ /* only set the internal flag if we have
+ a port.
+ */
+
+ if (_mtc_port != 0) {
+ session_send_mtc = Config->get_send_mtc();
+ }
+
+ } else if (PARAM_IS ("send-mmc")) {
+
+ /* only set the internal flag if we have
+ a port.
+ */
+
+ if (_mmc_port != 0) {
+ session_send_mmc = Config->get_send_mmc();
+ }
+
+ } else if (PARAM_IS ("midi-feedback")) {
+
+ /* only set the internal flag if we have
+ a port.
+ */
+
+ if (_mtc_port != 0) {
+ session_midi_feedback = Config->get_midi_feedback();
+ }
+
+ } else if (PARAM_IS ("jack-time-master")) {
+
+ engine().reset_timebase ();
+
+ } else if (PARAM_IS ("native-file-header-format")) {
+
+ if (!first_file_header_format_reset) {
+ reset_native_file_format ();
+ }
+
+ first_file_header_format_reset = false;
+
+ } else if (PARAM_IS ("native-file-data-format")) {
+
+ if (!first_file_data_format_reset) {
+ reset_native_file_format ();
+ }
+
+ first_file_data_format_reset = false;
+ }
+
+ set_dirty ();
+
+#undef PARAM_IS
+
+}
#include <ardour/timestamps.h>
#include <pbd/error.h>
+#include <pbd/stacktrace.h>
#include <ardour/ardour.h>
#include <ardour/configuration.h>
/* BBT TIME*/
void
-Session::bbt_time (jack_nframes_t when, BBT_Time& bbt)
+Session::bbt_time (nframes_t when, BBT_Time& bbt)
{
_tempo_map->bbt_time (when, bbt);
}
void
Session::sync_time_vars ()
{
- _current_frame_rate = (jack_nframes_t) round (_base_frame_rate * (1.0 + (video_pullup/100.0)));
+ _current_frame_rate = (nframes_t) round (_base_frame_rate * (1.0 + (Config->get_video_pullup()/100.0)));
_frames_per_hour = _current_frame_rate * 3600;
- _frames_per_smpte_frame = (double) _current_frame_rate / (double) smpte_frames_per_second;
- _smpte_frames_per_hour = (unsigned long) (smpte_frames_per_second * 3600.0);
+ _frames_per_smpte_frame = (double) _current_frame_rate / (double) Config->get_smpte_frames_per_second();
+ _smpte_frames_per_hour = (unsigned long) (Config->get_smpte_frames_per_second() * 3600.0);
}
int
Session::set_smpte_type (float fps, bool drop_frames)
{
- smpte_frames_per_second = fps;
- smpte_drop_frames = drop_frames;
+ Config->set_smpte_frames_per_second (fps);
+ Config->set_smpte_drop_frames (drop_frames);
last_smpte_valid = false;
// smpte type bits are the middle two in the upper nibble
break;
};
- sync_time_vars();
-
- SMPTETypeChanged (); /* EMIT SIGNAL */
-
- set_dirty();
-
- return 0;
-}
-
-int
-Session::set_video_pullup (float pull)
-{
- video_pullup = pull;
-
- sync_time_vars();
-
- PullupChanged (); /* EMIT SIGNAL */
-
- set_dirty();
-
return 0;
}
void
-Session::set_smpte_offset (jack_nframes_t off)
+Session::set_smpte_offset (nframes_t off)
{
_smpte_offset = off;
last_smpte_valid = false;
}
void
-Session::smpte_to_sample( SMPTE::Time& smpte, jack_nframes_t& sample, bool use_offset, bool use_subframes ) const
+Session::smpte_to_sample( SMPTE::Time& smpte, nframes_t& sample, bool use_offset, bool use_subframes ) const
{
- if (smpte_drop_frames) {
+ if (Config->get_smpte_drop_frames()) {
// The drop frame format was created to better approximate the 30000/1001 = 29.97002997002997....
// framerate of NTSC color TV. The used frame rate of drop frame is 29.97, which drifts by about
// 0.108 frame per hour, or about 1.3 frames per 12 hours. This is not perfect, but a lot better
// Per Sigmond <per@sigmond.no>
// Samples inside time dividable by 10 minutes (real time accurate)
- jack_nframes_t base_samples = ((smpte.hours * 60 * 60) + ((smpte.minutes / 10) * 10 * 60)) * frame_rate();
+ nframes_t base_samples = ((smpte.hours * 60 * 60) + ((smpte.minutes / 10) * 10 * 60)) * frame_rate();
// Samples inside time exceeding the nearest 10 minutes (always offset, see above)
long exceeding_df_minutes = smpte.minutes % 10;
long exceeding_df_seconds = (exceeding_df_minutes * 60) + smpte.seconds;
long exceeding_df_frames = (30 * exceeding_df_seconds) + smpte.frames - (2 * exceeding_df_minutes);
- jack_nframes_t exceeding_samples = (jack_nframes_t) rint(exceeding_df_frames * _frames_per_smpte_frame);
+ nframes_t exceeding_samples = (nframes_t) rint(exceeding_df_frames * _frames_per_smpte_frame);
sample = base_samples + exceeding_samples;
} else {
// Non drop is easy:
- sample = (((smpte.hours * 60 * 60) + (smpte.minutes * 60) + smpte.seconds) * frame_rate()) + (jack_nframes_t)rint(smpte.frames * _frames_per_smpte_frame);
+ sample = (((smpte.hours * 60 * 60) + (smpte.minutes * 60) + smpte.seconds) * frame_rate()) + (nframes_t)rint(smpte.frames * _frames_per_smpte_frame);
}
if (use_subframes) {
void
-Session::sample_to_smpte( jack_nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes ) const
+Session::sample_to_smpte( nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes ) const
{
- jack_nframes_t offset_sample;
+ nframes_t offset_sample;
if (!use_offset) {
offset_sample = sample;
// Extract hour-exceeding frames for minute, second and frame calculations
smpte_frames_left = ((long) floor( smpte_frames_left_exact ));
- if (smpte_drop_frames) {
+ if (Config->get_smpte_drop_frames()) {
// See long explanation in smpte_to_sample()...
// Number of 10 minute chunks
}
} else {
// Non drop is easy
- smpte.minutes = smpte_frames_left / ((long) smpte_frames_per_second * 60);
- smpte_frames_left = smpte_frames_left % ((long) smpte_frames_per_second * 60);
- smpte.seconds = smpte_frames_left / (long) smpte_frames_per_second;
- smpte.frames = smpte_frames_left % (long) smpte_frames_per_second;
+ smpte.minutes = smpte_frames_left / ((long) Config->get_smpte_frames_per_second () * 60);
+ smpte_frames_left = smpte_frames_left % ((long) Config->get_smpte_frames_per_second () * 60);
+ smpte.seconds = smpte_frames_left / (long) Config->get_smpte_frames_per_second ();
+ smpte.frames = smpte_frames_left % (long) Config->get_smpte_frames_per_second ();
}
if (!use_subframes) {
}
void
-Session::smpte_time (jack_nframes_t when, SMPTE::Time& smpte)
+Session::smpte_time (nframes_t when, SMPTE::Time& smpte)
{
if (last_smpte_valid && when == last_smpte_when) {
smpte = last_smpte;
}
void
-Session::smpte_time_subframes (jack_nframes_t when, SMPTE::Time& smpte)
+Session::smpte_time_subframes (nframes_t when, SMPTE::Time& smpte)
{
if (last_smpte_valid && when == last_smpte_when) {
smpte = last_smpte;
}
void
-Session::smpte_duration (jack_nframes_t when, SMPTE::Time& smpte) const
+Session::smpte_duration (nframes_t when, SMPTE::Time& smpte) const
{
sample_to_smpte( when, smpte, false /* use_offset */, true /* use_subframes */ );
}
void
-Session::smpte_duration_string (char* buf, jack_nframes_t when) const
+Session::smpte_duration_string (char* buf, nframes_t when) const
{
SMPTE::Time smpte;
void
Session::jack_timebase_callback (jack_transport_state_t state,
- jack_nframes_t nframes,
+ nframes_t nframes,
jack_position_t* pos,
int new_position)
{
#ifdef HAVE_JACK_VIDEO_SUPPORT
//poke audio video ratio so Ardour can track Video Sync
- pos->audio_frames_per_video_frame = frame_rate() / smpte_frames_per_second;
+ pos->audio_frames_per_video_frame = frame_rate() / Config->get_smpte_frames_per_second ();
pos->valid = jack_position_bits_t (pos->valid | JackAudioVideoRatio);
#endif
/* SMPTE info */
t.smpte_offset = _smpte_offset;
- t.smpte_frame_rate = smpte_frames_per_second;
+ t.smpte_frame_rate = Config->get_smpte_frames_per_second ();
if (_transport_speed) {
- if (auto_loop) {
+ if (play_loop) {
Location* location = _locations.auto_loop_location();
#endif
}
-jack_nframes_t
-Session::convert_to_frames_at (jack_nframes_t position, AnyTime& any)
+ARDOUR::nframes_t
+Session::convert_to_frames_at (nframes_t position, AnyTime& any)
{
double secs;
secs = any.smpte.hours * 60 * 60;
secs += any.smpte.minutes * 60;
secs += any.smpte.seconds;
- secs += any.smpte.frames / smpte_frames_per_second;
+ secs += any.smpte.frames / Config->get_smpte_frames_per_second ();
if (_smpte_offset_negative)
{
- return (jack_nframes_t) floor (secs * frame_rate()) - _smpte_offset;
+ return (nframes_t) floor (secs * frame_rate()) - _smpte_offset;
}
else
{
- return (jack_nframes_t) floor (secs * frame_rate()) + _smpte_offset;
+ return (nframes_t) floor (secs * frame_rate()) + _smpte_offset;
}
break;
case AnyTime::Seconds:
- return (jack_nframes_t) floor (any.seconds * frame_rate());
+ return (nframes_t) floor (any.seconds * frame_rate());
break;
case AnyTime::Frames:
string region_name;
string ident = X_("-TIMEFX-");
float percentage;
- jack_nframes_t total_frames;
- jack_nframes_t done;
+ nframes_t total_frames;
+ nframes_t done;
/* the soundtouch code wants a *tempo* change percentage, which is
of opposite sign to the length change.
}
try {
- const jack_nframes_t bufsize = 16384;
+ const nframes_t bufsize = 16384;
for (uint32_t i = 0; i < sources.size(); ++i) {
gain_t gain_buffer[bufsize];
Sample buffer[bufsize];
- jack_nframes_t pos = 0;
- jack_nframes_t this_read = 0;
+ nframes_t pos = 0;
+ nframes_t this_read = 0;
boost::shared_ptr<AudioSource> asrc = boost::dynamic_pointer_cast<AudioSource>(sources[i]);
if (!asrc) {
st.clear();
while (tsr.running && pos < tsr.region->length()) {
- jack_nframes_t this_time;
+ nframes_t this_time;
this_time = min (bufsize, tsr.region->length() - pos);
}
void
-Session::request_slave_source (SlaveSource src, jack_nframes_t pos)
+Session::request_slave_source (SlaveSource src)
{
- Event* ev = new Event (Event::SetSlaveSource, Event::Add, Event::Immediate, pos, 0.0);
+ Event* ev = new Event (Event::SetSlaveSource, Event::Add, Event::Immediate, 0, 0.0);
- if (src == Session::JACK) {
- /* could set_seamless_loop() be disposed of entirely?*/
- set_seamless_loop (false);
+ if (src == JACK) {
+ /* could set_seamless_loop() be disposed of entirely?*/
+ Config->set_seamless_loop (false);
} else {
-
- set_seamless_loop (true);
+ Config->set_seamless_loop (true);
}
ev->slave = src;
queue_event (ev);
}
void
-Session::request_locate (jack_nframes_t target_frame, bool with_roll)
+Session::request_locate (nframes_t target_frame, bool with_roll)
{
Event *ev = new Event (with_roll ? Event::LocateRoll : Event::Locate, Event::Add, Event::Immediate, target_frame, 0, false);
queue_event (ev);
}
void
-Session::force_locate (jack_nframes_t target_frame, bool with_roll)
+Session::force_locate (nframes_t target_frame, bool with_roll)
{
Event *ev = new Event (with_roll ? Event::LocateRoll : Event::Locate, Event::Add, Event::Immediate, target_frame, 0, true);
queue_event (ev);
}
void
-Session::request_auto_loop (bool yn)
+Session::request_play_loop (bool yn)
{
Event* ev;
Location *location = _locations.auto_loop_location();
ev = new Event (Event::SetLoop, Event::Add, Event::Immediate, 0, 0.0, yn);
queue_event (ev);
- if (!yn && seamless_loop && transport_rolling()) {
+ if (!yn && Config->get_seamless_loop() && transport_rolling()) {
// request an immediate locate to refresh the diskstreams
// after disabling looping
request_locate (_transport_frame-1, true);
}
}
-void
-Session::set_seamless_loop (bool yn)
-{
- if (seamless_loop != yn) {
- seamless_loop = yn;
-
- if (auto_loop && transport_rolling()) {
- // to reset diskstreams etc
- request_auto_loop (true);
- }
-
- ControlChanged (SeamlessLoop); /* EMIT */
- }
-}
-
void
Session::realtime_stop (bool abort)
{
waiting_for_sync_offset = true;
}
- transport_sub_state = (auto_return ? AutoReturning : 0);
+ transport_sub_state = (Config->get_auto_return() ? AutoReturning : 0);
}
void
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if (!(*i)->hidden()) {
if ((*i)->speed() != 1.0f || (*i)->speed() != -1.0f) {
- (*i)->seek ((jack_nframes_t) (_transport_frame * (double) (*i)->speed()));
+ (*i)->seek ((nframes_t) (_transport_frame * (double) (*i)->speed()));
}
else {
(*i)->seek (_transport_frame);
struct tm* now;
time_t xnow;
bool did_record;
-
+ bool saved;
+
did_record = false;
-
- boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
+ saved = false;
+ boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
+
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if ((*i)->get_captured_frames () != 0) {
did_record = true;
Location* loc = _locations.end_location();
bool change_end = false;
-
+
if (_transport_frame < loc->end()) {
/* stopped recording before current end */
(*i)->set_pending_declick (0);
}
}
-
+
if (did_record) {
commit_reversible_command ();
}
-
+
if (_engine.running()) {
update_latency_compensation (true, abort);
}
- if (auto_return || (post_transport_work & PostTransportLocate) || synced_to_jack()) {
-
+ if (Config->get_auto_return() || (post_transport_work & PostTransportLocate) || synced_to_jack()) {
+
if (pending_locate_flush) {
flush_all_redirects ();
}
- if ((auto_return || synced_to_jack()) && !(post_transport_work & PostTransportLocate)) {
+ if ((Config->get_auto_return() || synced_to_jack()) && !(post_transport_work & PostTransportLocate)) {
_transport_frame = last_stop_frame;
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if (!(*i)->hidden()) {
if ((*i)->speed() != 1.0f || (*i)->speed() != -1.0f) {
- (*i)->seek ((jack_nframes_t) (_transport_frame * (double) (*i)->speed()));
+ (*i)->seek ((nframes_t) (_transport_frame * (double) (*i)->speed()));
}
else {
(*i)->seek (_transport_frame);
}
}
}
-
+
//FIXME
//deliver_mmc (MIDI::MachineControl::cmdLocate, _transport_frame);
when realtime_stop(), which has already executed,
will have done this.
*/
-
+
if (!Config->get_latched_record_enable()) {
g_atomic_int_set (&_record_status, Disabled);
} else {
if ((post_transport_work & PostTransportLocate) && get_record_enabled()) {
/* capture start has been changed, so save pending state */
save_state ("", true);
+ saved = true;
}
/* always try to get rid of this */
/* save the current state of things if appropriate */
- if (did_record) {
+ if (did_record && !saved) {
save_state (_current_snapshot_name);
}
_play_range = false;
/* do not turn off autoloop on stop */
-
+
}
PositionChanged (_transport_frame); /* EMIT SIGNAL */
/* and start it up again if relevant */
- if ((post_transport_work & PostTransportLocate) && _slave_type == None && pending_locate_roll) {
+ if ((post_transport_work & PostTransportLocate) && Config->get_slave_source() == None && pending_locate_roll) {
request_transport_speed (1.0);
pending_locate_roll = false;
}
}
void
-Session::set_auto_loop (bool yn)
+Session::set_play_loop (bool yn)
{
/* Called from event-handling context */
set_dirty();
- if (yn && seamless_loop && synced_to_jack()) {
+ if (yn && Config->get_seamless_loop() && synced_to_jack()) {
warning << _("Seamless looping cannot be supported while Ardour is using JACK transport.\n"
"Recommend changing the configured options")
<< endmsg;
}
- if ((auto_loop = yn)) {
+ if ((play_loop = yn)) {
Location *loc;
if ((loc = _locations.auto_loop_location()) != 0) {
- if (seamless_loop) {
+ if (Config->get_seamless_loop()) {
// set all diskstreams to use internal looping
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
}
}
-
- ControlChanged (AutoLoop); /* EMIT SIGNAL */
}
void
}
void
-Session::start_locate (jack_nframes_t target_frame, bool with_roll, bool with_flush, bool with_loop)
+Session::start_locate (nframes_t target_frame, bool with_roll, bool with_flush, bool with_loop)
{
if (synced_to_jack()) {
float sp;
- jack_nframes_t pos;
+ nframes_t pos;
_slave->speed_and_position (sp, pos);
}
void
-Session::locate (jack_nframes_t target_frame, bool with_roll, bool with_flush, bool with_loop)
+Session::locate (nframes_t target_frame, bool with_roll, bool with_flush, bool with_loop)
{
if (actively_recording()) {
return;
}
}
- if (transport_rolling() && !auto_play && !with_roll && !(synced_to_jack() && auto_loop)) {
+ if (transport_rolling() && !Config->get_auto_play() && !with_roll && !(synced_to_jack() && play_loop)) {
realtime_stop (false);
}
if (with_roll) {
/* switch from input if we're going to roll */
- if (Config->get_use_hardware_monitoring()) {
+ if (Config->get_monitoring_model() == HardwareMonitoring) {
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if ((*i)->record_enabled ()) {
//cerr << "switching from input" << __FILE__ << __LINE__ << endl << endl;
- (*i)->monitor_input (!auto_input);
+ (*i)->monitor_input (!Config->get_auto_input());
}
}
}
} else {
/* otherwise we're going to stop, so do the opposite */
- if (Config->get_use_hardware_monitoring()) {
+ if (Config->get_monitoring_model() == HardwareMonitoring) {
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
}
}
- /* cancel autoloop if transport pos outside of loop range */
- if (auto_loop) {
+ /* cancel looped playback if transport pos outside of loop range */
+ if (play_loop) {
Location* al = _locations.auto_loop_location();
if (al && (_transport_frame < al->start() || _transport_frame > al->end())) {
// cancel looping directly, this is called from event handling context
- set_auto_loop(false);
+ set_play_loop (false);
}
}
if (transport_rolling() && speed == 0.0) {
- if (Config->get_use_hardware_monitoring())
+ if (Config->get_monitoring_model() == HardwareMonitoring)
{
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
} else {
stop_transport (abort);
}
-
+
} else if (transport_stopped() && speed == 1.0) {
if (!get_record_enabled() && Config->get_stop_at_session_end() && _transport_frame >= current_end_frame()) {
return;
}
- if (Config->get_use_hardware_monitoring()) {
+ if (Config->get_monitoring_model() == HardwareMonitoring) {
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
- if (auto_input && (*i)->record_enabled ()) {
+ if (Config->get_auto_input() && (*i)->record_enabled ()) {
//cerr << "switching from input" << __FILE__ << __LINE__ << endl << endl;
(*i)->monitor_input (false);
}
if (_transport_speed == 0.0f) {
return;
}
-
+
if (actively_recording() && !(transport_sub_state & StopPendingCapture) &&
_worst_output_latency > current_block_size)
{
return;
}
+
if ((transport_sub_state & PendingDeclickOut) == 0) {
transport_sub_state |= PendingDeclickOut;
/* we'll be called again after the declick */
+ pending_abort = abort;
return;
}
switch (record_status()) {
case Enabled:
- if (!punch_in) {
+ if (!Config->get_punch_in()) {
enable_record ();
}
break;
if (post_transport_work & PostTransportLocate) {
- if ((auto_play && !_exporting) || (post_transport_work & PostTransportRoll)) {
+ if ((Config->get_auto_play() && !_exporting) || (post_transport_work & PostTransportRoll)) {
start_transport ();
}
void
-Session::set_rf_speed (float speed)
-{
- rf_speed = speed;
- cumulative_rf_motion = 0;
- reset_rf_scale (0);
-}
-
-void
-Session::reset_rf_scale (jack_nframes_t motion)
+Session::reset_rf_scale (nframes_t motion)
{
cumulative_rf_motion += motion;
}
}
-int
-Session::set_slave_source (SlaveSource src, jack_nframes_t frame)
+void
+Session::set_slave_source (SlaveSource src)
{
bool reverse = false;
bool non_rt_required = false;
- if (src == _slave_type) {
- return 0;
- }
-
if (_transport_speed) {
error << _("please stop the transport before adjusting slave settings") << endmsg;
- /* help out non-MVC friendly UI's by telling them the slave type changed */
- ControlChanged (SlaveType); /* EMIT SIGNAL */
- return 0;
+ return;
}
// if (src == JACK && Config->get_jack_time_master()) {
-// return -1;
+// return;
// }
if (_slave) {
delete _slave;
_slave = 0;
- _slave_type = None;
}
if (_transport_speed < 0.0) {
case None:
stop_transport ();
break;
-
+
case MTC:
if (_mtc_port) {
try {
}
catch (failed_constructor& err) {
- return -1;
+ return;
}
} else {
error << _("No MTC port defined: MTC slaving is impossible.") << endmsg;
- return -1;
+ return;
}
_desired_transport_speed = _transport_speed;
break;
_desired_transport_speed = _transport_speed;
break;
};
-
- _slave_type = src;
+ Config->set_slave_source (src);
+
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if (!(*i)->hidden()) {
}
set_dirty();
- ControlChanged (SlaveType); /* EMIT SIGNAL */
-
- return 0;
}
void
Event* ev = new Event (Event::SetTransportSpeed, Event::Add, Event::Immediate, 0, 0.0f, false);
merge_event (ev);
}
-
- ControlChanged (PlayRange); /* EMIT SIGNAL */
}
}
/* locating/stopping is subject to delays for declicking.
*/
- jack_nframes_t requested_frame = (*i).end;
+ nframes_t requested_frame = (*i).end;
if (requested_frame > current_block_size) {
requested_frame -= current_block_size;
}
void
-Session::request_bounded_roll (jack_nframes_t start, jack_nframes_t end)
+Session::request_bounded_roll (nframes_t start, nframes_t end)
{
request_stop ();
Event *ev = new Event (Event::StopOnce, Event::Replace, Event::Immediate, end, 0.0);
(!(post_transport_work & PostTransportLocate) || pending_locate_flush));
}
- jack_nframes_t old_latency = (*i)->signal_latency ();
- jack_nframes_t track_latency = (*i)->update_total_latency ();
+ nframes_t old_latency = (*i)->signal_latency ();
+ nframes_t track_latency = (*i)->update_total_latency ();
if (old_latency != track_latency) {
update_jack = true;
#include <pwd.h>
#include <sys/utsname.h>
+#include <sys/stat.h>
#include <glibmm/miscutils.h>
if (open()) {
throw failed_constructor ();
}
-
- if (_build_peakfiles) {
- if (initialize_peakfile (false, _path)) {
- sf_close (sf);
- sf = 0;
- throw failed_constructor ();
- }
- }
}
SndFileSource::SndFileSource (Session& s, string idstr, Flag flags)
if (open()) {
throw failed_constructor ();
}
-
- if (!(_flags & NoPeakFile) && _build_peakfiles) {
- if (initialize_peakfile (false, _path)) {
- sf_close (sf);
- sf = 0;
- throw failed_constructor ();
- }
- }
}
-SndFileSource::SndFileSource (Session& s, string idstr, SampleFormat sfmt, HeaderFormat hf, jack_nframes_t rate, Flag flags)
+SndFileSource::SndFileSource (Session& s, string idstr, SampleFormat sfmt, HeaderFormat hf, nframes_t rate, Flag flags)
: AudioFileSource (s, idstr, flags, sfmt, hf)
{
int fmt = 0;
init (idstr);
+ /* this constructor is used to construct new files, not open
+ existing ones.
+ */
+
+ file_is_new = true;
+
switch (hf) {
case CAF:
fmt = SF_FORMAT_CAF;
}
}
-
- if (!(_flags & NoPeakFile) && _build_peakfiles) {
- if (initialize_peakfile (true, _path)) {
- sf_close (sf);
- sf = 0;
- throw failed_constructor ();
- }
- }
}
void
if (sf) {
sf_close (sf);
sf = 0;
+
+ /* stupid libsndfile updated the headers on close,
+ so touch the peakfile if it exists and has data
+ to make sure its time is as new as the audio
+ file.
+ */
+
+ touch_peakfile ();
}
if (interleave_buf) {
return _info.samplerate;
}
-jack_nframes_t
-SndFileSource::read_unlocked (Sample *dst, jack_nframes_t start, jack_nframes_t cnt) const
+nframes_t
+SndFileSource::read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const
{
int32_t nread;
float *ptr;
uint32_t real_cnt;
- jack_nframes_t file_cnt;
-
- //destructive (tape) tracks need to offset reads and writes by the timeline position
- if (_flags && ARDOUR::Destructive == ARDOUR::Destructive) {
- start -= timeline_position;
- }
+ nframes_t file_cnt;
if (start > _length) {
}
if (_info.channels == 1) {
- jack_nframes_t ret = sf_read_float (sf, dst, file_cnt);
+ nframes_t ret = sf_read_float (sf, dst, file_cnt);
_read_data_count = cnt * sizeof(float);
return ret;
}
}
if (file_cnt != cnt) {
- jack_nframes_t delta = cnt - file_cnt;
+ nframes_t delta = cnt - file_cnt;
memset (dst+file_cnt, 0, sizeof (Sample) * delta);
}
return nread;
}
-jack_nframes_t
-SndFileSource::write_unlocked (Sample *data, jack_nframes_t cnt)
+nframes_t
+SndFileSource::write_unlocked (Sample *data, nframes_t cnt)
{
if (!writable()) {
return 0;
return 0;
}
- jack_nframes_t oldlen;
+ nframes_t oldlen;
int32_t frame_pos = _length;
if (write_float (data, frame_pos, cnt) != cnt) {
if (_build_peakfiles) {
- queue_for_peaks (this);
+ queue_for_peaks (shared_from_this ());
}
_write_data_count = cnt;
}
int
-SndFileSource::update_header (jack_nframes_t when, struct tm& now, time_t tnow)
+SndFileSource::update_header (nframes_t when, struct tm& now, time_t tnow)
{
set_timeline_position (when);
if (!writable() || (sf == 0)) {
return -1;
}
-
return (sf_command (sf, SFC_UPDATE_HEADER_NOW, 0, 0) != SF_TRUE);
}
int
-SndFileSource::setup_broadcast_info (jack_nframes_t when, struct tm& now, time_t tnow)
+SndFileSource::setup_broadcast_info (nframes_t when, struct tm& now, time_t tnow)
{
if (!writable()) {
return -1;
}
-jack_nframes_t
-SndFileSource::write_float (Sample* data, jack_nframes_t frame_pos, jack_nframes_t cnt)
+nframes_t
+SndFileSource::write_float (Sample* data, nframes_t frame_pos, nframes_t cnt)
{
if (sf_seek (sf, frame_pos, SEEK_SET|SFM_WRITE) != frame_pos) {
error << string_compose (_("%1: cannot seek to %2"), _path, frame_pos) << endmsg;
return cnt;
}
-jack_nframes_t
+nframes_t
SndFileSource::natural_position() const
{
return timeline_position;
node->add_property ("name", _name);
node->add_property ("type", _type.to_string());
- _id.print (buf);
+ _id.print (buf, sizeof (buf));
node->add_property ("id", buf);
if (_timestamp != 0) {
$Id$
*/
+#include <pbd/error.h>
+
#include <ardour/source_factory.h>
#include <ardour/sndfilesource.h>
#include <ardour/smf_source.h>
using namespace ARDOUR;
using namespace std;
+using namespace PBD;
sigc::signal<void,boost::shared_ptr<Source> > SourceFactory::SourceCreated;
+int
+SourceFactory::setup_peakfile (boost::shared_ptr<Source> s)
+{
+ boost::shared_ptr<AudioSource> as (boost::dynamic_pointer_cast<AudioSource> (s));
+ if (as) {
+ if (as->setup_peakfile ()) {
+ error << string_compose("SourceFactory: could not set up peakfile for %1", as->name()) << endmsg;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
#ifdef HAVE_COREAUDIO
boost::shared_ptr<Source>
SourceFactory::create (Session& s, const XMLNode& node)
}
if (type == DataType::AUDIO) {
-
+
if (node.property (X_("destructive")) != 0) {
-
+
boost::shared_ptr<Source> ret (new DestructiveFileSource (s, node));
+ if (setup_peakfile (ret)) {
+ return boost::shared_ptr<Source>();
+ }
SourceCreated (ret);
return ret;
-
+
} else {
try {
boost::shared_ptr<Source> ret (new CoreAudioSource (s, node));
+ if (setup_peakfile (ret)) {
+ return boost::shared_ptr<Source>();
+ }
SourceCreated (ret);
return ret;
catch (failed_constructor& err) {
- boost::shared_ptr<Source> ret (new SndFileSource (node));
+
+ boost::shared_ptr<Source> ret (new SndFileSource (s, node));
+ if (setup_peakfile (ret)) {
+ return boost::shared_ptr<Source>();
+ }
SourceCreated (ret);
return ret;
}
if (type == DataType::AUDIO) {
if (node.property (X_("destructive")) != 0) {
-
+
boost::shared_ptr<Source> ret (new DestructiveFileSource (s, node));
+ if (setup_peakfile (ret)) {
+ return boost::shared_ptr<Source>();
+ }
SourceCreated (ret);
return ret;
} else {
-
+
boost::shared_ptr<Source> ret (new SndFileSource (s, node));
+ if (setup_peakfile (ret)) {
+ return boost::shared_ptr<Source>();
+ }
SourceCreated (ret);
return ret;
}
} else if (type == DataType::MIDI) {
-
+
boost::shared_ptr<Source> ret (new SMFSource (s, node));
SourceCreated (ret);
return ret;
boost::shared_ptr<Source>
SourceFactory::createReadable (DataType type, Session& s, string idstr, AudioFileSource::Flag flags, bool announce)
{
+<<<<<<< .working
if (type == DataType::AUDIO) {
if (flags & Destructive) {
boost::shared_ptr<Source> ret (new DestructiveFileSource (s, idstr, flags));
+ if (setup_peakfile (ret)) {
+ return boost::shared_ptr<Source>();
+ }
if (announce) {
SourceCreated (ret);
}
if (type == DataType::AUDIO) {
boost::shared_ptr<Source> ret (new SndFileSource (s, idstr, flags));
+ if (setup_peakfile (ret)) {
+ return boost::shared_ptr<Source>();
+ }
if (announce) {
SourceCreated (ret);
}
} else if (type == DataType::MIDI) {
boost::shared_ptr<Source> ret (new SMFSource (s, idstr, SMFSource::Flag(0))); // FIXME: flags?
+ if (setup_peakfile (ret)) {
+ return boost::shared_ptr<Source>();
+ }
if (announce) {
SourceCreated (ret);
}
#endif // HAVE_COREAUDIO
boost::shared_ptr<Source>
-SourceFactory::createWritable (DataType type, Session& s, std::string path, bool destructive, jack_nframes_t rate, bool announce)
+SourceFactory::createWritable (DataType type, Session& s, std::string path, bool destructive, nframes_t rate, bool announce)
{
/* this might throw failed_constructor(), which is OK */
if (type == DataType::AUDIO) {
+
if (destructive) {
-
boost::shared_ptr<Source> ret (new DestructiveFileSource (s, path,
Config->get_native_file_data_format(),
Config->get_native_file_header_format(),
rate));
+ if (setup_peakfile (ret)) {
+ return boost::shared_ptr<Source>();
+ }
if (announce) {
SourceCreated (ret);
}
- return ret;
-
} else {
-
boost::shared_ptr<Source> ret (new SndFileSource (s, path,
Config->get_native_file_data_format(),
Config->get_native_file_header_format(),
rate));
+ if (setup_peakfile (ret)) {
+ return boost::shared_ptr<Source>();
+ }
if (announce) {
SourceCreated (ret);
}
return ret;
-
}
-
+
} else if (type == DataType::MIDI) {
boost::shared_ptr<Source> ret (new SMFSource (s, path));
.size x86_sse_compute_peak, .-x86_sse_compute_peak
#; end proc
-
+#ifdef __ELF__
+.section .note.GNU-stack,"",%progbits
+#endif
/***********************************************************************/
double
-Meter::frames_per_bar (const Tempo& tempo, jack_nframes_t sr) const
+Meter::frames_per_bar (const Tempo& tempo, nframes_t sr) const
{
return ((60.0 * sr * _beats_per_bar) / tempo.beats_per_minute());
}
}
};
-TempoMap::TempoMap (jack_nframes_t fr)
+TempoMap::TempoMap (nframes_t fr)
{
metrics = new Metrics;
_frame_rate = fr;
const Tempo* tempo;
Meter *m;
Tempo *t;
- jack_nframes_t current;
- jack_nframes_t section_frames;
+ nframes_t current;
+ nframes_t section_frames;
BBT_Time start;
BBT_Time end;
}
TempoMap::Metric
-TempoMap::metric_at (jack_nframes_t frame) const
+TempoMap::metric_at (nframes_t frame) const
{
Metric m (first_meter(), first_tempo());
const Meter* meter;
}
void
-TempoMap::bbt_time (jack_nframes_t frame, BBT_Time& bbt) const
+TempoMap::bbt_time (nframes_t frame, BBT_Time& bbt) const
{
{
Glib::RWLock::ReaderLock lm (lock);
}
void
-TempoMap::bbt_time_unlocked (jack_nframes_t frame, BBT_Time& bbt) const
+TempoMap::bbt_time_unlocked (nframes_t frame, BBT_Time& bbt) const
{
bbt_time_with_metric (frame, bbt, metric_at (frame));
}
void
-TempoMap::bbt_time_with_metric (jack_nframes_t frame, BBT_Time& bbt, const Metric& metric) const
+TempoMap::bbt_time_with_metric (nframes_t frame, BBT_Time& bbt, const Metric& metric) const
{
- jack_nframes_t frame_diff;
+ nframes_t frame_diff;
uint32_t xtra_bars = 0;
double xtra_beats = 0;
}
-jack_nframes_t
+nframes_t
TempoMap::count_frames_between ( const BBT_Time& start, const BBT_Time& end) const
{
*/
- jack_nframes_t frames = 0;
- jack_nframes_t start_frame = 0;
- jack_nframes_t end_frame = 0;
+ nframes_t frames = 0;
+ nframes_t start_frame = 0;
+ nframes_t end_frame = 0;
Metric m = metric_at(start);
+ start.ticks/Meter::ticks_per_beat;
- start_frame = m.frame() + (jack_nframes_t) rint( beat_offset * m.tempo().frames_per_beat(_frame_rate));
+ start_frame = m.frame() + (nframes_t) rint( beat_offset * m.tempo().frames_per_beat(_frame_rate));
m = metric_at(end);
beat_offset = bar_offset * m.meter().beats_per_bar() - (m.start().beats -1) + (end.beats - 1)
+ end.ticks/Meter::ticks_per_beat;
- end_frame = m.frame() + (jack_nframes_t) rint(beat_offset * m.tempo().frames_per_beat(_frame_rate));
+ end_frame = m.frame() + (nframes_t) rint(beat_offset * m.tempo().frames_per_beat(_frame_rate));
frames = end_frame - start_frame;
}
-jack_nframes_t
+nframes_t
TempoMap::count_frames_between_metrics (const Meter& meter, const Tempo& tempo, const BBT_Time& start, const BBT_Time& end) const
{
/*this is used in timestamping the metrics by actually counting the beats */
- jack_nframes_t frames = 0;
+ nframes_t frames = 0;
uint32_t bar = start.bars;
double beat = (double) start.beats;
double beats_counted = 0;
}
}
- frames = (jack_nframes_t) floor (beats_counted * beat_frames);
+ frames = (nframes_t) floor (beats_counted * beat_frames);
return frames;
}
-jack_nframes_t
+nframes_t
TempoMap::frame_time (const BBT_Time& bbt) const
{
BBT_Time start ; /* 1|1|0 */
return count_frames_between ( start, bbt);
}
-jack_nframes_t
-TempoMap::bbt_duration_at (jack_nframes_t pos, const BBT_Time& bbt, int dir) const
+nframes_t
+TempoMap::bbt_duration_at (nframes_t pos, const BBT_Time& bbt, int dir) const
{
- jack_nframes_t frames = 0;
+ nframes_t frames = 0;
BBT_Time when;
bbt_time(pos,when);
return frames;
}
-jack_nframes_t
+nframes_t
TempoMap::bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, int dir) const
{
- jack_nframes_t frames = 0;
+ nframes_t frames = 0;
double beats_per_bar;
BBT_Time result;
-jack_nframes_t
-TempoMap::round_to_bar (jack_nframes_t fr, int dir)
+nframes_t
+TempoMap::round_to_bar (nframes_t fr, int dir)
{
{
Glib::RWLock::ReaderLock lm (lock);
}
-jack_nframes_t
-TempoMap::round_to_beat (jack_nframes_t fr, int dir)
+nframes_t
+TempoMap::round_to_beat (nframes_t fr, int dir)
{
{
Glib::RWLock::ReaderLock lm (lock);
}
}
-jack_nframes_t
+nframes_t
-TempoMap::round_to_beat_subdivision (jack_nframes_t fr, int sub_num)
+TempoMap::round_to_beat_subdivision (nframes_t fr, int sub_num)
{
BBT_Time the_beat;
TempoMap::BBTPointList::iterator i;
TempoMap::BBTPointList *more_zoomed_bbt_points;
- jack_nframes_t frame_one_beats_worth;
- jack_nframes_t pos = 0;
- jack_nframes_t next_pos = 0 ;
+ nframes_t frame_one_beats_worth;
+ nframes_t pos = 0;
+ nframes_t next_pos = 0 ;
double tempo = 1;
double frames_one_subdivisions_worth;
bool fr_has_changed = false;
int n;
- frame_one_beats_worth = (jack_nframes_t) ::floor ((double) _frame_rate * 60 / 20 ); //one beat @ 20 bpm
+ frame_one_beats_worth = (nframes_t) ::floor ((double) _frame_rate * 60 / 20 ); //one beat @ 20 bpm
{
Glib::RWLock::ReaderLock lm (lock);
more_zoomed_bbt_points = get_points((fr >= frame_one_beats_worth) ?
for (n = sub_num; n > 0; n--) {
if (fr >= (pos + ((n - 0.5) * frames_one_subdivisions_worth))) {
- fr = (jack_nframes_t) round(pos + (n * frames_one_subdivisions_worth));
+ fr = (nframes_t) round(pos + (n * frames_one_subdivisions_worth));
if (fr > next_pos) {
fr = next_pos; //take care of fractional beats that don't match the subdivision asked
}
}
-jack_nframes_t
+nframes_t
-TempoMap::round_to_type (jack_nframes_t frame, int dir, BBTPointType type)
+TempoMap::round_to_type (nframes_t frame, int dir, BBTPointType type)
{
Metric metric = metric_at (frame);
BBT_Time bbt;
}
TempoMap::BBTPointList *
-TempoMap::get_points (jack_nframes_t lower, jack_nframes_t upper) const
+TempoMap::get_points (nframes_t lower, nframes_t upper) const
{
Metrics::const_iterator i;
double beat_frame;
double beat_frames;
double frames_per_bar;
- jack_nframes_t limit;
+ nframes_t limit;
meter = &first_meter ();
tempo = &first_tempo ();
if (beat == 1) {
if (current >= lower) {
- points->push_back (BBTPoint (*meter, *tempo,(jack_nframes_t)rint(current), Bar, bar, 1));
+ points->push_back (BBTPoint (*meter, *tempo,(nframes_t)rint(current), Bar, bar, 1));
}
}
while (beat <= ceil( beats_per_bar) && beat_frame < limit) {
if (beat_frame >= lower) {
- points->push_back (BBTPoint (*meter, *tempo, (jack_nframes_t) rint(beat_frame), Beat, bar, beat));
+ points->push_back (BBTPoint (*meter, *tempo, (nframes_t) rint(beat_frame), Beat, bar, beat));
}
beat_frame += beat_frames;
current+= beat_frames;
}
const Tempo&
-TempoMap::tempo_at (jack_nframes_t frame)
+TempoMap::tempo_at (nframes_t frame)
{
Metric m (metric_at (frame));
return m.tempo();
const Meter&
-TempoMap::meter_at (jack_nframes_t frame)
+TempoMap::meter_at (nframes_t frame)
{
Metric m (metric_at (frame));
return m.meter();
}
}
-jack_nframes_t
+ARDOUR::nframes_t
Track::update_total_latency ()
{
_own_latency = 0;
}
Track::RecEnableControllable::RecEnableControllable (Track& s)
- : track (s)
+ : Controllable (X_("recenable")), track (s)
{
}
}
void
-Track::set_latency_delay (jack_nframes_t longest_session_latency)
+Track::set_latency_delay (nframes_t longest_session_latency)
{
Route::set_latency_delay (longest_session_latency);
_diskstream->set_roll_delay (_roll_delay);
$Id$
*/
+#define __STDC_FORMAT_MACROS 1
+#include <stdint.h>
+
#include <cstdio> /* for sprintf */
#include <cmath>
#include <cctype>
#endif // HAVE_COREAUDIO
void
-compute_equal_power_fades (jack_nframes_t nframes, float* in, float* out)
+compute_equal_power_fades (nframes_t nframes, float* in, float* out)
{
double step;
in[0] = 0.0f;
- for (jack_nframes_t i = 1; i < nframes - 1; ++i) {
+ for (nframes_t i = 1; i < nframes - 1; ++i) {
in[i] = in[i-1] + step;
}
in[n] = inVal * (scale * inVal + 1.0f - scale);
}
}
+
+EditMode
+string_to_edit_mode (string str)
+{
+ if (str == _("Splice Edit")) {
+ return Splice;
+ } else if (str == _("Slide Edit")) {
+ return Slide;
+ }
+ fatal << string_compose (_("programming error: unknown edit mode string \"%1\""), str) << endmsg;
+ /*NOTREACHED*/
+ return Slide;
+}
+
+const char*
+edit_mode_to_string (EditMode mode)
+{
+ switch (mode) {
+ case Slide:
+ return _("Slide Edit");
+
+ default:
+ case Splice:
+ return _("Splice Edit");
+ }
+}
+
+SlaveSource
+string_to_slave_source (string str)
+{
+ if (str == _("Internal")) {
+ return None;
+ }
+
+ if (str == _("MTC")) {
+ return MTC;
+ }
+
+ if (str == _("JACK")) {
+ return JACK;
+ }
+
+ fatal << string_compose (_("programming error: unknown slave source string \"%1\""), str) << endmsg;
+ /*NOTREACHED*/
+ return None;
+}
+
+const char*
+slave_source_to_string (SlaveSource src)
+{
+ switch (src) {
+ case JACK:
+ return _("JACK");
+
+ case MTC:
+ return _("MTC");
+
+ default:
+ case None:
+ return _("Internal");
+
+ }
+}
+
+float
+meter_falloff_to_float (MeterFalloff falloff)
+{
+ switch (falloff) {
+ case MeterFalloffOff:
+ return 0.0f;
+ case MeterFalloffSlowest:
+ return 1.0f;
+ case MeterFalloffSlow:
+ return 2.0f;
+ case MeterFalloffMedium:
+ return 3.0f;
+ case MeterFalloffFast:
+ return 4.0f;
+ case MeterFalloffFaster:
+ return 5.0f;
+ case MeterFalloffFastest:
+ default:
+ return 6.0f;
+ }
+}
+
+float
+meter_hold_to_float (MeterHold hold)
+{
+ switch (hold) {
+ case MeterHoldOff:
+ return 0.0f;
+ case MeterHoldShort:
+ return 40.0f;
+ case MeterHoldMedium:
+ return 100.0f;
+ case MeterHoldLong:
+ default:
+ return 200.0f;
+ }
+}
}
void
-VSTPlugin::set_block_size (jack_nframes_t nframes)
+VSTPlugin::set_block_size (nframes_t nframes)
{
deactivate ();
_plugin->dispatcher (_plugin, effSetBlockSize, 0, nframes, NULL, 0.0f);
char index[64];
char val[32];
snprintf (index, sizeof (index), "param_%ld", n);
- snprintf (val, sizeof (val), "%f", _plugin->getParameter (_plugin, n));
+ snprintf (val, sizeof (val), "%.12g", _plugin->getParameter (_plugin, n));
parameters->add_property (index, val);
}
for (i = child->properties().begin(); i != child->properties().end(); ++i) {
long param;
float val;
+
sscanf ((*i)->name().c_str(), "param_%ld", ¶m);
sscanf ((*i)->value().c_str(), "%f", &val);
return name;
}
-jack_nframes_t
+nframes_t
VSTPlugin::latency () const
{
return _plugin->initialDelay;
}
int
-VSTPlugin::connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in_index, int32_t& out_index, jack_nframes_t nframes, jack_nframes_t offset)
+VSTPlugin::connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in_index, int32_t& out_index, nframes_t nframes, nframes_t offset)
{
float *ins[_plugin->numInputs];
float *outs[_plugin->numOutputs];
c = fst.Object ('vstwin', 'vstwin.c')
d = fst.Object ('vsti', 'vsti.c')
-Default([hackSDK,a,b,c,d])
-
-env.Alias('tarball', env.Distribute (env['DISTTREE'], fst_src + ['SConscript'] ))
+if fst['VST']:
+ Default([hackSDK,a,b,c,d])
+
+env.Alias('tarball', env.Distribute (env['DISTTREE'],
+ fst_src + ['SConscript',
+ 'fst.h',
+ 'jackvst.h'
+ ] ))
libglibmm2 = glibmm2.SharedLibrary('glibmm2', glibmm2_files)
-if os.path.exists ('CVS') or os.path.exists ('.svn'):
- glibmm2_configure_script = glibmm2.Command ('configure', 'configure.ac', 'cd libs/glibmm2; ./autogen.sh; cd -', ENV=os.environ)
- glibmm2_config_h = glibmm2.Command('glibmmconfig.h', [glibmm2_configure_script, 'glibmmconfig.h.in'], 'cd libs/glibmm2; ./configure; cd -', ENV=os.environ)
- Default([glibmm2_config_h, libglibmm2])
-else:
- Default([libglibmm2])
+if os.access ('autogen.sh', os.F_OK) :
+ glibmm2_configure_script = glibmm2.Command ('configure', 'configure.ac', 'cd libs/glibmm2; ./autogen.sh; cd -', ENV=os.environ)
+ glibmm2_config_h = glibmm2.Command('glibmmconfig.h', [glibmm2_configure_script, 'glibmmconfig.h.in'],
+ 'cd libs/glibmm2; ./configure || exit 1; cd -', ENV=os.environ)
+else :
+ glibmm2_config_h = glibmm2.Command('glibmmconfig.h', ['configure', 'glibmmconfig.h.in'],
+ 'cd libs/glibmm2; ./configure || exit 1; cd -', ENV=os.environ)
+
+Default([glibmm2_config_h, libglibmm2])
env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), libglibmm2))
env.Alias('tarball', env.Distribute (env['DISTTREE'],
- [ 'SConscript', 'glibmm.h','glibmmconfig.h'] +
+ [ 'SConscript',
+ 'glibmm.h',
+ 'configure',
+ 'Makefile.in',
+ 'glibmmconfig.h',
+ 'glibmmconfig.h.in',
+ 'glibmm-2.4.pc.in',
+ 'glibmm/Makefile.in',
+ 'scripts'
+ ] +
glibmm2_files +
glob.glob('glibmm/*.h') +
glob.glob('glibmm/private/*.h')
using namespace Glib;
using namespace Gtkmm2ext;
-DnDTreeView::DnDTreeView ()
+DnDTreeViewBase::DnDTreeViewBase ()
: TreeView ()
{
draggable.push_back (TargetEntry ("GTK_TREE_MODEL_ROW", TARGET_SAME_WIDGET));
}
void
-DnDTreeView::add_drop_targets (list<TargetEntry>& targets)
+DnDTreeViewBase::add_drop_targets (list<TargetEntry>& targets)
{
for (list<TargetEntry>::iterator i = targets.begin(); i != targets.end(); ++i) {
draggable.push_back (*i);
}
void
-DnDTreeView::add_object_drag (int column, string type_name)
+DnDTreeViewBase::add_object_drag (int column, string type_name)
{
draggable.push_back (TargetEntry (type_name, TargetFlags(0)));
data_column = column;
enable_model_drag_dest (draggable);
}
-DnDTreeView::SerializedObjectPointers*
-DnDTreeView::serialize_pointers (RefPtr<TreeModel> model, TreeSelection::ListHandle_Path* selection, ustring type)
-{
- uint32_t cnt = selection->size();
- uint32_t sz = (sizeof (void*) * cnt) + sizeof (SerializedObjectPointers);
-
- cerr << "lets plan to serialize " << cnt << " from selection\n";
-
- char* buf = new char[sz];
- SerializedObjectPointers* sr = new (buf) SerializedObjectPointers;
-
- sr->cnt = cnt;
- sr->size = sz;
-
- snprintf (sr->type, sizeof (sr->type), "%s", type.c_str());
-
- cnt = 0;
-
- for (TreeSelection::ListHandle_Path::iterator x = selection->begin(); x != selection->end(); ++x, ++cnt) {
- cerr << "getting next item\n";
- TreeModel::Row row = *(model->get_iter (*x));
- row.get_value (data_column, sr->ptr[cnt]);
- }
-
- cerr << "returning an SR with size = " << sr->size << endl;
- return sr;
-}
-
-void
-DnDTreeView::on_drag_data_get(const RefPtr<DragContext>& context, SelectionData& selection_data, guint info, guint time)
-{
- if (selection_data.get_target() == "GTK_TREE_MODEL_ROW") {
-
- TreeView::on_drag_data_get (context, selection_data, info, time);
-
- } else if (data_column >= 0) {
-
- Gtk::TreeSelection::ListHandle_Path selection = get_selection()->get_selected_rows ();
- SerializedObjectPointers* sr = serialize_pointers (get_model(), &selection, selection_data.get_target());
- selection_data.set (8, (guchar*)sr, sr->size);
-
- cerr << "selection data set to contain " << sr->size << endl;
- }
-}
-
-void
-DnDTreeView::on_drag_data_received(const RefPtr<DragContext>& context, int x, int y, const SelectionData& selection_data, guint info, guint time)
-{
- if (suggested_action) {
- /* this is a drag motion callback. just update the status to
- say that we are still dragging, and that's it.
- */
- suggested_action = Gdk::DragAction (0);
- TreeView::on_drag_data_received (context, x, y, selection_data, info, time);
- return;
- }
-
- if (selection_data.get_target() == "GTK_TREE_MODEL_ROW") {
-
- TreeView::on_drag_data_received (context, x, y, selection_data, info, time);
-
- } else if (data_column >= 0) {
-
- /* object D-n-D */
-
- const SerializedObjectPointers* sr = reinterpret_cast<const SerializedObjectPointers *>(selection_data.get_data());
-
- if (sr) {
- signal_object_drop (sr->type, sr->cnt, const_cast<void**>(sr->ptr));
- }
-
- } else {
- /* some kind of target type added by the app, which will be handled by a signal handler */
- }
-}
-
bool
-DnDTreeView::on_drag_drop(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time)
+DnDTreeViewBase::on_drag_drop(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time)
{
suggested_action = Gdk::DragAction (0);
return TreeView::on_drag_drop (context, x, y, time);
}
+
void
UI::do_quit ()
{
- Glib::signal_idle().connect (sigc::ptr_fun (idle_quit));
+ if (getenv ("ARDOUR_RUNNING_UNDER_VALGRIND")) {
+ Main::quit ();
+ } else {
+ Glib::signal_idle().connect (sigc::ptr_fun (idle_quit));
+ }
}
void
namespace Gtkmm2ext {
-class DnDTreeView : public Gtk::TreeView
-{
+template<class DataType>
+struct SerializedObjectPointers {
+ uint32_t size;
+ uint32_t cnt;
+ char type[32];
+ DataType data[0];
+};
+class DnDTreeViewBase : public Gtk::TreeView
+{
private:
public:
- DnDTreeView ();
- ~DnDTreeView() {}
+ DnDTreeViewBase ();
+ ~DnDTreeViewBase() {}
- /* this is the structure pointed to if add_object_drag() is called
- and a drop happens on a destination which has declared itself
- willing to accept a target of the type named in the call
- to add_object_drag().
- */
-
- struct SerializedObjectPointers {
- uint32_t size;
- uint32_t cnt;
- char type[32];
- void* ptr[0];
- };
-
void add_drop_targets (std::list<Gtk::TargetEntry>&);
void add_object_drag (int column, std::string type_name);
- sigc::signal<void,std::string,uint32_t,void**> signal_object_drop;
- void on_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context) {
- TreeView::on_drag_begin (context);
- }
- void on_drag_end(const Glib::RefPtr<Gdk::DragContext>& context) {
- TreeView::on_drag_end (context);
- }
- void on_drag_data_delete(const Glib::RefPtr<Gdk::DragContext>& context) {
- TreeView::on_drag_data_delete (context);
- }
void on_drag_leave(const Glib::RefPtr<Gdk::DragContext>& context, guint time) {
- suggested_action = context->get_suggested_action();
- TreeView::on_drag_leave (context, time);
+ suggested_action = context->get_suggested_action();
+ TreeView::on_drag_leave (context, time);
}
+
bool on_drag_motion(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time) {
suggested_action = context->get_suggested_action();
return TreeView::on_drag_motion (context, x, y, time);
}
+
bool on_drag_drop(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time);
- void on_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, Gtk::SelectionData& selection_data, guint info, guint time);
- void on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time);
- private:
+ protected:
std::list<Gtk::TargetEntry> draggable;
Gdk::DragAction suggested_action;
int data_column;
-
- SerializedObjectPointers* serialize_pointers (Glib::RefPtr<Gtk::TreeModel> m,
- Gtk::TreeSelection::ListHandle_Path*,
- Glib::ustring type);
+};
+
+template<class DataType>
+class DnDTreeView : public DnDTreeViewBase
+{
+ public:
+ DnDTreeView() {}
+ ~DnDTreeView() {}
+
+ sigc::signal<void,std::string,uint32_t,const DataType*> signal_object_drop;
+
+ void on_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, Gtk::SelectionData& selection_data, guint info, guint time) {
+ if (selection_data.get_target() == "GTK_TREE_MODEL_ROW") {
+
+ TreeView::on_drag_data_get (context, selection_data, info, time);
+
+ } else if (data_column >= 0) {
+
+ Gtk::TreeSelection::ListHandle_Path selection = get_selection()->get_selected_rows ();
+ SerializedObjectPointers<DataType>* sr = serialize_pointers (get_model(), &selection, selection_data.get_target());
+ selection_data.set (8, (guchar*)sr, sr->size);
+ }
+ }
+
+ void on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time) {
+ if (suggested_action) {
+ /* this is a drag motion callback. just update the status to
+ say that we are still dragging, and that's it.
+ */
+ suggested_action = Gdk::DragAction (0);
+ TreeView::on_drag_data_received (context, x, y, selection_data, info, time);
+ return;
+ }
+
+ if (selection_data.get_target() == "GTK_TREE_MODEL_ROW") {
+
+ TreeView::on_drag_data_received (context, x, y, selection_data, info, time);
+
+ } else if (data_column >= 0) {
+
+ /* object D-n-D */
+
+ const void* data = selection_data.get_data();
+ const SerializedObjectPointers<DataType>* sr = reinterpret_cast<const SerializedObjectPointers<DataType> *>(data);
+
+ if (sr) {
+ signal_object_drop (sr->type, sr->cnt, sr->data);
+ }
+
+ } else {
+ /* some kind of target type added by the app, which will be handled by a signal handler */
+ }
+ }
+
+ private:
+
+ SerializedObjectPointers<DataType>* serialize_pointers (Glib::RefPtr<Gtk::TreeModel> model,
+ Gtk::TreeSelection::ListHandle_Path* selection,
+ Glib::ustring type) {
+
+ /* this nasty chunk of code is here because X's DnD protocol (probably other graphics UI's too)
+ requires that we package up the entire data collection for DnD in a single contiguous region
+ (so that it can be trivially copied between address spaces). We don't know the type of DataType so
+ we have to mix-and-match C and C++ programming techniques here to get the right result.
+
+ The C trick is to use the "someType foo[0];" declaration trick to create a zero-sized array at the
+ end of a SerializedObjectPointers<DataType object. Then we allocate a raw memory buffer that extends
+ past that array and thus provides space for however many DataType items we actually want to pass
+ around.
+
+ The C++ trick is to use the placement operator new() syntax to initialize that extra
+ memory properly.
+ */
+
+ uint32_t cnt = selection->size();
+ uint32_t sz = (sizeof (DataType) * cnt) + sizeof (SerializedObjectPointers<DataType>);
+
+ char* buf = new char[sz];
+ SerializedObjectPointers<DataType>* sr = (SerializedObjectPointers<DataType>*) buf;
+
+ for (uint32_t i = 0; i < cnt; ++i) {
+ new ((void *) &sr->data[i]) DataType ();
+ }
+
+ sr->cnt = cnt;
+ sr->size = sz;
+ snprintf (sr->type, sizeof (sr->type), "%s", type.c_str());
+
+ cnt = 0;
+
+ for (Gtk::TreeSelection::ListHandle_Path::iterator x = selection->begin(); x != selection->end(); ++x, ++cnt) {
+ model->get_iter (*x)->get_value (data_column, sr->data[cnt]);
+ }
+
+ return sr;
+ }
};
} // namespace
env.Alias('tarball', env.Distribute (env['DISTTREE'],
[ 'NEWS', 'README', 'AUTHORS', 'ChangeLog',
- 'configure', 'SConscript',] +
+ 'configure', 'SConscript',
+ 'install-sh',
+ 'libsndfile.spec.in',
+ 'sndfile.pc.in',
+ 'config.sub',
+ 'config.guess'
+ ] +
sndfile_files +
glob.glob('src/*.h') +
+ glob.glob('src/GSM610/*.h') +
+ glob.glob('src/G72x/*.h') +
[ 'src/sndfile.h.in', 'src/config.h.in', 'src/Symbols.linux', 'src/Symbols.darwin', 'src/libsndfile.def', 'src/cygsndfile.def' ]
))
#ifndef __midi_types_h__
#define __midi_types_h__
+#include <inttypes.h>
+
namespace MIDI {
typedef char channel_t;
typedef float controller_value_t;
typedef unsigned char byte;
typedef unsigned short pitchbend_t;
- typedef unsigned int timestamp_t;
- typedef unsigned int nframes_t;
+ typedef uint32_t nframes_t;
+ typedef uint32_t timestamp_t;
enum eventType {
none = 0x0,
#include <pbd/controllable.h>
#include <pbd/xml++.h>
+#include <pbd/error.h>
#include "i18n.h"
using namespace PBD;
-sigc::signal<void,Controllable*> Controllable::Created;
sigc::signal<void,Controllable*> Controllable::GoingAway;
sigc::signal<bool,Controllable*> Controllable::StartLearning;
sigc::signal<void,Controllable*> Controllable::StopLearning;
-Controllable::Controllable ()
+Controllable::Controllable (std::string name)
+ : _name (name)
{
- Created (this);
}
XMLNode&
Controllable::get_state ()
{
- XMLNode* node = new XMLNode (X_("Controllable"));
+ XMLNode* node = new XMLNode (_name);
char buf[64];
- _id.print (buf);
+ _id.print (buf, sizeof (buf));
node->add_property (X_("id"), buf);
return *node;
}
+
+int
+Controllable::set_state (const XMLNode& node)
+{
+ const XMLProperty* prop = node.property (X_("id"));
+
+ if (prop) {
+ _id = prop->value();
+ return 0;
+ } else {
+ error << _("Controllable state node has no ID property") << endmsg;
+ return -1;
+ }
+}
}
void
-ID::print (char* buf) const
+ID::print (char* buf, uint32_t bufsize) const
{
- /* XXX sizeof buf is unknown. bad API design */
- snprintf (buf, 16, "%" PRIu64, _id);
+ snprintf (buf, bufsize, "%" PRIu64, _id);
}
string ID::to_s() const
{
- char buf[16]; // see print()
- print(buf);
+ char buf[32]; // see print()
+ print(buf, sizeof (buf));
return string(buf);
}
operator<< (ostream& ostr, const ID& _id)
{
char buf[32];
- _id.print (buf);
+ _id.print (buf, sizeof (buf));
ostr << buf;
return ostr;
}
#ifndef __pbd_controllable_h__
#define __pbd_controllable_h__
+#include <string>
+
#include <sigc++/trackable.h>
#include <sigc++/signal.h>
class Controllable : public virtual sigc::trackable, public Stateful {
public:
- Controllable ();
+ Controllable (std::string name);
virtual ~Controllable() { GoingAway (this); }
virtual void set_value (float) = 0;
sigc::signal<void> LearningFinished;
- static sigc::signal<void,Controllable*> Created;
static sigc::signal<void,Controllable*> GoingAway;
-
static sigc::signal<bool,PBD::Controllable*> StartLearning;
static sigc::signal<void,PBD::Controllable*> StopLearning;
sigc::signal<void> Changed;
- const PBD::ID& id() const { return _id; }
-
- int set_state (const XMLNode&) { return 0; }
+ int set_state (const XMLNode&);
XMLNode& get_state ();
+ std::string name() const { return _name; }
+
private:
- PBD::ID _id;
+ std::string _name;
};
}
namespace PBD {
-class Destructible {
+class Destructible : public virtual sigc::trackable {
public:
Destructible() {}
virtual ~Destructible () {}
return _id < other._id;
}
- void print (char* buf) const;
+ void print (char* buf, uint32_t bufsize) const;
std::string to_s() const;
static uint64_t counter() { return _counter; }
#include <sigc++/slot.h>
#include <typeinfo>
+/* grrr, strict C++ says that static member functions are not C functions, but we also want
+ to be able to pack this into a sigc::ptr_fun and not sigc::mem_fun, so we have to make
+ it a genuine function rather than a member.
+*/
+
+static void object_death (Command* mc) {
+ delete mc;
+}
+
/** This command class is initialized with before and after mementos
* (from Stateful::get_state()), so undo becomes restoring the before
* memento, and redo is restoring the after memento.
*/
+
template <class obj_T>
class MementoCommand : public Command
{
XMLNode *after
)
: obj(object), before(before), after(after) {
- obj.GoingAway.connect (sigc::mem_fun (*this, &MementoCommand<obj_T>::object_death));
+ obj.GoingAway.connect (sigc::bind (sigc::ptr_fun (object_death), static_cast<Command*>(this)));
}
+
~MementoCommand () {
GoingAway();
if (before) {
protected:
obj_T &obj;
XMLNode *before, *after;
-
- void object_death () {
- delete this;
- }
};
#endif // __lib_pbd_memento_h__
+++ /dev/null
-#ifndef __libmisc_restartable_rw__h__
-#define __libmisc_restartable_rw__h__
-
-extern int restartable_write (int fd, unsigned char *buf, size_t cnt);
-extern int restartable_read (int fd, unsigned char *buf, size_t cnt);
-
-#endif // __libmisc_restartable_rw__h__
--- /dev/null
+#ifndef __pbd_shiva_h__
+#define __pbd_shiva_h__
+
+#include <sigc++/sigc++.h>
+
+namespace PBD {
+
+template<typename ObjectWithGoingAway, typename ObjectToBeDestroyed>
+
+/* named after the Hindu god Shiva, The Destroyer */
+
+class Shiva {
+ public:
+ Shiva (ObjectWithGoingAway& emitter, ObjectToBeDestroyed& receiver) {
+
+ /* if the emitter goes away, destroy the receiver */
+
+ _connection1 = emitter.GoingAway.connect
+ (sigc::bind (sigc::mem_fun
+ (*this, &Shiva<ObjectWithGoingAway,ObjectToBeDestroyed>::destroy),
+ &receiver));
+
+ /* if the receiver goes away, forget all this nonsense */
+
+ _connection2 = receiver.GoingAway.connect
+ (sigc::mem_fun (*this, &Shiva<ObjectWithGoingAway,ObjectToBeDestroyed>::forget));
+ }
+
+ ~Shiva() {
+ forget ();
+ }
+
+ private:
+ sigc::connection _connection1;
+ sigc::connection _connection2;
+
+ void destroy (ObjectToBeDestroyed* obj) {
+ delete obj;
+ forget ();
+ }
+
+ void forget () {
+ _connection1.disconnect ();
+ _connection2.disconnect ();
+ }
+
+};
+
+}
+
+#endif /* __pbd_shiva_h__ */
#include <ostream>
namespace PBD {
- void stacktrace (std::ostream& out);
+ void stacktrace (std::ostream& out, int levels = 0);
}
#endif /* __libpbd_stacktrace_h__ */
~UndoTransaction ();
void clear ();
+ bool empty() const;
+ bool clearing () const { return _clearing; }
void add_command (Command* const);
+ void remove_command (Command* const);
void operator() ();
void undo();
std::list<Command*> actions;
struct timeval _timestamp;
std::string _name;
- bool clearing;
- void remove_command (Command* const);
+ bool _clearing;
};
class UndoHistory
void save_state();
private:
- bool clearing;
+ bool _clearing;
std::list<UndoTransaction*> UndoList;
std::list<UndoTransaction*> RedoList;
#include <stdlib.h>
void
-PBD::stacktrace (std::ostream& out)
+PBD::stacktrace (std::ostream& out, int levels)
{
void *array[200];
size_t size;
printf ("Obtained %zd stack frames.\n", size);
- for (i = 0; i < size; i++) {
+ for (i = 0; i < size && (levels == 0 || i < levels); i++) {
out << strings[i] << std::endl;
}
#else
void
-PBD::stacktrace (std::ostream& out)
+PBD::stacktrace (std::ostream& out, int levels)
{
out << "stack tracing is not enabled on this platform" << std::endl;
}
using namespace std;
using namespace sigc;
+/* grrr, strict C++ says that static member functions are not C functions, but we also want
+ to be able to pack this into a sigc::ptr_fun and not sigc::mem_fun, so we have to make
+ it a genuine function rather than a member.
+*/
+
+static void command_death (UndoTransaction* ut, Command* c)
+{
+ if (ut->clearing()) {
+ return;
+ }
+
+ ut->remove_command (c);
+
+ if (ut->empty()) {
+ delete ut;
+ }
+}
+
+
UndoTransaction::UndoTransaction ()
{
- clearing = false;
+ _clearing = false;
}
UndoTransaction::UndoTransaction (const UndoTransaction& rhs)
{
_name = rhs._name;
- clearing = false;
+ _clearing = false;
clear ();
actions.insert(actions.end(),rhs.actions.begin(),rhs.actions.end());
}
void
UndoTransaction::add_command (Command *const action)
{
- action->GoingAway.connect (bind (mem_fun (*this, &UndoTransaction::remove_command), action));
+ action->GoingAway.connect (bind (sigc::ptr_fun (command_death), this, const_cast<Command*>(action)));
actions.push_back (action);
}
void
UndoTransaction::remove_command (Command* const action)
{
- if (clearing) {
- return;
- }
actions.remove (action);
- if (actions.empty()) {
- delete this;
- }
+}
+
+bool
+UndoTransaction::empty () const
+{
+ return actions.empty();
}
void
UndoTransaction::clear ()
{
- clearing = true;
+ _clearing = true;
for (list<Command*>::iterator i = actions.begin(); i != actions.end(); ++i) {
delete *i;
}
actions.clear ();
- clearing = false;
+ _clearing = false;
}
void
UndoHistory::UndoHistory ()
{
- clearing = false;
+ _clearing = false;
}
void
void
UndoHistory::remove (UndoTransaction* const ut)
{
- if (clearing) {
+ if (_clearing) {
return;
}
void
UndoHistory::clear_redo ()
{
- clearing = true;
+ _clearing = true;
RedoList.clear ();
- clearing = false;
+ _clearing = false;
}
void
UndoHistory::clear_undo ()
{
- clearing = true;
+ _clearing = true;
UndoList.clear ();
- clearing = false;
+ _clearing = false;
}
void
libsigc2 = sigc2.SharedLibrary('sigc++2', sigc2_files)
-if os.path.exists ('CVS') or os.path.exists ('.svn'):
+if os.access ('autogen.sh', os.F_OK) :
sigc2_configure_script = sigc2.Command ('configure', 'configure.ac', 'cd libs/sigc++2 && ./autogen.sh && cd -', ENV=os.environ)
sigc2_config_h = sigc2.Command('sigc++config.h', [sigc2_configure_script, 'sigc++config.h.in'], 'cd libs/sigc++2 && ./configure && cd -', ENV=os.environ)
- Default([sigc2_config_h,libsigc2])
-else:
- Default([libsigc2])
+else :
+ sigc2_config_h = sigc2.Command('sigc++config.h', ['configure', 'sigc++config.h.in'], 'cd libs/sigc++2 && ./configure && cd -', ENV=os.environ)
+
+
+Default([sigc2_config_h,libsigc2])
env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), libsigc2))
env.Alias('tarball', env.Distribute (env['DISTTREE'],
[ 'NEWS', 'README', 'AUTHORS', 'ChangeLog',
- 'configure', 'Makefile.am', 'SConscript',
- 'sigc++/Makefile.am',
+ 'configure', 'configure.ac', 'Makefile.am', 'SConscript',
+ 'sigc++/Makefile.in',
'sigc++config.h',
+ 'sigc++config.h.in',
+ 'sigc++-2.0.pc.in',
+ 'libsigc++-2.0.spec.in',
+ 'install-sh',
+ 'Makefile.in',
+ 'scripts',
+ 'missing',
] + sigc2_files +
glob.glob('sigc++/*.h') +
glob.glob('sigc++/functors/*.h') + glob.glob('sigc++/adaptors/lambda/*.h') +
#include "i18n.h"
using namespace ARDOUR;
+using ARDOUR::nframes_t;
BasicUI::BasicUI (Session& s)
: session (&s)
void
BasicUI::loop_toggle ()
{
- if (session->get_auto_loop()) {
- session->request_auto_loop (false);
+ if (Config->get_auto_loop()) {
+ session->request_play_loop (false);
} else {
- session->request_auto_loop (true);
+ session->request_play_loop (true);
if (!session->transport_rolling()) {
session->request_transport_speed (1.0);
}
void
BasicUI::add_marker ()
{
- jack_nframes_t when = session->audible_frame();
+ nframes_t when = session->audible_frame();
session->locations()->add (new Location (when, when, _("unnamed"), Location::IsMark));
}
{
bool rolling = session->transport_rolling ();
- if (session->get_auto_loop()) {
- session->request_auto_loop (false);
+ if (Config->get_auto_loop()) {
+ session->request_play_loop (false);
}
if (session->get_play_range ()) {
void
BasicUI::toggle_punch_in ()
{
- session->set_punch_in (!session->get_punch_in());
+ Config->set_punch_in (!Config->get_punch_in());
}
void
BasicUI::toggle_punch_out ()
{
- session->set_punch_out (!session->get_punch_out());
+ Config->set_punch_out (!Config->get_punch_out());
}
bool
}
}
-jack_nframes_t
+nframes_t
BasicUI::transport_frame ()
{
return session->transport_frame();
}
void
-BasicUI::locate (jack_nframes_t where, bool roll_after_locate)
+BasicUI::locate (nframes_t where, bool roll_after_locate)
{
session->request_locate (where, roll_after_locate);
}
return session->transport_locked ();
}
-jack_nframes_t
+nframes_t
BasicUI::smpte_frames_per_hour ()
{
return session->smpte_frames_per_hour ();
}
void
-BasicUI::smpte_time (jack_nframes_t where, SMPTE::Time& smpte)
+BasicUI::smpte_time (nframes_t where, SMPTE::Time& smpte)
{
session->smpte_time (where, *((SMPTE::Time *) &smpte));
}
void
-BasicUI::smpte_to_sample (SMPTE::Time& smpte, jack_nframes_t& sample, bool use_offset, bool use_subframes) const
+BasicUI::smpte_to_sample (SMPTE::Time& smpte, nframes_t& sample, bool use_offset, bool use_subframes) const
{
session->smpte_to_sample (*((SMPTE::Time*)&smpte), sample, use_offset, use_subframes);
}
void
-BasicUI::sample_to_smpte (jack_nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes) const
+BasicUI::sample_to_smpte (nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes) const
{
session->sample_to_smpte (sample, *((SMPTE::Time*)&smpte), use_offset, use_subframes);
}
virtual int set_active (bool yn) = 0;
bool get_active() const { return _active; }
+ virtual int set_feedback (bool yn) { return 0; }
+ virtual bool get_feedback () const { return false; }
+
sigc::signal<void> ActiveChanged;
/* signals that a control protocol can emit and other (presumably graphical)
void* ptr; /* protocol can store a value here */
void* module; /* not for public access */
int mandatory; /* if non-zero, always load and do not make optional */
+ bool supports_feedback; /* if true, protocol has toggleable feedback mechanism */
bool (*probe)(ControlProtocolDescriptor*);
ControlProtocol* (*initialize)(ControlProtocolDescriptor*,Session*);
void (*destroy)(ControlProtocolDescriptor*,ControlProtocol*);
$Id$
*/
+#define __STDC_FORMAT_MACROS 1
+#include <stdint.h>
+
#include <algorithm>
#include <pbd/error.h>
#include "i18n.h"
GenericMidiControlProtocol::GenericMidiControlProtocol (Session& s)
- : ControlProtocol (s, _("GenericMIDI"))
+ : ControlProtocol (s, _("Generic MIDI"))
{
MIDI::Manager* mm = MIDI::Manager::instance();
throw failed_constructor();
}
+ do_feedback = false;
_feedback_interval = 10000; // microseconds
last_feedback_time = 0;
void
GenericMidiControlProtocol::send_feedback ()
{
+ if (!do_feedback) {
+ return;
+ }
+
microseconds_t now = get_microseconds ();
if (last_feedback_time != 0) {
void
GenericMidiControlProtocol::_send_feedback ()
{
- const int32_t bufsize = 16 * 1024;
+ const int32_t bufsize = 16 * 1024; /* XXX too big */
MIDI::byte buf[bufsize];
int32_t bsize = bufsize;
MIDI::byte* end = buf;
XMLNode&
GenericMidiControlProtocol::get_state ()
{
- XMLNode* node = new XMLNode (_name); /* node name must match protocol name */
+ XMLNode* node = new XMLNode ("Protocol");
+ char buf[32];
+
+ node->add_property (X_("name"), _name);
+ node->add_property (X_("feedback"), do_feedback ? "1" : "0");
+ snprintf (buf, sizeof (buf), "%" PRIu64, _feedback_interval);
+ node->add_property (X_("feedback_interval"), buf);
+
XMLNode* children = new XMLNode (X_("controls"));
node->add_child_nocopy (*children);
{
XMLNodeList nlist;
XMLNodeConstIterator niter;
+ const XMLProperty* prop;
+
+ if ((prop = node.property ("feedback")) != 0) {
+ do_feedback = (bool) atoi (prop->value().c_str());
+ } else {
+ do_feedback = false;
+ }
+
+ if ((prop = node.property ("feedback_interval")) != 0) {
+ if (sscanf (prop->value().c_str(), "%" PRIu64, &_feedback_interval) != 1) {
+ _feedback_interval = 10000;
+ }
+ } else {
+ _feedback_interval = 10000;
+ }
+
Controllable* c;
{
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
- XMLProperty* prop;
-
if ((prop = (*niter)->property ("id")) != 0) {
-
+
ID id = prop->value ();
-
+
c = session->controllable_by_id (id);
-
+
if (c) {
MIDIControllable* mc = new MIDIControllable (*_port, *c);
if (mc->set_state (**niter) == 0) {
controllables.insert (mc);
}
+
+ } else {
+ warning << string_compose (_("Generic MIDI control: controllable %1 not found in session (ignored)"),
+ id)
+ << endmsg;
}
}
}
-
+
+ return 0;
+}
+
+int
+GenericMidiControlProtocol::set_feedback (bool yn)
+{
+ do_feedback = yn;
+ last_feedback_time = 0;
return 0;
}
+
+bool
+GenericMidiControlProtocol::get_feedback () const
+{
+ return do_feedback;
+}
MIDI::Port* port () const { return _port; }
void set_feedback_interval (ARDOUR::microseconds_t);
+ int set_feedback (bool yn);
+ bool get_feedback () const;
+
XMLNode& get_state ();
int set_state (const XMLNode&);
ARDOUR::microseconds_t _feedback_interval;
ARDOUR::microseconds_t last_feedback_time;
+ bool do_feedback;
void _send_feedback ();
void send_feedback ();
ptr : 0,
module : 0,
mandatory : 0,
+ supports_feedback : true,
probe : probe_generic_midi_protocol,
initialize : new_generic_midi_protocol,
destroy : delete_generic_midi_protocol
return -1;
}
+ bind_midi (control_channel, control_type, control_additional);
+
return 0;
}
ptr : 0,
module : 0,
mandatory : 0,
+ supports_feedback : false,
probe : probe_tranzport_protocol,
initialize : new_tranzport_protocol,
destroy : delete_tranzport_protocol
void
TranzportControlProtocol::show_transport_time ()
{
- jack_nframes_t where = session->transport_frame();
+ nframes_t where = session->transport_frame();
if (where != last_where) {
/* global */
- if (session->get_auto_loop()) {
+ if (Config->get_auto_loop()) {
pending_lights[LightLoop] = true;
} else {
pending_lights[LightLoop] = false;
}
- if (session->get_punch_in() || session->get_punch_out()) {
+ if (Config->get_punch_in() || Config->get_punch_out()) {
pending_lights[LightPunch] = true;
} else {
pending_lights[LightPunch] = false;
XMLNode&
TranzportControlProtocol::get_state ()
{
- XMLNode* node = new XMLNode (_name); /* node name must match protocol name */
+ XMLNode* node = new XMLNode (X_("Protocol"));
+ node->add_property (X_("name"), _name);
return *node;
}
uint32_t last_mins;
uint32_t last_secs;
uint32_t last_frames;
- jack_nframes_t last_where;
+ nframes_t last_where;
ARDOUR::gain_t last_track_gain;
uint32_t last_meter_fill;
struct timeval last_wheel_motion;
import os.path
import glob
-Import('env install_prefix final_prefix config_prefix libraries')
+from stat import *
+
+Import('env install_prefix final_prefix config_prefix subst_dict libraries')
ardour_vst = env.Copy()
libraries['jack']
])
-wine_executable = ardour_vst.Program (target = 'ardour_vst', source = sources)
+#
+# run winegcc to build a mini-win32 executable that wine can run. note: this also
+# generates a script called 'ardour_vst' which we don't use
+#
+
+wine_generated_executable = ardour_vst.Program (target = 'ardour_vst', source = sources)
+
+#
+# generate a shell script that will run the .exe file correctly
+#
+
+wine_executable = ardour_vst.SubstInFile ('ardourvst', 'ardourvst.in', SUBST_DICT = subst_dict)
+
+# make sure the scripts are executable
+
+if ardour_vst['VST']:
+ ardour_vst.AddPostAction (wine_executable, ardour_vst.Action (Chmod ('vst/ardevst', 0755)))
+ ardour_vst.AddPostAction (wine_executable, ardour_vst.Action (Chmod (wine_executable, 0755)))
+ Default([wine_generated_executable, wine_executable])
+
+ # the wine script - into the bin dir
+ env.Alias('install', env.Install(os.path.join(install_prefix, 'bin'), wine_executable))
+ # the win32 executable - into the lib dir since the wine script will look for it there
+ env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), 'ardour_vst.exe.so'))
+
+env.Alias ('tarball', env.Distribute (env['DISTTREE'],
+ [ 'SConscript',
+ 'winmain.c',
+ 'ardourvst.in',
+ 'ardevst'
+ ]))
-Default(wine_executable)
--- /dev/null
+#!/bin/sh
+export ARDOUR_PATH=../gtk2_ardour/glade:../gtk2_ardour/pixmaps:../gtk2_ardour
+export LD_LIBRARY_PATH=../gtk2_ardour:../libs/surfaces/control_protocol:../libs/ardour:../libs/midi++2:../libs/pbd:../libs/soundtouch:../libs/gtkmm2ext:../libs/sigc++2:../libs/glibmm2:../libs/gtkmm2/atk:../libs/gtkmm2/pango:../libs/gtkmm2/gdk:../libs/gtkmm2/gtk:../libs/libgnomecanvasmm:../libs/libsndfile:../libs/appleutility:$$LD_LIBRARY_PATH
+exec wine ./ardour_vst.exe.so "$@"
--- /dev/null
+#!/bin/sh
+
+# NOTE: the use of PREFIX is incorrect - it should be INSTALL_PREFIX,
+# but somehow scons puts leading /'s on INSTALL_PREFIX and that causes
+# wine to be unable to find the .exe.so file
+
+LD_LIBRARY_PATH=%PREFIX%/lib/ardour2:$LD_LIBRARY_PATH exec wine %PREFIX%/lib/ardour2/ardour_vst.exe.so "$@"
+