diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/coreaudiosource.h | 9 | ||||
-rw-r--r-- | libs/ardour/coreaudiosource.cc | 12 | ||||
-rw-r--r-- | libs/ardour/plugin_manager.cc | 2 | ||||
-rw-r--r-- | libs/ardour/route.cc | 8 | ||||
-rw-r--r-- | libs/ardour/wscript | 36 | ||||
-rw-r--r-- | libs/gtkmm2ext/barcontroller.cc | 2 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/barcontroller.h | 8 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h | 9 | ||||
-rw-r--r-- | libs/gtkmm2ext/wscript | 64 | ||||
-rw-r--r-- | libs/pbd/wscript | 4 | ||||
-rw-r--r-- | libs/surfaces/control_protocol/wscript | 1 | ||||
-rw-r--r-- | libs/surfaces/osc/wscript | 7 |
12 files changed, 94 insertions, 68 deletions
diff --git a/libs/ardour/ardour/coreaudiosource.h b/libs/ardour/ardour/coreaudiosource.h index 7e9f975d03..e8b22e5524 100644 --- a/libs/ardour/ardour/coreaudiosource.h +++ b/libs/ardour/ardour/coreaudiosource.h @@ -22,17 +22,20 @@ #include <appleutility/CAAudioFile.h> #include "ardour/audiofilesource.h" +#include <string> + +using namespace std; namespace ARDOUR { class CoreAudioSource : public AudioFileSource { public: CoreAudioSource (ARDOUR::Session&, const XMLNode&); - CoreAudioSource (ARDOUR::Session&, const string& path, int chn, Flag); + CoreAudioSource (ARDOUR::Session&, const string& path, bool, int chn, Flag); ~CoreAudioSource (); float sample_rate() const; - int update_header (nframes_t when, struct tm&, time_t); + int update_header (sframes_t when, struct tm&, time_t); int flush_header () {return 0;}; void set_header_timeline_position () {}; @@ -40,7 +43,7 @@ class CoreAudioSource : public AudioFileSource { static int get_soundfile_info (string path, SoundFileInfo& _info, string& error_msg); protected: - nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const; + nframes_t read_unlocked (Sample *dst, sframes_t start, nframes_t cnt) const; nframes_t write_unlocked (Sample *dst, nframes_t cnt) { return 0; } private: diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc index 95cae8c4ee..d9d1f01601 100644 --- a/libs/ardour/coreaudiosource.cc +++ b/libs/ardour/coreaudiosource.cc @@ -38,14 +38,16 @@ using namespace ARDOUR; using namespace PBD; CoreAudioSource::CoreAudioSource (Session& s, const XMLNode& node) - : AudioFileSource (s, node) + : Source (s, node), + AudioFileSource (s, node) { init (); } -CoreAudioSource::CoreAudioSource (Session& s, const string& path, int chn, Flag flags) +CoreAudioSource::CoreAudioSource (Session& s, const string& path, bool, int chn, Flag flags) /* files created this way are never writable or removable */ - : AudioFileSource (s, path, + : Source (s, DataType::AUDIO, path, Source::Flag (flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy))), + AudioFileSource (s, path, Source::Flag (flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy))) { _channel = chn; @@ -138,7 +140,7 @@ CoreAudioSource::safe_read (Sample* dst, nframes_t start, nframes_t cnt, AudioBu nframes_t -CoreAudioSource::read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const +CoreAudioSource::read_unlocked (Sample *dst, sframes_t start, nframes_t cnt) const { nframes_t file_cnt; AudioBufferList abl; @@ -217,7 +219,7 @@ CoreAudioSource::sample_rate() const } int -CoreAudioSource::update_header (nframes_t when, struct tm&, time_t) +CoreAudioSource::update_header (sframes_t when, struct tm&, time_t) { return 0; } diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index 44974a7199..bdc4d9e9b5 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -80,7 +80,7 @@ PluginManager::PluginManager () load_favorites (); -#ifdef GTKOSX +#ifdef HAVE_AUDIOUNITS ProcessSerialNumber psn = { 0, kCurrentProcess }; OSStatus returnCode = TransformProcessType(& psn, kProcessTransformToForegroundApplication); if( returnCode != 0) { diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index e1c85bf968..9895cf1e18 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -420,7 +420,12 @@ Route::process_output_buffers (BufferSet& bufs, if (rm.locked()) { for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - bufs.set_count (ChanCount::max(bufs.count(), (*i)->input_streams())); + if (bufs.count() != (*i)->input_streams()) { + cerr << _name << " bufs = " << bufs.count() + << " input = " << (*i)->input_streams() + << endl; + } + assert (bufs.count() == (*i)->input_streams()); (*i)->run (bufs, start_frame, end_frame, nframes); bufs.set_count (ChanCount::max(bufs.count(), (*i)->output_streams())); } @@ -1333,6 +1338,7 @@ Route::configure_processors_unlocked (ProcessorStreams* err) // We can, so configure everything list< pair<ChanCount,ChanCount> >::iterator c = configuration.begin(); for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p, ++c) { + cerr << _name << " Configure " << (*p)->name() << " for " << in << " + " << out << endl; (*p)->configure_io(c->first, c->second); processor_max_streams = ChanCount::max(processor_max_streams, c->first); processor_max_streams = ChanCount::max(processor_max_streams, c->second); diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 09c4e57149..0f64c32f54 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -210,19 +210,6 @@ def configure(conf): conf.check(header_name='sys/vfs.h', define_name='HAVE_SYS_VFS_H') conf.check(header_name='wordexp.h', define_name='HAVE_WORDEXP') - if conf.env['IS_OSX']: - conf.check_cc (header_name = '/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h', - linkflags = [ '-framework', 'CoreMIDI' ]) - - conf.check_cc (header_name = '/System/Library/Frameworks/AudioToolbox.framework/Headers/ExtendedAudioFile.h', - linkflags = [ '-framework', 'AudioToolbox' ]) - - conf.check_cc (header_name = '/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h', - define_name = 'HAVE_COREAUDIO') - - conf.check_cc (header_name = '/System/Library/Frameworks/AudioUnit.framework/Headers/AudioUnit.h', - define_name = 'HAVE_AUDIOUNITS', linkflags = [ '-framework', 'AudioUnit' ]) - conf.write_config_header('libardour-config.h') # Boost headers @@ -234,10 +221,10 @@ def build(bld): obj = bld.new_task_gen('cxx', 'shlib') obj.source = libardour_sources obj.export_incdirs = ['.'] - obj.includes = ['.', '../surfaces/control_protocol'] + obj.includes = ['.', '../surfaces/control_protocol', '..'] obj.name = 'libardour' obj.target = 'ardour' - obj.uselib = 'GLIBMM AUBIO SIGCPP XML UUID JACK SNDFILE SAMPLERATE LRDF' + obj.uselib = 'GLIBMM AUBIO SIGCPP XML UUID JACK SNDFILE SAMPLERATE LRDF OSX' obj.uselib_local = 'libpbd libmidipp libevoral libvamphost libvampplugin libtaglib librubberband' obj.vnum = LIBARDOUR_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') @@ -251,6 +238,14 @@ def build(bld): os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'] #obj.source += ' st_stretch.cc st_pitch.cc ' #obj.uselib += ' SOUNDTOUCH ' + #obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o' + + obj.env.append_value('LINKFLAGS', 'default/libs/surfaces/control_protocol/smpte_1.o') + # + # TODO: The above is an ugly hack that shouldn't be needed. We really need + # to refactor SMPTE out of libardour_cp to get rid of that circular dependency + # alltogether. + # if bld.env['HAVE_SLV2']: obj.source += [ 'lv2_plugin.cc', 'lv2_event_buffer.cc', 'uri_map.cc' ] obj.uselib += ' SLV2 ' @@ -259,14 +254,13 @@ def build(bld): obj.source += [ 'vst_plugin.cc', 'session_vst.cc' ] if bld.env['HAVE_COREAUDIO'] and bld.env['COREAUDIO']: - obj.sources += [ 'coreaudio.cc', 'caimportable.cc' ] + obj.source += [ 'coreaudiosource.cc', 'caimportable.cc' ] - if bld.env['HAVE_AUDIOUNITS'] and bld.env['AUDIOUNITS']: - obj.sources += [ 'audio_unit.cc' ] + if bld.env['HAVE_AUDIOUNITS'] or bld.env['HAVE_COREAUDIO']: + obj.uselib_local += ' libappleutility' - if bld.env['IS_OSX']: - # this avoids issues with circular dependencies between libardour and libardour_cp. - obj.linkflags += '-undefined suppress -flat_namespace' + if bld.env['HAVE_AUDIOUNITS'] and bld.env['AUDIOUNITS']: + obj.source += [ 'audio_unit.cc' ] if bld.env['FPU_OPTIMIZATION']: obj.source += [ 'sse_functions_xmm.cc' ] diff --git a/libs/gtkmm2ext/barcontroller.cc b/libs/gtkmm2ext/barcontroller.cc index 60ec7e1cd6..53d642ce23 100644 --- a/libs/gtkmm2ext/barcontroller.cc +++ b/libs/gtkmm2ext/barcontroller.cc @@ -369,7 +369,7 @@ BarController::expose (GdkEventExpose* /*event*/) } void -BarController::set_style (Style s) +BarController::set_style (barStyle s) { _style = s; darea.queue_draw (); diff --git a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h index 9c9c4c18b9..e5c01c7191 100644 --- a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h +++ b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h @@ -33,7 +33,7 @@ class BarController : public Gtk::Frame virtual ~BarController () {} - enum Style { + enum barStyle { LeftToRight, RightToLeft, Line, @@ -43,8 +43,8 @@ class BarController : public Gtk::Frame BottomToTop }; - Style style() const { return _style; } - void set_style (Style); + barStyle style() const { return _style; } + void set_style (barStyle); void set_use_parent (bool yn); void set_sensitive (bool yn); @@ -64,7 +64,7 @@ class BarController : public Gtk::Frame BindingProxy binding_proxy; Gtk::DrawingArea darea; Glib::RefPtr<Pango::Layout> layout; - Style _style; + barStyle _style; bool grabbed; bool switching; bool switch_on_release; diff --git a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h index 18c1e5cac0..4a1bbb9051 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h +++ b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h @@ -17,6 +17,13 @@ */ +#ifdef GTKOSX +#include <MacTypes.h> +#if defined(Style) +#undef style +#endif +#endif + #ifndef __gtkmm2ext_cell_renderer_pixbuf_toggle_h__ #define __gtkmm2ext_cell_renderer_pixbuf_toggle_h__ @@ -37,7 +44,7 @@ class CellRendererPixbufToggle : public Gtk::CellRenderer CellRendererPixbufToggle(); virtual ~CellRendererPixbufToggle(){}; - virtual void render_vfunc (const Glib::RefPtr<Gdk::Drawable>& window, Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, const Gdk::Rectangle& expose_area, Gtk::CellRendererState flags); + virtual void render_vfunc (const Glib::RefPtr<Gdk::Drawable>& window, Gtk::Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, const Gdk::Rectangle& expose_area, Gtk::CellRendererState flags); virtual void get_size_vfunc (Gtk::Widget& widget, const Gdk::Rectangle* cell_area, int* x_offset, int* y_offset, int* width, int* height) const; diff --git a/libs/gtkmm2ext/wscript b/libs/gtkmm2ext/wscript index 212a471989..7c8f4cda99 100644 --- a/libs/gtkmm2ext/wscript +++ b/libs/gtkmm2ext/wscript @@ -18,6 +18,34 @@ GTKMM2EXT_LIB_VERSION = '0.8.3' APPNAME = 'gtkmm2ext' VERSION = GTKMM2EXT_VERSION +gtkmm2ext_sources = [ + 'auto_spin.cc', + 'barcontroller.cc', + 'binding_proxy.cc', + 'cell_renderer_pixbuf_toggle.cc', + 'choice.cc', + 'click_box.cc', + 'dndtreeview.cc', + 'fastmeter.cc', + 'focus_entry.cc', + 'grouped_buttons.cc', + 'gtk_ui.cc', + 'idle_adjustment.cc', + 'pixfader.cc', + 'pixscroller.cc', + 'popup.cc', + 'prompter.cc', + 'scroomer.cc', + 'selector.cc', + 'slider_controller.cc', + 'stateful_button.cc', + 'tearoff.cc', + 'textviewer.cc', + 'utils.cc', + 'version.cc', + 'window_title.cc' +] + # Mandatory variables srcdir = '.' blddir = 'build' @@ -33,41 +61,17 @@ def configure(conf): autowaf.configure(conf) conf.check_tool('compiler_cxx') autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', atleast_version='2.8') + autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK', atleast_version='2.12.1') + def build(bld): - obj = bld.new_task_gen('cxx', 'shlib') - obj.source = ''' - auto_spin.cc - barcontroller.cc - binding_proxy.cc - cell_renderer_pixbuf_toggle.cc - choice.cc - click_box.cc - dndtreeview.cc - fastmeter.cc - focus_entry.cc - grouped_buttons.cc - gtk_ui.cc - idle_adjustment.cc - pixfader.cc - pixscroller.cc - popup.cc - prompter.cc - scroomer.cc - selector.cc - slider_controller.cc - stateful_button.cc - tearoff.cc - textviewer.cc - utils.cc - version.cc - window_title.cc - ''' + obj = bld.new_task_gen(features = 'cc cxx cshlib') + obj.source = gtkmm2ext_sources obj.export_incdirs = ['.'] obj.includes = ['.'] obj.name = 'libgtkmm2ext' obj.target = 'gtkmm2ext' - obj.uselib = 'GTKMM' + obj.uselib = 'GTKMM GTK GTKOSX OSX GDK' obj.uselib_local = 'libpbd' obj.vnum = GTKMM2EXT_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') @@ -75,6 +79,8 @@ def build(bld): '-DPACKAGE="libgtkmm2ext"', '-DLOCALEDIR="' + os.path.join( os.path.normpath(bld.env['DATADIRNAME']), 'locale') + '"'] + if bld.env['GTKOSX']: + obj.source += ['sync-menu.c'] def shutdown(): autowaf.shutdown() diff --git a/libs/pbd/wscript b/libs/pbd/wscript index c06cd31503..be65a84ac1 100644 --- a/libs/pbd/wscript +++ b/libs/pbd/wscript @@ -1,6 +1,7 @@ #!/usr/bin/env python import autowaf import os +import sys # Version of this package (even if built as a child) MAJOR = '4' @@ -34,7 +35,8 @@ def configure(conf): conf.check_tool('compiler_cxx') autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML') autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0') - autowaf.check_pkg(conf, 'uuid', uselib_store='UUID') + if sys.platform != 'darwin': + autowaf.check_pkg(conf, 'uuid', uselib_store='UUID') conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT') conf.check(header_name='execinfo.h', define_name='HAVE_EXECINFO') diff --git a/libs/surfaces/control_protocol/wscript b/libs/surfaces/control_protocol/wscript index e8354e58d4..b118ca5726 100644 --- a/libs/surfaces/control_protocol/wscript +++ b/libs/surfaces/control_protocol/wscript @@ -6,6 +6,7 @@ import os # major increment <=> incompatible changes # minor increment <=> compatible changes (additions) # micro increment <=> no interface changes +APPNAME = 'libardour_cp' LIBARDOUR_CP_LIB_VERSION = '4.1.0' # Mandatory variables diff --git a/libs/surfaces/osc/wscript b/libs/surfaces/osc/wscript index d254d00313..4e1e87d7f5 100644 --- a/libs/surfaces/osc/wscript +++ b/libs/surfaces/osc/wscript @@ -17,7 +17,12 @@ def set_options(opt): def configure(conf): autowaf.configure(conf) - autowaf.check_pkg(conf, 'liblo', uselib_store='LO') + autowaf.check_pkg(conf, 'liblo', uselib_store='LO', linkflags='-llo') + conf.env.append_value('LINKFLAGS_LO', '-llo') + # + # TODO: Again this append_value shouldn't be necessary really + # but for some reason the link flag is not being added otherwise. + # def build(bld): obj = bld.new_task_gen('cxx', 'shlib') |