move to scons Clone everywhere rather than Copy; add Session::micro_locate() for ongoing work on video sync; debugging output for export precision problem; minor clean up to IO::find_possible_connection(); fix up a few signed/unsigned issues; make "feature lines" always be the right height as tracks resize; change version to 2.5

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3517 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-07-07 15:52:22 +00:00
parent 3be87c2c91
commit dda3143dc7
33 changed files with 111 additions and 60 deletions

View file

@ -20,7 +20,7 @@ import SCons.Node.FS
SConsignFile()
EnsureSConsVersion(0, 96)
ardour_version = '2.4.1'
ardour_version = '2.5'
subst_dict = { }

View file

@ -6,8 +6,8 @@ import glob
Import('env install_prefix final_prefix config_prefix libraries i18n ardour_version')
gtkardour = env.Copy()
gtkmmtests = env.Copy()
gtkardour = env.Clone()
gtkmmtests = env.Clone()
#
# this defines the version number of the GTK interface to ardour

View file

@ -761,7 +761,7 @@ ARDOUR_UI::use_shuttle_fract (bool force)
more than once per process cycle.
*/
if (!force && (last_shuttle_request - now) < engine->usecs_per_cycle()) {
if (!force && (last_shuttle_request - now) < (microseconds_t) engine->usecs_per_cycle()) {
return;
}

View file

@ -1651,12 +1651,6 @@ Editor::motion_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item
track_canvas->get_pointer (x, y);
}
if (event->motion.state & GDK_BUTTON1_MASK) {
queue_draw_resize_line (event->motion.y);
} else {
need_resize_line = false;
}
if (current_stepping_trackview) {
/* don't keep the persistent stepped trackview if the mouse moves */
current_stepping_trackview = 0;

View file

@ -382,7 +382,8 @@ TimeAxisView::set_height(uint32_t h)
/* resize the selection rect */
show_selection (editor.get_selection().time);
}
reshow_feature_lines ();
}
bool
@ -1162,8 +1163,6 @@ TimeAxisView::reshow_feature_lines ()
while (feature_lines.size()< analysis_features.size()) {
ArdourCanvas::SimpleLine* l = new ArdourCanvas::SimpleLine (*canvas_display);
l->property_color_rgba() = (guint) ARDOUR_UI::config()->canvasvar_ZeroLine.get();
l->property_y1() = 0;
l->property_y2() = current_height();
feature_lines.push_back (l);
}
@ -1179,6 +1178,8 @@ TimeAxisView::reshow_feature_lines ()
for (i = analysis_features.begin(), l = feature_lines.begin(); i != analysis_features.end() && l != feature_lines.end(); ++i, ++l) {
(*l)->property_x1() = editor.frame_to_pixel (*i);
(*l)->property_x2() = editor.frame_to_pixel (*i);
(*l)->property_y1() = 0;
(*l)->property_y2() = current_height();
(*l)->show ();
}
}
@ -1214,16 +1215,8 @@ TimeAxisView::resizer_motion (GdkEventMotion* ev)
}
int32_t delta = (int32_t) floor (resize_drag_start - ev->y_root);
int xroot, yroot;
Glib::RefPtr<Gdk::Window> win (resizer.get_window());
if (win) {
win->get_origin (xroot, yroot);
editor.queue_draw_resize_line (yroot + ev->y);
}
resize_idle_target = std::max (resize_idle_target - delta, (int) hSmall);
editor.add_to_idle_resize (this, resize_idle_target);
resize_drag_start = ev->y_root;

View file

@ -7,7 +7,7 @@ import glob
appleutility_files = glob.glob('*.cpp')
Import('env install_prefix')
appleutility = env.Copy()
appleutility = env.Clone()
appleutility.Append(LINKFLAGS='-framework AudioToolbox')
appleutility.Append(LINKFLAGS='-framework AudioUnit')

View file

@ -121,6 +121,7 @@ CONFIG_VARIABLE (bool, quieten_at_speed, "quieten-at-speed", true)
CONFIG_VARIABLE (bool, primary_clock_delta_edit_cursor, "primary-clock-delta-edit-cursor", false)
CONFIG_VARIABLE (bool, secondary_clock_delta_edit_cursor, "secondary-clock-delta-edit-cursor", false)
CONFIG_VARIABLE (bool, show_track_meters, "show-track-meters", true)
CONFIG_VARIABLE (bool, locate_while_waiting_for_sync, "locate-while-waiting-for-sync", false)
/* timecode and sync */

View file

