From aa45017cdca5d2429f503c660dad41f486a4fa05 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 10 Jan 2008 14:40:42 +0000 Subject: [PATCH] finish merge of vamp-sdk into source tree; write OSC URL to file in ~/.ardour2 ; change stretch button name; fix bad handling of cancel-in-progress during stretch/pitch operation git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2870 d708f5d6-7413-0410-9779-e7cbd77b26cf --- SConstruct | 43 ++++++++++-------------------------- gtk2_ardour/editor_timefx.cc | 4 ++-- libs/ardour/ardour/osc.h | 1 + libs/ardour/osc.cc | 17 ++++++++++++++ 4 files changed, 32 insertions(+), 33 deletions(-) diff --git a/SConstruct b/SConstruct index eab259fd41..58e498d905 100644 --- a/SConstruct +++ b/SConstruct @@ -767,34 +767,14 @@ def prep_libcheck(topenv, libinfo): prep_libcheck(env, env) -# -# check for VAMP and rubberband (currently optional) -# - -libraries['vamp'] = LibraryInfo() - -env['RUBBERBAND'] = False - -conf = env.Configure (custom_tests = { 'CheckPKGExists' : CheckPKGExists } ) - -if conf.CheckPKGExists('vamp-sdk'): - have_vamp = True - libraries['vamp'].ParseConfig('pkg-config --cflags --libs vamp-sdk') -else: - have_vamp = False - -libraries['vamp'] = conf.Finish () - -if have_vamp: - if os.path.exists ('libs/rubberband/src'): - conf = Configure (libraries['vamp']) - if conf.CheckHeader ('fftw3.h'): - env['RUBBERBAND'] = True - libraries['rubberband'] = LibraryInfo (LIBS='rubberband', - LIBPATH='#libs/rubberband', - CPPPATH='#libs/rubberband', - CCFLAGS='-DUSE_RUBBERBAND') - libraries['vamp'] = conf.Finish () +env['RUBBERBAND'] = True +libraries['rubberband'] = LibraryInfo (LIBS='rubberband', + LIBPATH='#libs/rubberband', + CPPPATH='#libs/rubberband', + CCFLAGS='-DUSE_RUBBERBAND') +libraries['vamp'] = LibraryInfo (LIBS='vampsdk', + LIBPATH='#libs/vamp-sdk', + CPPPATH='#libs/vamp-sdk/vamp') # # Check for libusb @@ -981,6 +961,7 @@ if env['SYSLIBS']: 'libs/pbd', 'libs/midi++2', 'libs/ardour', + 'libs/vamp-sdk', # these are unconditionally included but have # tests internally to avoid compilation etc # if VST is not set @@ -1045,6 +1026,7 @@ else: 'libs/pbd', 'libs/midi++2', 'libs/ardour', + 'libs/vamp-sdk', # these are unconditionally included but have # tests internally to avoid compilation etc # if VST is not set @@ -1107,9 +1089,8 @@ else: # timefx_subdirs = ['libs/soundtouch'] -if env['RUBBERBAND']: - timefx_subdirs += ['libs/rubberband'] - +timefx_subdirs += ['libs/rubberband'] + opts.Save('scache.conf', env) Help(opts.GenerateHelpText(env)) diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc index d00c7a1e05..5b2b750746 100644 --- a/gtk2_ardour/editor_timefx.cc +++ b/gtk2_ardour/editor_timefx.cc @@ -71,7 +71,7 @@ Editor::TimeFXDialog::TimeFXDialog (Editor& e, bool pitch) quick_button (_("Quick but Ugly")), antialias_button (_("Skip Anti-aliasing")), stretch_opts_label (_("Contents:")), - precise_button (_("Correct Onset")) + precise_button (_("Strict Linear")) { set_modal (true); set_position (Gtk::WIN_POS_MOUSE); @@ -332,7 +332,7 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching) sigc::connection c = Glib::signal_timeout().connect (mem_fun (current_timefx, &TimeFXDialog::update_progress), 100); - while (!current_timefx->request.done) { + while (!current_timefx->request.done && !current_timefx->request.cancel) { gtk_main_iteration (); } diff --git a/libs/ardour/ardour/osc.h b/libs/ardour/ardour/osc.h index ca2f4488dd..3f1ce03445 100644 --- a/libs/ardour/ardour/osc.h +++ b/libs/ardour/ardour/osc.h @@ -54,6 +54,7 @@ class OSC : public BasicUI, public sigc::trackable lo_server _osc_server; lo_server _osc_unix_server; std::string _osc_unix_socket_path; + std::string _osc_url_file; pthread_t _osc_thread; int _request_pipe[2]; diff --git a/libs/ardour/osc.cc b/libs/ardour/osc.cc index a7d4e32db5..e2ad9a2951 100644 --- a/libs/ardour/osc.cc +++ b/libs/ardour/osc.cc @@ -18,6 +18,7 @@ */ #include +#include #include #include #include @@ -101,6 +102,19 @@ OSC::start () #endif cerr << "OSC @ " << get_server_url () << endl; + + _osc_url_file = get_user_ardour_path () + "/osc_url"; + ofstream urlfile; + urlfile.open(_osc_url_file.c_str(),ios::trunc); + if ( urlfile ) + { + urlfile << get_server_url () << endl; + urlfile.close(); + } + else + { + cerr << "Couldn't write '" << _osc_url_file << "'" <