@ -1423,6 +1423,7 @@ class Session : public PBD::StatefulDestructible
void set_play_loop (bool yn);
void overwrite_some_buffers (Diskstream*);
void flush_all_redirects ();
int micro_locate (nframes_t distance);
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);

View file

@ -214,7 +214,7 @@ AudioSource::initialize_peakfile (bool newfile, ustring audio_path)
/* we found it in the peaks dir, so check it out */
if (statbuf.st_size == 0 || (statbuf.st_size < ((length() / _FPP) * sizeof (PeakData)))) {
if (statbuf.st_size == 0 || ((nframes_t) statbuf.st_size < ((length() / _FPP) * sizeof (PeakData)))) {
// empty
_peaks_built = false;
} else {

View file

@ -1780,16 +1780,17 @@ IO::ports_became_legal ()
}
Connection *
IO::find_possible_connection(const string &desired_name, const string &default_name, const string &connection_type_name) {
static const string digits = "0123456789";
IO::find_possible_connection(const string &desired_name, const string &default_name, const string &connection_type_name)
{
static const string digits = "0123456789";
Connection* c = _session.connection_by_name (desired_name);
if (!c) {
int connection_number, mask;
string possible_name;
bool stereo = false;
size_t last_non_digit_pos;
int connection_number, mask;
string possible_name;
bool stereo = false;
string::size_type last_non_digit_pos;
error << string_compose(_("Unknown connection \"%1\" listed for %2 of %3"), desired_name, connection_type_name, _name)
<< endmsg;
@ -1798,19 +1799,21 @@ static const string digits = "0123456789";
connection_number = 0;
last_non_digit_pos = desired_name.find_last_not_of(digits);
if (last_non_digit_pos != string::npos) {
stringstream s;
s << desired_name.substr(last_non_digit_pos);
s >> connection_number;
}
// see if it's a stereo connection e.g. "in 3+4"
if (last_non_digit_pos > 1 && desired_name[last_non_digit_pos] == '+') {
int left_connection_number = 0;
string::size_type left_last_non_digit_pos;
size_t left_last_non_digit_pos;
left_last_non_digit_pos = desired_name.find_last_not_of(digits, last_non_digit_pos-1);
if (left_last_non_digit_pos != string::npos) {
stringstream s;
s << desired_name.substr(left_last_non_digit_pos, last_non_digit_pos-1);
@ -1827,26 +1830,30 @@ static const string digits = "0123456789";
if (connection_number)
connection_number--;
cerr << "desired_name = " << desired_name << ", connection_number = " << connection_number << endl;
// find highest set bit
mask = 1;
while ((mask <= connection_number) && (mask <<= 1)) {
}
while ((mask <= connection_number) && (mask <<= 1));
// "wrap" connection number into largest possible power of 2
// that works...
while (mask && !c) {
while (mask) {
if (connection_number & mask) {
connection_number &= ~mask;
stringstream s;
s << default_name << " " << connection_number + 1;
if (stereo) {
s << "+" << connection_number + 2;
}
possible_name = s.str();
c = _session.connection_by_name (possible_name);
if ((c = _session.connection_by_name (possible_name)) != 0) {
break;
}
}
mask >>= 1;
}

View file

@ -443,6 +443,8 @@ Session::start_audio_export (AudioExportSpecification& spec)
spec.freewheel_connection = _engine.Freewheel.connect (sigc::bind (mem_fun (*this, &Session::process_export), &spec));
cerr << "Start export at pos = " << spec.pos << endl;
return _engine.freewheel (true);
}
@ -510,6 +512,8 @@ Session::prepare_to_export (AudioExportSpecification& spec)
}
}
cerr << "Everybdy is at " << spec.start_frame << endl;
/* we just did the core part of a locate() call above, but
for the sake of any GUI, put the _transport_frame in
the right place too.
@ -545,6 +549,10 @@ Session::process_export (nframes_t nframes, AudioExportSpecification* spec)
int ret = -1;
nframes_t this_nframes;
cerr << "Export process at pos = " << spec->pos << " _exporting = "
<< _exporting << " running = " << spec->running << " stop = "
<< spec->stop << endl;
/* This is not required to be RT-safe because we are running while freewheeling */
if (spec->do_freewheel == false) {
@ -562,12 +570,14 @@ Session::process_export (nframes_t nframes, AudioExportSpecification* spec)
if (!_exporting) {
/* finished, but still freewheeling */
process_without_events (nframes);
cerr << "\tExport ... not exporting yet, no_roll() for " << nframes <<endl;
no_roll (nframes, 0);
return 0;
}
if (!spec->running || spec->stop || (this_nframes = min ((spec->end_frame - spec->pos), nframes)) == 0) {
process_without_events (nframes);
cerr << "\tExport ... not running or at end, no_roll() for " << nframes <<endl;
no_roll (nframes, 0);
return stop_audio_export (*spec);
}
@ -616,6 +626,8 @@ Session::process_export (nframes_t nframes, AudioExportSpecification* spec)
}
}
cerr << "\tprocess " << nframes << endl;
if (spec->process (nframes)) {
goto out;
}
@ -623,6 +635,8 @@ Session::process_export (nframes_t nframes, AudioExportSpecification* spec)
spec->pos += nframes;
spec->progress = 1.0 - (((float) spec->end_frame - spec->pos) / spec->total_frames);
cerr << "\t@ " << spec->pos << " prog = " << spec->progress << endl;
/* and we're good to go */
ret = 0;

View file

@ -846,18 +846,38 @@ Session::maybe_sync_start (nframes_t& nframes, nframes_t& offset)
if (_engine.get_sync_offset (sync_offset) && sync_offset < nframes) {
/* generate silence up to the sync point, then
adjust nframes + offset to reflect whatever
is left to do.
*/
no_roll (sync_offset, 0);
nframes -= sync_offset;
offset += sync_offset;
waiting_for_sync_offset = false;
if (nframes == 0) {
return true; // done
return true; // done, nothing left to process
}
} else {
/* sync offset point is not within this process()
cycle, so just generate silence. and don't bother
with any fancy stuff here, just the minimal silence.
*/
g_atomic_int_inc (&processing_prohibited);
no_roll (nframes, 0);
return true; // done
g_atomic_int_dec_and_test (&processing_prohibited);
if (Config->get_locate_while_waiting_for_sync()) {
if (micro_locate (nframes)) {
/* XXX ERROR !!! XXX */
}
}
return true; // done, nothing left to process
}
return false;

View file

@ -640,6 +640,25 @@ Session::start_locate (nframes_t target_frame, bool with_roll, bool with_flush,
}
}
int
Session::micro_locate (nframes_t distance)
{
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if (!(*i)->can_internal_playback_seek (distance)) {
return -1;
}
}
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
(*i)->internal_playback_seek (distance);
}
_transport_frame += distance;
return 0;
}
void
Session::locate (nframes_t target_frame, bool with_roll, bool with_flush, bool with_loop)
{

View file

@ -12,7 +12,7 @@ libclearlooks_files = [
Import ('env install_prefix')
clearlooks = env.Copy()
clearlooks = env.Clone()
clearlooks.Replace(CCFLAGS = ' `pkg-config --cflags gtk+-2.0` ',
LINKFLAGS = ' `pkg-config --libs gtk+-2.0` ')

View file

@ -8,7 +8,7 @@ import glob
fst_src = glob.glob('*.c')
Import('env install_prefix')
fst = env.Copy(CC="winegcc")
fst = env.Clone(CC="winegcc")
fst.Append (CPPPATH=".")
if fst['VST']:

View file

@ -9,7 +9,7 @@ glibmm2_files = glob.glob('glibmm/*.cc')
Import('env libraries install_prefix')
glibmm2 = env.Copy()
glibmm2 = env.Clone()
glibmm2.Merge([libraries['sigc2'], libraries['glib2']])
glibmm2.Append(CXXFLAGS='-DHAVE_CONFIG_H')

View file

@ -7,7 +7,7 @@ import glob
atkmm_files = glob.glob('atkmm/*.cc')
Import('env libraries install_prefix')
atkmm = env.Copy()
atkmm = env.Clone()
atkmm.Merge([libraries['glibmm2'], libraries['gtk2'], libraries['sigc2'] ])
libatkmm = atkmm.SharedLibrary('atkmm', atkmm_files)
Default(libatkmm)

View file

@ -7,7 +7,7 @@ import glob
gdkmm2_files = glob.glob('gdkmm/*.cc')
Import('env libraries install_prefix')
gdkmm2 = env.Copy()
gdkmm2 = env.Clone()
gdkmm2.Merge([libraries['glibmm2'], libraries['gtk2'], libraries['sigc2'], libraries['pangomm']])
gdkmm2.Append(CXXFLAGS="-Ilibs/gtkmm2/gtk")

View file

@ -7,7 +7,7 @@ import glob
gtkmm2_files = glob.glob('gtkmm/*.cc')
Import('env libraries install_prefix')
gtkmm2 = env.Copy()
gtkmm2 = env.Clone()
gtkmm2.Merge([libraries['glibmm2'], libraries['gtk2'], libraries['sigc2'], libraries['pangomm'], libraries['atkmm'], libraries['gdkmm2'] ])
if gtkmm2['IS_OSX']:

View file

@ -7,7 +7,7 @@ import glob
pangomm_files = glob.glob('pangomm/*.cc')
Import('env libraries install_prefix')
pangomm = env.Copy()
pangomm = env.Clone()
pangomm.Merge([libraries['glibmm2'], libraries['pango'], libraries['sigc2']])
if pangomm['IS_OSX']:

View file

@ -6,7 +6,7 @@ import glob
Import('env final_prefix install_prefix libraries i18n')
gtkmm2ext = env.Copy()
gtkmm2ext = env.Clone()
gtkmm2ext.Merge ([
libraries['sigc2'],
libraries['pbd'],

View file

@ -8,7 +8,7 @@ Import('env libraries install_prefix')
libglademm_files = glob.glob('libglademm/*.cc')
libglademm = env.Copy()
libglademm = env.Clone()
libglademm.Merge([libraries['gtk2'], libraries['glade2'], libraries['sigc2'], libraries['glibmm2'], libraries['pangomm'], libraries['atkmm'], libraries['gdkmm2'], libraries['gtkmm2']])
libglade = libglademm.SharedLibrary('libglademm', libglademm_files)

View file

@ -7,7 +7,7 @@ import glob
gnomecanvasmm_files = glob.glob('libgnomecanvasmm/*.cc')
Import('env libraries install_prefix')
gnomecanvasmm = env.Copy()
gnomecanvasmm = env.Clone()
gnomecanvasmm.Merge([libraries['glibmm2'],
libraries['gtk2'],
libraries['sigc2'],

View file

@ -21,6 +21,7 @@
#include <iostream>
#include <string>
#include <sstream>
#include <time.h>
#include <pbd/undo.h>
#include <pbd/xml++.h>
@ -34,6 +35,7 @@ using namespace sigc;
UndoTransaction::UndoTransaction ()
{
_clearing = false;
gettimeofday (&_timestamp, 0);
}
UndoTransaction::UndoTransaction (const UndoTransaction& rhs)

View file

@ -7,7 +7,7 @@ import glob
rubberband_files = glob.glob ('src/*.cpp')
Import('env install_prefix libraries')
rb = env.Copy()
rb = env.Clone()
rb.Merge ([libraries['fftw3f'],
libraries['fftw3'],

View file

@ -16,7 +16,7 @@ cpu_detect_x86_gcc.cpp
""")
Import('env install_prefix')
st = env.Copy()
st = env.Clone()
st.Append(CCFLAGS="-DHAVE_CONFIG_H -D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
libst = st.SharedLibrary('soundtouch', soundtouch_files)

View file

@ -6,7 +6,7 @@ import glob
Import('env final_prefix install_prefix final_config_prefix libraries i18n')
cp = env.Copy()
cp = env.Clone()
#
# this defines the version number of libardour_cp

View file

@ -6,7 +6,7 @@ import glob
Import('env final_prefix install_prefix final_config_prefix libraries i18n')
tranzport = env.Copy()
tranzport = env.Clone()
#
# this defines the version number of libardour_tranzport

View file

@ -6,7 +6,7 @@ import glob
Import('env final_prefix install_prefix final_config_prefix libraries i18n')
genericmidi = env.Copy()
genericmidi = env.Clone()
#
# this defines the version number of libardour_genericmidi

View file

@ -6,7 +6,7 @@ import glob
Import('env final_prefix install_prefix final_config_prefix libraries i18n')
mackie = env.Copy()
mackie = env.Clone()
#
# this defines the version number of libardour_mackie

View file

@ -6,7 +6,7 @@ import glob
Import('env final_prefix install_prefix final_config_prefix libraries i18n')
powermate = env.Copy()
powermate = env.Clone()
#
# this defines the version number of powermate

View file

@ -6,7 +6,7 @@ import glob
Import('env final_prefix install_prefix final_config_prefix libraries i18n')
tranzport = env.Copy()
tranzport = env.Clone()
#
# this defines the version number of libardour_tranzport

View file

@ -8,7 +8,7 @@ from stat import *
Import('env install_prefix final_prefix config_prefix subst_dict libraries')
ardour_vst = env.Copy()
ardour_vst = env.Clone()
sources = Split ("""
winmain.c