diff options
Diffstat (limited to 'libs/ardour/ardour')
220 files changed, 1221 insertions, 616 deletions
diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h index e21cf62d62..f6a15666e9 100644 --- a/libs/ardour/ardour/amp.h +++ b/libs/ardour/ardour/amp.h @@ -19,6 +19,7 @@ #ifndef __ardour_amp_h__ #define __ardour_amp_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/chan_count.h" #include "ardour/processor.h" @@ -32,7 +33,7 @@ class IO; /** Applies a declick operation to all audio inputs, passing the same number of * audio outputs, and passing through any other types unchanged. */ -class Amp : public Processor { +class LIBARDOUR_API Amp : public Processor { public: Amp(Session& s); diff --git a/libs/ardour/ardour/analyser.h b/libs/ardour/ardour/analyser.h index 51adea67b9..cef71186cc 100644 --- a/libs/ardour/ardour/analyser.h +++ b/libs/ardour/ardour/analyser.h @@ -23,13 +23,15 @@ #include <glibmm/threads.h> #include <boost/shared_ptr.hpp> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class AudioFileSource; class Source; class TransientDetector; -class Analyser { +class LIBARDOUR_API Analyser { public: Analyser(); diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h index 80bdf9d80e..9b1351a3fc 100644 --- a/libs/ardour/ardour/ardour.h +++ b/libs/ardour/ardour/ardour.h @@ -34,7 +34,9 @@ #include "pbd/locale_guard.h" #include "pbd/stateful.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" +#include "ardour/libardour_visibility.h" #include <jack/jack.h> @@ -47,8 +49,8 @@ namespace ARDOUR { class AudioEngine; - extern PBD::Signal1<void,std::string> BootMessage; - extern PBD::Signal0<void> GUIIdle; + extern LIBARDOUR_API PBD::Signal1<void,std::string> BootMessage; + extern LIBARDOUR_API PBD::Signal0<void> GUIIdle; /** * @param with_vst true to enable VST Support @@ -58,27 +60,27 @@ namespace ARDOUR { * * @return true if Ardour library was successfully initialized */ - bool init (bool with_vst, bool try_optimization, const char* localedir); - void init_post_engine (); - void cleanup (); - bool no_auto_connect (); - void make_property_quarks (); + LIBARDOUR_API bool init (bool with_vst, bool try_optimization, const char* localedir); + LIBARDOUR_API void init_post_engine (); + LIBARDOUR_API void cleanup (); + LIBARDOUR_API bool no_auto_connect (); + LIBARDOUR_API void make_property_quarks (); - extern PBD::PropertyChange bounds_change; + extern LIBARDOUR_API PBD::PropertyChange bounds_change; + + extern LIBARDOUR_API const char* const ardour_config_info; - extern const char* const ardour_config_info; - - void find_bindings_files (std::map<std::string,std::string>&); + LIBARDOUR_API void find_bindings_files (std::map<std::string,std::string>&); /* these only impact bundled installations */ - std::string translation_enable_path (); - bool translations_are_enabled (); - bool set_translations_enabled (bool); + LIBARDOUR_API std::string translation_enable_path (); + LIBARDOUR_API bool translations_are_enabled (); + LIBARDOUR_API bool set_translations_enabled (bool); - microseconds_t get_microseconds (); + LIBARDOUR_API microseconds_t get_microseconds (); - void setup_fpu (); - std::vector<SyncSource> get_available_sync_options(); + LIBARDOUR_API void setup_fpu (); + LIBARDOUR_API std::vector<SyncSource> get_available_sync_options(); } #endif /* __ardour_ardour_h__ */ diff --git a/libs/ardour/ardour/async_midi_port.h b/libs/ardour/ardour/async_midi_port.h index 76bdac0409..c5babf6135 100644 --- a/libs/ardour/ardour/async_midi_port.h +++ b/libs/ardour/ardour/async_midi_port.h @@ -34,11 +34,12 @@ #include "midi++/parser.h" #include "midi++/port.h" +#include "ardour/libardour_visibility.h" #include "ardour/midi_port.h" namespace ARDOUR { - class AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port { +class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port { public: AsyncMIDIPort (std::string const &, PortFlags); @@ -52,10 +53,16 @@ namespace ARDOUR { /* called from non-RT context */ void parse (framecnt_t timestamp); - int write (const MIDI::byte *msg, size_t msglen, MIDI::timestamp_t timestamp); + int write (const MIDI::byte *msg, size_t msglen, MIDI::timestamp_t timestamp); int read (MIDI::byte *buf, size_t bufsize); void drain (int check_interval_usecs); - int selectable () const { return xthread.selectable(); } + int selectable () const { +#ifdef PLATFORM_WINDOWS + return false; +#else + return xthread.selectable(); +#endif + } static void set_process_thread (pthread_t); static pthread_t get_process_thread () { return _process_thread; } @@ -66,8 +73,22 @@ namespace ARDOUR { MIDI::timestamp_t _last_write_timestamp; RingBuffer< Evoral::Event<double> > output_fifo; Evoral::EventRingBuffer<MIDI::timestamp_t> input_fifo; - Glib::Threads::Mutex output_fifo_lock; - CrossThreadChannel xthread; + Glib::Threads::Mutex output_fifo_lock; +#ifndef PLATFORM_WINDOWS + CrossThreadChannel xthread; +#endif + + int create_port (); + + /** Channel used to signal to the MidiControlUI that input has arrived */ + + std::string _connections; + PBD::ScopedConnection connect_connection; + PBD::ScopedConnection halt_connection; + void flush (void* jack_port_buffer); + void jack_halted (); + void make_connections (); + void init (std::string const &, Flags); void flush_output_fifo (pframes_t); diff --git a/libs/ardour/ardour/audio_backend.h b/libs/ardour/ardour/audio_backend.h index 387410685b..cdfd4971c8 100644 --- a/libs/ardour/ardour/audio_backend.h +++ b/libs/ardour/ardour/audio_backend.h @@ -28,21 +28,21 @@ #include <boost/function.hpp> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/audioengine.h" #include "ardour/port_engine.h" -#include "ardour/visibility.h" #ifdef ARDOURBACKEND_DLL_EXPORTS // defined if we are building the ARDOUR Panners DLLs (instead of using them) - #define ARDOURBACKEND_API LIBARDOUR_HELPER_DLL_EXPORT + #define ARDOURBACKEND_API LIBARDOUR_DLL_EXPORT #else - #define ARDOURBACKEND_API LIBARDOUR_HELPER_DLL_IMPORT + #define ARDOURBACKEND_API LIBARDOUR_DLL_IMPORT #endif -#define ARDOURBACKEND_LOCAL LIBARDOUR_HELPER_DLL_LOCAL +#define ARDOURBACKEND_LOCAL LIBARDOUR_DLL_LOCAL namespace ARDOUR { -class AudioBackend : public PortEngine { +class LIBARDOUR_API AudioBackend : public PortEngine { public: AudioBackend (AudioEngine& e) : PortEngine (e), engine (e) {} @@ -491,7 +491,7 @@ class AudioBackend : public PortEngine { virtual int _start (bool for_latency_measurement) = 0; }; -struct AudioBackendInfo { +struct LIBARDOUR_API AudioBackendInfo { const char* name; /** Using arg1 and arg2, initialize this audiobackend. diff --git a/libs/ardour/ardour/audio_buffer.h b/libs/ardour/ardour/audio_buffer.h index c356ed82b9..a32e679b69 100644 --- a/libs/ardour/ardour/audio_buffer.h +++ b/libs/ardour/ardour/audio_buffer.h @@ -27,7 +27,7 @@ namespace ARDOUR { /** Buffer containing audio data. */ -class AudioBuffer : public Buffer +class LIBARDOUR_API AudioBuffer : public Buffer { public: AudioBuffer(size_t capacity); diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h index 3a5dc2ad91..c0b78bad13 100644 --- a/libs/ardour/ardour/audio_diskstream.h +++ b/libs/ardour/ardour/audio_diskstream.h @@ -53,7 +53,7 @@ class AudioPlaylist; class AudioFileSource; class IO; -class AudioDiskstream : public Diskstream +class LIBARDOUR_API AudioDiskstream : public Diskstream { public: AudioDiskstream (Session &, const std::string& name, Diskstream::Flag f = Recordable); diff --git a/libs/ardour/ardour/audio_library.h b/libs/ardour/ardour/audio_library.h index 2009ec39a7..6397821720 100644 --- a/libs/ardour/ardour/audio_library.h +++ b/libs/ardour/ardour/audio_library.h @@ -24,9 +24,11 @@ #include <map> #include <vector> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class AudioLibrary +class LIBARDOUR_API AudioLibrary { public: AudioLibrary (); @@ -43,7 +45,7 @@ class AudioLibrary std::string src; }; -extern AudioLibrary* Library; +LIBARDOUR_API extern AudioLibrary* Library; } // ARDOUR namespace diff --git a/libs/ardour/ardour/audio_playlist_importer.h b/libs/ardour/ardour/audio_playlist_importer.h index 011bfe39b8..a6d68b9c73 100644 --- a/libs/ardour/ardour/audio_playlist_importer.h +++ b/libs/ardour/ardour/audio_playlist_importer.h @@ -38,7 +38,7 @@ class AudioRegionImporter; class AudioPlaylistImporter; class Session; -class AudioPlaylistImportHandler : public ElementImportHandler +class LIBARDOUR_API AudioPlaylistImportHandler : public ElementImportHandler { public: typedef boost::shared_ptr<AudioPlaylistImporter> PlaylistPtr; @@ -57,7 +57,7 @@ class AudioPlaylistImportHandler : public ElementImportHandler AudioRegionImportHandler & region_handler; }; -class UnusedAudioPlaylistImportHandler : public AudioPlaylistImportHandler +class LIBARDOUR_API UnusedAudioPlaylistImportHandler : public AudioPlaylistImportHandler { public: UnusedAudioPlaylistImportHandler (XMLTree const & source, Session & session, AudioRegionImportHandler & region_handler) : @@ -65,7 +65,7 @@ class UnusedAudioPlaylistImportHandler : public AudioPlaylistImportHandler std::string get_info () const; }; -class AudioPlaylistImporter : public ElementImporter +class LIBARDOUR_API AudioPlaylistImporter : public ElementImporter { public: AudioPlaylistImporter (XMLTree const & source, Session & session, AudioPlaylistImportHandler & handler, XMLNode const & node); diff --git a/libs/ardour/ardour/audio_playlist_source.h b/libs/ardour/ardour/audio_playlist_source.h index c2e1e87f75..6a586fc30d 100644 --- a/libs/ardour/ardour/audio_playlist_source.h +++ b/libs/ardour/ardour/audio_playlist_source.h @@ -32,7 +32,7 @@ namespace ARDOUR { class AudioPlaylist; -class AudioPlaylistSource : public PlaylistSource, public AudioSource { +class LIBARDOUR_API AudioPlaylistSource : public PlaylistSource, public AudioSource { public: virtual ~AudioPlaylistSource (); diff --git a/libs/ardour/ardour/audio_port.h b/libs/ardour/ardour/audio_port.h index f87b134e9e..ca5f183a13 100644 --- a/libs/ardour/ardour/audio_port.h +++ b/libs/ardour/ardour/audio_port.h @@ -26,7 +26,7 @@ namespace ARDOUR { -class AudioPort : public Port +class LIBARDOUR_API AudioPort : public Port { public: ~AudioPort (); diff --git a/libs/ardour/ardour/audio_region_importer.h b/libs/ardour/ardour/audio_region_importer.h index b3bcb05668..d1a965a5ee 100644 --- a/libs/ardour/ardour/audio_region_importer.h +++ b/libs/ardour/ardour/audio_region_importer.h @@ -39,7 +39,7 @@ class Region; class Session; class Source; -class AudioRegionImportHandler : public ElementImportHandler +class LIBARDOUR_API AudioRegionImportHandler : public ElementImportHandler { public: // Inerface implementation @@ -69,7 +69,7 @@ class AudioRegionImportHandler : public ElementImportHandler IdMap id_map; }; -class AudioRegionImporter : public ElementImporter +class LIBARDOUR_API AudioRegionImporter : public ElementImporter { public: AudioRegionImporter (XMLTree const & source, Session & session, AudioRegionImportHandler & handler, XMLNode const & node); diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h index ada58e8ebe..1ecec88f89 100644 --- a/libs/ardour/ardour/audio_track.h +++ b/libs/ardour/ardour/audio_track.h @@ -31,7 +31,7 @@ class AudioPlaylist; class RouteGroup; class AudioFileSource; -class AudioTrack : public Track +class LIBARDOUR_API AudioTrack : public Track { public: AudioTrack (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal); diff --git a/libs/ardour/ardour/audio_track_importer.h b/libs/ardour/ardour/audio_track_importer.h index 683417de24..58789177e3 100644 --- a/libs/ardour/ardour/audio_track_importer.h +++ b/libs/ardour/ardour/audio_track_importer.h @@ -34,7 +34,7 @@ namespace ARDOUR { class AudioPlaylistImportHandler; class AudioPlaylistImporter; -class AudioTrackImportHandler : public ElementImportHandler +class LIBARDOUR_API AudioTrackImportHandler : public ElementImportHandler { public: AudioTrackImportHandler (XMLTree const & source, Session & session, AudioPlaylistImportHandler & pl_handler); @@ -46,7 +46,7 @@ class AudioTrackImportHandler : public ElementImportHandler }; -class AudioTrackImporter : public ElementImporter +class LIBARDOUR_API AudioTrackImporter : public ElementImporter { public: AudioTrackImporter (XMLTree const & source, diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h index 007390b34a..07f41f5526 100644 --- a/libs/ardour/ardour/audio_unit.h +++ b/libs/ardour/ardour/audio_unit.h @@ -41,14 +41,14 @@ class CAComponent; class CAAudioUnit; class CAComponentDescription; -struct AudioBufferList; +struct LIBARDOUR_API AudioBufferList; namespace ARDOUR { class AudioEngine; class Session; -struct AUParameterDescriptor : public Plugin::ParameterDescriptor { +struct LIBARDOUR_API AUParameterDescriptor : public Plugin::ParameterDescriptor { // additional fields to make operations more efficient AudioUnitParameterID id; AudioUnitScope scope; @@ -58,7 +58,7 @@ struct AUParameterDescriptor : public Plugin::ParameterDescriptor { AudioUnitParameterUnit unit; }; -class AUPlugin : public ARDOUR::Plugin +class LIBARDOUR_API AUPlugin : public ARDOUR::Plugin { public: AUPlugin (AudioEngine& engine, Session& session, boost::shared_ptr<CAComponent> comp); @@ -221,11 +221,11 @@ class AUPlugin : public ARDOUR::Plugin typedef boost::shared_ptr<AUPlugin> AUPluginPtr; -struct AUPluginCachedInfo { +struct LIBARDOUR_API AUPluginCachedInfo { std::vector<std::pair<int,int> > io_configs; }; -class AUPluginInfo : public PluginInfo { +class LIBARDOUR_API AUPluginInfo : public PluginInfo { public: AUPluginInfo (boost::shared_ptr<CAComponentDescription>); ~AUPluginInfo (); diff --git a/libs/ardour/ardour/audioanalyser.h b/libs/ardour/ardour/audioanalyser.h index f525cbd99f..6a9738eb5a 100644 --- a/libs/ardour/ardour/audioanalyser.h +++ b/libs/ardour/ardour/audioanalyser.h @@ -25,7 +25,8 @@ #include <ostream> #include <fstream> #include <boost/utility.hpp> -#include <vamp-sdk/Plugin.h> +#include "vamp-sdk/Plugin.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -33,7 +34,7 @@ namespace ARDOUR { class Readable; class Session; -class AudioAnalyser : public boost::noncopyable { +class LIBARDOUR_API AudioAnalyser : public boost::noncopyable { public: typedef Vamp::Plugin AnalysisPlugin; diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h index 09f2ac04f8..75954e6ca9 100644 --- a/libs/ardour/ardour/audioengine.h +++ b/libs/ardour/ardour/audioengine.h @@ -39,6 +39,7 @@ #include "ardour/ardour.h" #include "ardour/data_type.h" #include "ardour/session_handle.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/chan_count.h" #include "ardour/port_manager.h" @@ -59,7 +60,7 @@ class ProcessThread; class AudioBackend; class AudioBackendInfo; -class AudioEngine : public SessionHandlePtr, public PortManager +class LIBARDOUR_API AudioEngine : public SessionHandlePtr, public PortManager { public: diff --git a/libs/ardour/ardour/audiofile_tagger.h b/libs/ardour/ardour/audiofile_tagger.h index 656626a5f3..88789f9036 100644 --- a/libs/ardour/ardour/audiofile_tagger.h +++ b/libs/ardour/ardour/audiofile_tagger.h @@ -27,13 +27,15 @@ #include <taglib/taglib.h> #include <taglib/xiphcomment.h> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class SessionMetadata; /// Class with static functions for tagging audiofiles -class AudiofileTagger +class LIBARDOUR_API AudiofileTagger { public: diff --git a/libs/ardour/ardour/audiofilesource.h b/libs/ardour/ardour/audiofilesource.h index c5fd7b3af2..53819c1c9e 100644 --- a/libs/ardour/ardour/audiofilesource.h +++ b/libs/ardour/ardour/audiofilesource.h @@ -27,7 +27,7 @@ namespace ARDOUR { -struct SoundFileInfo { +struct LIBARDOUR_API SoundFileInfo { float samplerate; uint16_t channels; int64_t length; @@ -35,7 +35,7 @@ struct SoundFileInfo { int64_t timecode; }; -class AudioFileSource : public AudioSource, public FileSource { +class LIBARDOUR_API AudioFileSource : public AudioSource, public FileSource { public: virtual ~AudioFileSource (); @@ -64,6 +64,7 @@ public: virtual void clear_capture_marks() {} virtual bool one_of_several_channels () const { return false; } + virtual void flush () = 0; virtual int update_header (framepos_t when, struct tm&, time_t) = 0; virtual int flush_header () = 0; diff --git a/libs/ardour/ardour/audioplaylist.h b/libs/ardour/ardour/audioplaylist.h index 478d4872cd..c4196dc3b6 100644 --- a/libs/ardour/ardour/audioplaylist.h +++ b/libs/ardour/ardour/audioplaylist.h @@ -29,13 +29,11 @@ namespace ARDOUR { class Session; -class Region; class AudioRegion; class Source; - class AudioPlaylist; -class AudioPlaylist : public ARDOUR::Playlist +class LIBARDOUR_API AudioPlaylist : public ARDOUR::Playlist { public: AudioPlaylist (Session&, const XMLNode&, bool hidden = false); diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h index 83cd227bce..c3e9eec1f9 100644 --- a/libs/ardour/ardour/audioregion.h +++ b/libs/ardour/ardour/audioregion.h @@ -40,17 +40,17 @@ class PlaylistReadTest; namespace ARDOUR { namespace Properties { - extern PBD::PropertyDescriptor<bool> envelope_active; - extern PBD::PropertyDescriptor<bool> default_fade_in; - extern PBD::PropertyDescriptor<bool> default_fade_out; - extern PBD::PropertyDescriptor<bool> fade_in_active; - extern PBD::PropertyDescriptor<bool> fade_out_active; - extern PBD::PropertyDescriptor<float> scale_amplitude; - extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > fade_in; - extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > inverse_fade_in; - extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > fade_out; - extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > inverse_fade_out; - extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > envelope; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> envelope_active; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> default_fade_in; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> default_fade_out; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> fade_in_active; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> fade_out_active; + LIBARDOUR_API extern PBD::PropertyDescriptor<float> scale_amplitude; + LIBARDOUR_API extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > fade_in; + LIBARDOUR_API extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > inverse_fade_in; + LIBARDOUR_API extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > fade_out; + LIBARDOUR_API extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > inverse_fade_out; + LIBARDOUR_API extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > envelope; } class Playlist; @@ -59,7 +59,7 @@ class Filter; class AudioSource; -class AudioRegion : public Region +class LIBARDOUR_API AudioRegion : public Region { public: static void make_property_quarks (); @@ -94,7 +94,7 @@ class AudioRegion : public Region virtual framecnt_t read_peaks (PeakData *buf, framecnt_t npeaks, framecnt_t offset, framecnt_t cnt, - uint32_t chan_n=0, double samples_per_unit= 1.0) const; + uint32_t chan_n=0, double frames_per_pixel = 1.0) const; /* Readable interface */ @@ -238,9 +238,9 @@ class AudioRegion : public Region /* access from C objects */ extern "C" { - int region_read_peaks_from_c (void *arg, uint32_t npeaks, uint32_t start, uint32_t length, intptr_t data, uint32_t n_chan, double samples_per_unit); - uint32_t region_length_from_c (void *arg); - uint32_t sourcefile_length_from_c (void *arg, double); + LIBARDOUR_API int region_read_peaks_from_c (void *arg, uint32_t npeaks, uint32_t start, uint32_t length, intptr_t data, uint32_t n_chan, double samples_per_unit); + LIBARDOUR_API uint32_t region_length_from_c (void *arg); + LIBARDOUR_API uint32_t sourcefile_length_from_c (void *arg, double); } #endif /* __ardour_audio_region_h__ */ diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index d5c85a6bf8..910e03170d 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -38,7 +38,7 @@ namespace ARDOUR { -class AudioSource : virtual public Source, +class LIBARDOUR_API AudioSource : virtual public Source, public ARDOUR::Readable, public boost::enable_shared_from_this<ARDOUR::AudioSource> { diff --git a/libs/ardour/ardour/auditioner.h b/libs/ardour/ardour/auditioner.h index e73824b669..94d4eab479 100644 --- a/libs/ardour/ardour/auditioner.h +++ b/libs/ardour/ardour/auditioner.h @@ -37,7 +37,7 @@ class Session; class AudioRegion; class AudioPlaylist; -class Auditioner : public Track +class LIBARDOUR_API Auditioner : public Track { public: Auditioner (Session&); diff --git a/libs/ardour/ardour/auto_bundle.h b/libs/ardour/ardour/auto_bundle.h index d97080c089..703aa8e73d 100644 --- a/libs/ardour/ardour/auto_bundle.h +++ b/libs/ardour/ardour/auto_bundle.h @@ -26,7 +26,7 @@ namespace ARDOUR { -class AutoBundle : public Bundle { +class LIBARDOUR_API AutoBundle : public Bundle { public: AutoBundle (bool i = true); diff --git a/libs/ardour/ardour/automatable.h b/libs/ardour/ardour/automatable.h index b10b8eb2bc..11fb48904c 100644 --- a/libs/ardour/ardour/automatable.h +++ b/libs/ardour/ardour/automatable.h @@ -26,6 +26,7 @@ #include <boost/shared_ptr.hpp> #include "pbd/signals.h" #include "evoral/ControlSet.hpp" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" class XMLNode; @@ -38,7 +39,7 @@ class AutomationControl; /* The inherited ControlSet is virtual because AutomatableSequence inherits * from this AND EvoralSequence, which is also a ControlSet */ -class Automatable : virtual public Evoral::ControlSet +class LIBARDOUR_API Automatable : virtual public Evoral::ControlSet { public: Automatable(Session&); diff --git a/libs/ardour/ardour/automatable_sequence.h b/libs/ardour/ardour/automatable_sequence.h index 730ea33a7c..b0003189a4 100644 --- a/libs/ardour/ardour/automatable_sequence.h +++ b/libs/ardour/ardour/automatable_sequence.h @@ -27,7 +27,7 @@ namespace ARDOUR { /** Contains notes and controllers */ template<typename T> -class AutomatableSequence : public Automatable, public Evoral::Sequence<T> { +class /*LIBARDOUR_API*/ AutomatableSequence : public Automatable, public Evoral::Sequence<T> { public: AutomatableSequence(Session& s) : Evoral::ControlSet() diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index 10194b3f9b..aeee9dab30 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -26,6 +26,8 @@ #include "pbd/controllable.h" #include "evoral/Control.hpp" + +#include "ardour/libardour_visibility.h" #include "ardour/automation_list.h" namespace ARDOUR { @@ -36,7 +38,7 @@ class Automatable; /** A PBD::Controllable with associated automation data (AutomationList) */ -class AutomationControl : public PBD::Controllable, public Evoral::Control, public boost::enable_shared_from_this<AutomationControl> +class LIBARDOUR_API AutomationControl : public PBD::Controllable, public Evoral::Control, public boost::enable_shared_from_this<AutomationControl> { public: AutomationControl(ARDOUR::Session&, diff --git a/libs/ardour/ardour/automation_list.h b/libs/ardour/ardour/automation_list.h index 71eddda6dd..6e7b0007cd 100644 --- a/libs/ardour/ardour/automation_list.h +++ b/libs/ardour/ardour/automation_list.h @@ -40,7 +40,7 @@ namespace ARDOUR { class AutomationList; /** A SharedStatefulProperty for AutomationLists */ -class AutomationListProperty : public PBD::SharedStatefulProperty<AutomationList> +class LIBARDOUR_API AutomationListProperty : public PBD::SharedStatefulProperty<AutomationList> { public: AutomationListProperty (PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > d, Ptr p) @@ -59,7 +59,7 @@ private: AutomationListProperty& operator= (AutomationListProperty const &); }; -class AutomationList : public PBD::StatefulDestructible, public Evoral::ControlList +class LIBARDOUR_API AutomationList : public PBD::StatefulDestructible, public Evoral::ControlList { public: AutomationList (Evoral::Parameter id); diff --git a/libs/ardour/ardour/automation_watch.h b/libs/ardour/ardour/automation_watch.h index f3e343468d..db6474c062 100644 --- a/libs/ardour/ardour/automation_watch.h +++ b/libs/ardour/ardour/automation_watch.h @@ -30,7 +30,7 @@ namespace ARDOUR { class AutomationControl; -class AutomationWatch : public sigc::trackable, public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList { +class LIBARDOUR_API AutomationWatch : public sigc::trackable, public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList { public: static AutomationWatch& instance(); diff --git a/libs/ardour/ardour/backend_search_path.h b/libs/ardour/ardour/backend_search_path.h index 2adc22bd6f..e8a5082c71 100644 --- a/libs/ardour/ardour/backend_search_path.h +++ b/libs/ardour/ardour/backend_search_path.h @@ -32,7 +32,7 @@ namespace ARDOUR { * contain the user and system directories which may contain audio/MIDI * backends. */ - PBD::SearchPath backend_search_path (); + PBD::Searchpath backend_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/beats_frames_converter.h b/libs/ardour/ardour/beats_frames_converter.h index e331b8411d..2e170d278a 100644 --- a/libs/ardour/ardour/beats_frames_converter.h +++ b/libs/ardour/ardour/beats_frames_converter.h @@ -20,6 +20,7 @@ */ #include "evoral/TimeConverter.hpp" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #ifndef __ardour_beats_frames_converter_h__ @@ -33,7 +34,7 @@ class TempoMap; * from some origin (supplied to the constructor in frames), and converts * them to the opposite unit, taking tempo changes into account. */ -class BeatsFramesConverter : public Evoral::TimeConverter<double,framepos_t> { +class LIBARDOUR_API BeatsFramesConverter : public Evoral::TimeConverter<double,framepos_t> { public: BeatsFramesConverter (TempoMap& tempo_map, framepos_t origin) : Evoral::TimeConverter<double, framepos_t> (origin) diff --git a/libs/ardour/ardour/broadcast_info.h b/libs/ardour/ardour/broadcast_info.h index 0e87d6e6df..97f86dd133 100644 --- a/libs/ardour/ardour/broadcast_info.h +++ b/libs/ardour/ardour/broadcast_info.h @@ -23,6 +23,7 @@ #include <string> +#include "ardour/libardour_visibility.h" #include "audiographer/broadcast_info.h" namespace ARDOUR @@ -30,7 +31,7 @@ namespace ARDOUR class Session; -class BroadcastInfo : public AudioGrapher::BroadcastInfo +class LIBARDOUR_API BroadcastInfo : public AudioGrapher::BroadcastInfo { public: BroadcastInfo (); diff --git a/libs/ardour/ardour/buffer.h b/libs/ardour/ardour/buffer.h index 0d0f5d3758..d6f333a5a1 100644 --- a/libs/ardour/ardour/buffer.h +++ b/libs/ardour/ardour/buffer.h @@ -23,6 +23,7 @@ #include <boost/utility.hpp> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/data_type.h" @@ -38,7 +39,7 @@ namespace ARDOUR { * * To actually read/write buffer contents, use the appropriate derived class. */ -class Buffer : public boost::noncopyable +class LIBARDOUR_API Buffer : public boost::noncopyable { public: virtual ~Buffer() {} diff --git a/libs/ardour/ardour/buffer_manager.h b/libs/ardour/ardour/buffer_manager.h index fccd981fba..f5a3935ead 100644 --- a/libs/ardour/ardour/buffer_manager.h +++ b/libs/ardour/ardour/buffer_manager.h @@ -32,7 +32,7 @@ namespace ARDOUR { class ThreadBuffers; -class BufferManager +class LIBARDOUR_API BufferManager { public: static void init (uint32_t); diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h index 5f8553218b..34e26d5b3a 100644 --- a/libs/ardour/ardour/buffer_set.h +++ b/libs/ardour/ardour/buffer_set.h @@ -27,6 +27,7 @@ #include <vector> #include "ardour/chan_count.h" #include "ardour/data_type.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #if defined VST_SUPPORT || defined LXVST_SUPPORT @@ -61,7 +62,7 @@ class PortSet; * others the form of their output (eg what they did to the BufferSet). * Setting the use counts is realtime safe. */ -class BufferSet +class LIBARDOUR_API BufferSet { public: BufferSet(); diff --git a/libs/ardour/ardour/bundle.h b/libs/ardour/ardour/bundle.h index 02845481b6..ef2247f12b 100644 --- a/libs/ardour/ardour/bundle.h +++ b/libs/ardour/ardour/bundle.h @@ -40,7 +40,7 @@ class AudioEngine; * `Channel' is a rather overloaded term but I can't think of a better * one right now. */ -class Bundle : public PBD::ScopedConnectionList +class LIBARDOUR_API Bundle : public PBD::ScopedConnectionList { public: @@ -149,7 +149,7 @@ class Bundle : public PBD::ScopedConnectionList Change _pending_change; }; -class BundleChannel +class LIBARDOUR_API BundleChannel { public: BundleChannel () : channel (-1) {} diff --git a/libs/ardour/ardour/butler.h b/libs/ardour/ardour/butler.h index cdd48c3e3a..efdaad1621 100644 --- a/libs/ardour/ardour/butler.h +++ b/libs/ardour/ardour/butler.h @@ -20,13 +20,22 @@ #ifndef __ardour_butler_h__ #define __ardour_butler_h__ +#include <pthread.h> + #include <glibmm/threads.h> +#ifdef PLATFORM_WINDOWS +#include "pbd/glib_semaphore.h" +#endif + #include "pbd/ringbuffer.h" #include "pbd/pool.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/session_handle.h" + + namespace ARDOUR { /** @@ -36,7 +45,7 @@ namespace ARDOUR { * are empty they are deleted. */ -class Butler : public SessionHandleRef +class LIBARDOUR_API Butler : public SessionHandleRef { public: Butler (Session& session); @@ -71,15 +80,43 @@ class Butler : public SessionHandleRef Glib::Threads::Cond paused; bool should_run; mutable gint should_do_transport_work; - int request_pipe[2]; framecnt_t audio_dstream_capture_buffer_size; framecnt_t audio_dstream_playback_buffer_size; uint32_t midi_dstream_buffer_size; RingBuffer<CrossThreadPool*> pool_trash; +#ifdef PLATFORM_WINDOWS + PBD::atomic_counter m_request_state; + PBD::GlibSemaphore m_request_sem; +#else + int request_pipe[2]; +#endif + private: void empty_pool_trash (); void config_changed (std::string); + +#ifndef PLATFORM_WINDOWS + int setup_request_pipe (); +#endif + + /** + * return true if there are requests to be processed + */ + bool wait_for_requests (); + + /** + * Remove request from butler request queue + * + * return true if there was another request and req is valid + */ + bool dequeue_request (Request::Type& req); + + /** + * Add request to butler thread request queue + */ + void queue_request (Request::Type r); + }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/caimportable.h b/libs/ardour/ardour/caimportable.h index 1ed8676ee6..211329b8c6 100644 --- a/libs/ardour/ardour/caimportable.h +++ b/libs/ardour/ardour/caimportable.h @@ -21,6 +21,7 @@ #define __ardour_ca_importable_source_h__ #include "pbd/failed_constructor.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/importable_source.h" @@ -28,7 +29,7 @@ namespace ARDOUR { -class CAImportableSource : public ImportableSource { +class LIBARDOUR_API CAImportableSource : public ImportableSource { public: CAImportableSource (const std::string& path); virtual ~CAImportableSource(); diff --git a/libs/ardour/ardour/capturing_processor.h b/libs/ardour/ardour/capturing_processor.h index 5b9ea51557..9a91e6d02f 100644 --- a/libs/ardour/ardour/capturing_processor.h +++ b/libs/ardour/ardour/capturing_processor.h @@ -24,7 +24,7 @@ namespace ARDOUR { -class CapturingProcessor : public Processor +class LIBARDOUR_API CapturingProcessor : public Processor { public: CapturingProcessor (Session & session); diff --git a/libs/ardour/ardour/chan_count.h b/libs/ardour/ardour/chan_count.h index c4f3caef6b..9f9fd07543 100644 --- a/libs/ardour/ardour/chan_count.h +++ b/libs/ardour/ardour/chan_count.h @@ -26,6 +26,10 @@ #include "pbd/xml++.h" #include "ardour/data_type.h" +#ifdef INFINITE +#undef INFINITE +#endif + namespace ARDOUR { @@ -34,7 +38,7 @@ namespace ARDOUR { * Operators are defined so this may safely be used as if it were a simple * (single-typed) integer count of channels. */ -class ChanCount { +class LIBARDOUR_API ChanCount { public: ChanCount(const XMLNode& node); ChanCount() { reset(); } diff --git a/libs/ardour/ardour/chan_mapping.h b/libs/ardour/ardour/chan_mapping.h index 5b63844f66..ebb7be402a 100644 --- a/libs/ardour/ardour/chan_mapping.h +++ b/libs/ardour/ardour/chan_mapping.h @@ -34,7 +34,7 @@ namespace ARDOUR { /** A mapping from one set of channels to another * (e.g. how to 'connect' two BufferSets). */ -class ChanMapping { +class LIBARDOUR_API ChanMapping { public: ChanMapping() {} ChanMapping(ARDOUR::ChanCount identity); diff --git a/libs/ardour/ardour/click.h b/libs/ardour/ardour/click.h index 1047540a74..7fc6d21f73 100644 --- a/libs/ardour/ardour/click.h +++ b/libs/ardour/ardour/click.h @@ -23,12 +23,13 @@ #include <list> #include "pbd/pool.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/io.h" namespace ARDOUR { -class Click { +class LIBARDOUR_API Click { public: framepos_t start; framecnt_t duration; @@ -49,7 +50,7 @@ private: static Pool pool; }; -class ClickIO : public IO +class LIBARDOUR_API ClickIO : public IO { public: ClickIO (Session& s, const std::string& name) : IO (s, name, IO::Output) {} diff --git a/libs/ardour/ardour/comparable_shared_ptr.h b/libs/ardour/ardour/comparable_shared_ptr.h index 5ff19af419..f5e9cd346a 100644 --- a/libs/ardour/ardour/comparable_shared_ptr.h +++ b/libs/ardour/ardour/comparable_shared_ptr.h @@ -21,10 +21,12 @@ #ifndef __ardour_comparable_shared_ptr_h__ #define __ardour_comparable_shared_ptr_h__ +#include "ardour/libardour_visibility.h" + namespace ARDOUR { template<typename T> -class ComparableSharedPtr : public boost::shared_ptr<T> +class /*LIBARDOUR_API*/ ComparableSharedPtr : public boost::shared_ptr<T> , public boost::less_than_comparable<ComparableSharedPtr<T> > { public: diff --git a/libs/ardour/ardour/configuration.h b/libs/ardour/ardour/configuration.h index 14a43e160c..f8e512e458 100644 --- a/libs/ardour/ardour/configuration.h +++ b/libs/ardour/ardour/configuration.h @@ -29,7 +29,7 @@ class XMLNode; namespace ARDOUR { -class Configuration : public PBD::Stateful +class LIBARDOUR_API Configuration : public PBD::Stateful { public: Configuration(); diff --git a/libs/ardour/ardour/configuration_variable.h b/libs/ardour/ardour/configuration_variable.h index a7fe8def48..7a83c34c3f 100644 --- a/libs/ardour/ardour/configuration_variable.h +++ b/libs/ardour/ardour/configuration_variable.h @@ -25,12 +25,13 @@ #include "pbd/xml++.h" #include "pbd/convert.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" namespace ARDOUR { -class ConfigVariableBase { +class LIBARDOUR_API ConfigVariableBase { public: ConfigVariableBase (std::string str) : _name (str) {} @@ -51,7 +52,7 @@ class ConfigVariableBase { }; template<class T> -class ConfigVariable : public ConfigVariableBase +class /*LIBARDOUR_API*/ ConfigVariable : public ConfigVariableBase { public: @@ -91,7 +92,7 @@ class ConfigVariable : public ConfigVariableBase /** Specialisation of ConfigVariable for std::string to cope with whitespace properly */ template<> -class ConfigVariable<std::string> : public ConfigVariableBase +class /*LIBARDOUR_API*/ ConfigVariable<std::string> : public ConfigVariableBase { public: @@ -126,7 +127,7 @@ class ConfigVariable<std::string> : public ConfigVariableBase }; template<> -class ConfigVariable<bool> : public ConfigVariableBase +class /*LIBARDOUR_API*/ ConfigVariable<bool> : public ConfigVariableBase { public: @@ -163,7 +164,7 @@ class ConfigVariable<bool> : public ConfigVariableBase }; template<class T> -class ConfigVariableWithMutation : public ConfigVariable<T> +class /*LIBARDOUR_API*/ ConfigVariableWithMutation : public ConfigVariable<T> { public: ConfigVariableWithMutation (std::string name, T val, T (*m)(T)) @@ -192,7 +193,7 @@ class ConfigVariableWithMutation : public ConfigVariable<T> }; template<> -class ConfigVariableWithMutation<std::string> : public ConfigVariable<std::string> +class /*LIBARDOUR_API*/ ConfigVariableWithMutation<std::string> : public ConfigVariable<std::string> { public: ConfigVariableWithMutation (std::string name, std::string val, std::string (*m)(std::string)) diff --git a/libs/ardour/ardour/control_protocol_manager.h b/libs/ardour/ardour/control_protocol_manager.h index 7d3d4872e6..0c8c9014f0 100644 --- a/libs/ardour/ardour/control_protocol_manager.h +++ b/libs/ardour/ardour/control_protocol_manager.h @@ -35,7 +35,7 @@ class ControlProtocol; class ControlProtocolDescriptor; class Session; -class ControlProtocolInfo { +class LIBARDOUR_API ControlProtocolInfo { public: ControlProtocolDescriptor* descriptor; ControlProtocol* protocol; @@ -52,7 +52,7 @@ public: ~ControlProtocolInfo() { delete state; } }; -class ControlProtocolManager : public PBD::Stateful, public ARDOUR::SessionHandlePtr +class LIBARDOUR_API ControlProtocolManager : public PBD::Stateful, public ARDOUR::SessionHandlePtr { public: ~ControlProtocolManager (); diff --git a/libs/ardour/ardour/control_protocol_search_path.h b/libs/ardour/ardour/control_protocol_search_path.h index 8795f4501a..4fe790ef80 100644 --- a/libs/ardour/ardour/control_protocol_search_path.h +++ b/libs/ardour/ardour/control_protocol_search_path.h @@ -25,15 +25,15 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * control surface plugins. * - * If ARDOUR_SURFACES_PATH is defined then the SearchPath returned + * If ARDOUR_SURFACES_PATH is defined then the Searchpath returned * will contain only those directories specified in it, otherwise it will * contain the user and system directories which may contain control * surface plugins. */ - PBD::SearchPath control_protocol_search_path (); + PBD::Searchpath control_protocol_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/coreaudiosource.h b/libs/ardour/ardour/coreaudiosource.h index 820fa0b9d8..f12a67ded7 100644 --- a/libs/ardour/ardour/coreaudiosource.h +++ b/libs/ardour/ardour/coreaudiosource.h @@ -28,7 +28,7 @@ using namespace std; namespace ARDOUR { -class CoreAudioSource : public AudioFileSource { +class LIBARDOUR_API CoreAudioSource : public AudioFileSource { public: CoreAudioSource (ARDOUR::Session&, const XMLNode&); CoreAudioSource (ARDOUR::Session&, const string& path, int chn, Flag); @@ -43,6 +43,8 @@ class CoreAudioSource : public AudioFileSource { void set_header_timeline_position () {}; bool clamped_at_unity () const { return false; } + void flush () {} + static int get_soundfile_info (string path, SoundFileInfo& _info, string& error_msg); protected: diff --git a/libs/ardour/ardour/cycle_timer.h b/libs/ardour/ardour/cycle_timer.h index 35cc2a4c73..cab389ee69 100644 --- a/libs/ardour/ardour/cycle_timer.h +++ b/libs/ardour/ardour/cycle_timer.h @@ -24,12 +24,13 @@ #include <iostream> #include <cstdlib> +#include "ardour/libardour_visibility.h" #include "ardour/cycles.h" #include "ardour/debug.h" float get_mhz (); -class CycleTimer { +class LIBARDOUR_API CycleTimer { private: static float cycles_per_usec; #ifndef NDEBUG @@ -48,6 +49,8 @@ class CycleTimer { } _entry = get_cycles(); } +#else + (void) name; #endif } @@ -61,7 +64,7 @@ class CycleTimer { } }; -class StoringTimer +class LIBARDOUR_API StoringTimer { public: StoringTimer (int); diff --git a/libs/ardour/ardour/cycles.h b/libs/ardour/ardour/cycles.h index 01e1d55221..dc1095db7b 100644 --- a/libs/ardour/ardour/cycles.h +++ b/libs/ardour/ardour/cycles.h @@ -216,7 +216,10 @@ static inline cycles_t get_cycles (void) /* debian: sparc, arm, m68k */ +#ifndef COMPILER_MSVC +/* GRRR... Annoyingly, #warning aborts the compilation for MSVC !! */ #warning You are compiling libardour on a platform for which ardour/cycles.h needs work +#endif #include <sys/time.h> diff --git a/libs/ardour/ardour/data_type.h b/libs/ardour/ardour/data_type.h index b4129e2629..2a4514a5cf 100644 --- a/libs/ardour/ardour/data_type.h +++ b/libs/ardour/ardour/data_type.h @@ -24,6 +24,8 @@ #include <stdint.h> #include <glib.h> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** A type of Data Ardour is capable of processing. @@ -32,7 +34,7 @@ namespace ARDOUR { * other type representations, simple comparison between then, etc. This code * is deliberately 'ugly' so other code doesn't have to be. */ -class DataType +class LIBARDOUR_API DataType { public: /** Numeric symbol for this DataType. diff --git a/libs/ardour/ardour/debug.h b/libs/ardour/ardour/debug.h index 5811f7a484..d5d81b8772 100644 --- a/libs/ardour/ardour/debug.h +++ b/libs/ardour/ardour/debug.h @@ -24,46 +24,48 @@ #include <sstream> +#include "ardour/libardour_visibility.h" #include "pbd/debug.h" namespace PBD { namespace DEBUG { - extern uint64_t MidiSourceIO; - extern uint64_t MidiPlaylistIO; - extern uint64_t MidiDiskstreamIO; - extern uint64_t SnapBBT; - extern uint64_t Configuration; - extern uint64_t Latency; - extern uint64_t Processors; - extern uint64_t ProcessThreads; - extern uint64_t Graph; - extern uint64_t Destruction; - extern uint64_t MTC; - extern uint64_t LTC; - extern uint64_t Transport; - extern uint64_t Slave; - extern uint64_t SessionEvents; - extern uint64_t MidiIO; - extern uint64_t MackieControl; - extern uint64_t MidiClock; - extern uint64_t Monitor; - extern uint64_t Solo; - extern uint64_t AudioPlayback; - extern uint64_t Panning; - extern uint64_t LV2; - extern uint64_t CaptureAlignment; - extern uint64_t PluginManager; - extern uint64_t AudioUnits; - extern uint64_t ControlProtocols; - extern uint64_t CycleTimers; - extern uint64_t MidiTrackers; - extern uint64_t Layering; - extern uint64_t TempoMath; - extern uint64_t TempoMap; - extern uint64_t OrderKeys; - extern uint64_t Automation; - extern uint64_t WiimoteControl; - extern uint64_t Ports; + LIBARDOUR_API extern uint64_t MidiSourceIO; + LIBARDOUR_API extern uint64_t MidiPlaylistIO; + LIBARDOUR_API extern uint64_t MidiDiskstreamIO; + LIBARDOUR_API extern uint64_t SnapBBT; + LIBARDOUR_API extern uint64_t Configuration; + LIBARDOUR_API extern uint64_t Latency; + LIBARDOUR_API extern uint64_t Peaks; + LIBARDOUR_API extern uint64_t Processors; + LIBARDOUR_API extern uint64_t ProcessThreads; + LIBARDOUR_API extern uint64_t Graph; + LIBARDOUR_API extern uint64_t Destruction; + LIBARDOUR_API extern uint64_t MTC; + LIBARDOUR_API extern uint64_t LTC; + LIBARDOUR_API extern uint64_t Transport; + LIBARDOUR_API extern uint64_t Slave; + LIBARDOUR_API extern uint64_t SessionEvents; + LIBARDOUR_API extern uint64_t MidiIO; + LIBARDOUR_API extern uint64_t MackieControl; + LIBARDOUR_API extern uint64_t MidiClock; + LIBARDOUR_API extern uint64_t Monitor; + LIBARDOUR_API extern uint64_t Solo; + LIBARDOUR_API extern uint64_t AudioPlayback; + LIBARDOUR_API extern uint64_t Panning; + LIBARDOUR_API extern uint64_t LV2; + LIBARDOUR_API extern uint64_t CaptureAlignment; + LIBARDOUR_API extern uint64_t PluginManager; + LIBARDOUR_API extern uint64_t AudioUnits; + LIBARDOUR_API extern uint64_t ControlProtocols; + LIBARDOUR_API extern uint64_t CycleTimers; + LIBARDOUR_API extern uint64_t MidiTrackers; + LIBARDOUR_API extern uint64_t Layering; + LIBARDOUR_API extern uint64_t TempoMath; + LIBARDOUR_API extern uint64_t TempoMap; + LIBARDOUR_API extern uint64_t OrderKeys; + LIBARDOUR_API extern uint64_t Automation; + LIBARDOUR_API extern uint64_t WiimoteControl; + LIBARDOUR_API extern uint64_t Ports; } } diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h index 4a6d4368a6..e19eef719f 100644 --- a/libs/ardour/ardour/delivery.h +++ b/libs/ardour/ardour/delivery.h @@ -21,6 +21,7 @@ #include <string> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/chan_count.h" #include "ardour/io_processor.h" @@ -34,7 +35,7 @@ class PannerShell; class Panner; class Pannable; -class Delivery : public IOProcessor +class LIBARDOUR_API Delivery : public IOProcessor { public: enum Role { diff --git a/libs/ardour/ardour/directory_names.h b/libs/ardour/ardour/directory_names.h index 935cdd977b..17532e2a3a 100644 --- a/libs/ardour/ardour/directory_names.h +++ b/libs/ardour/ardour/directory_names.h @@ -21,24 +21,28 @@ #ifndef __ardour_directory_names_h__ #define __ardour_directory_names_h__ +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -extern const char* const old_sound_dir_name; -extern const char* const sound_dir_name; -extern const char* const midi_dir_name; -extern const char* const midi_patch_dir_name; -extern const char* const video_dir_name; -extern const char* const dead_dir_name; -extern const char* const interchange_dir_name; -extern const char* const peak_dir_name; -extern const char* const export_dir_name; -extern const char* const export_formats_dir_name; -extern const char* const templates_dir_name; -extern const char* const route_templates_dir_name; -extern const char* const surfaces_dir_name; -extern const char* const user_config_dir_name; -extern const char* const panner_dir_name; -extern const char* const backend_dir_name; + LIBARDOUR_API extern const char* const old_sound_dir_name; + LIBARDOUR_API extern const char* const sound_dir_name; + LIBARDOUR_API extern const char* const ladspa_dir_name; + LIBARDOUR_API extern const char* const midi_dir_name; + LIBARDOUR_API extern const char* const midi_patch_dir_name; + LIBARDOUR_API extern const char* const video_dir_name; + LIBARDOUR_API extern const char* const dead_dir_name; + LIBARDOUR_API extern const char* const interchange_dir_name; + LIBARDOUR_API extern const char* const peak_dir_name; + LIBARDOUR_API extern const char* const export_dir_name; + LIBARDOUR_API extern const char* const export_formats_dir_name; + LIBARDOUR_API extern const char* const templates_dir_name; + LIBARDOUR_API extern const char* const route_templates_dir_name; + LIBARDOUR_API extern const char* const surfaces_dir_name; + LIBARDOUR_API extern const char* const ladspa_dir_name; + LIBARDOUR_API extern const char* const user_config_dir_name; + LIBARDOUR_API extern const char* const panner_dir_name; + LIBARDOUR_API extern const char* const backend_dir_name; }; diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h index 7a4bccbb46..5bd18663b8 100644 --- a/libs/ardour/ardour/diskstream.h +++ b/libs/ardour/ardour/diskstream.h @@ -34,6 +34,7 @@ #include "ardour/ardour.h" #include "ardour/chan_count.h" #include "ardour/session_object.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" #include "ardour/public_diskstream.h" @@ -54,7 +55,7 @@ class BufferSet; /** Parent class for classes which can stream data to and from disk. * These are used by Tracks to get playback and put recorded data. */ -class Diskstream : public SessionObject, public PublicDiskstream +class LIBARDOUR_API Diskstream : public SessionObject, public PublicDiskstream { public: enum Flag { diff --git a/libs/ardour/ardour/element_import_handler.h b/libs/ardour/ardour/element_import_handler.h index be2e3fafb0..32898ec9de 100644 --- a/libs/ardour/ardour/element_import_handler.h +++ b/libs/ardour/ardour/element_import_handler.h @@ -27,6 +27,9 @@ #include <boost/shared_ptr.hpp> +#include "ardour/libardour_visibility.h" +#include "pbd/libpbd_visibility.h" + class XMLTree; namespace ARDOUR { @@ -35,7 +38,7 @@ class Session; class ElementImporter; /// Virtual interface class for element import handlers -class ElementImportHandler +class LIBARDOUR_API ElementImportHandler { public: typedef boost::shared_ptr<ElementImporter> ElementPtr; diff --git a/libs/ardour/ardour/element_importer.h b/libs/ardour/ardour/element_importer.h index 8c25fd380d..b6d6ff7166 100644 --- a/libs/ardour/ardour/element_importer.h +++ b/libs/ardour/ardour/element_importer.h @@ -25,6 +25,7 @@ #include <utility> #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" class XMLTree; @@ -34,7 +35,7 @@ class Session; class ImportStatus; /// Virtual interface class for element importers -class ElementImporter +class LIBARDOUR_API ElementImporter { public: diff --git a/libs/ardour/ardour/event_type_map.h b/libs/ardour/ardour/event_type_map.h index 02852e9711..fbfd9ec73c 100644 --- a/libs/ardour/ardour/event_type_map.h +++ b/libs/ardour/ardour/event_type_map.h @@ -25,12 +25,14 @@ #include "evoral/TypeMap.hpp" #include "evoral/ControlList.hpp" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** This is the interface Ardour provides to Evoral about what * parameter and event types/ranges/names etc. to use. */ -class EventTypeMap : public Evoral::TypeMap { +class LIBARDOUR_API EventTypeMap : public Evoral::TypeMap { public: bool type_is_midi(uint32_t type) const; uint8_t parameter_midi_type(const Evoral::Parameter& param) const; diff --git a/libs/ardour/ardour/export_channel.h b/libs/ardour/ardour/export_channel.h index f3244095a3..894406874e 100644 --- a/libs/ardour/ardour/export_channel.h +++ b/libs/ardour/ardour/export_channel.h @@ -40,7 +40,7 @@ class AudioRegion; class CapturingProcessor; /// Export channel base class interface for different source types -class ExportChannel : public boost::less_than_comparable<ExportChannel> +class LIBARDOUR_API ExportChannel : public boost::less_than_comparable<ExportChannel> { public: @@ -62,7 +62,7 @@ class ExportChannel : public boost::less_than_comparable<ExportChannel> }; /// Basic export channel that reads from AudioPorts -class PortExportChannel : public ExportChannel +class LIBARDOUR_API PortExportChannel : public ExportChannel { public: typedef std::set<boost::weak_ptr<AudioPort> > PortSet; @@ -89,7 +89,7 @@ class PortExportChannel : public ExportChannel /// Handles RegionExportChannels and does actual reading from region -class RegionExportChannelFactory +class LIBARDOUR_API RegionExportChannelFactory { public: enum Type { @@ -128,7 +128,7 @@ class RegionExportChannelFactory }; /// Export channel that reads from region channel -class RegionExportChannel : public ExportChannel +class LIBARDOUR_API RegionExportChannel : public ExportChannel { friend class RegionExportChannelFactory; @@ -152,7 +152,7 @@ class RegionExportChannel : public ExportChannel }; /// Export channel for exporting from different positions in a route -class RouteExportChannel : public ExportChannel +class LIBARDOUR_API RouteExportChannel : public ExportChannel { class ProcessorRemover; // fwd declaration diff --git a/libs/ardour/ardour/export_channel_configuration.h b/libs/ardour/ardour/export_channel_configuration.h index b625be9dc3..4cab886c88 100644 --- a/libs/ardour/ardour/export_channel_configuration.h +++ b/libs/ardour/ardour/export_channel_configuration.h @@ -37,7 +37,7 @@ namespace ARDOUR class Session; -class ExportChannelConfiguration : public boost::enable_shared_from_this<ExportChannelConfiguration> +class LIBARDOUR_API ExportChannelConfiguration : public boost::enable_shared_from_this<ExportChannelConfiguration> { private: diff --git a/libs/ardour/ardour/export_failed.h b/libs/ardour/ardour/export_failed.h index 16687826b1..f1fd57ab4b 100644 --- a/libs/ardour/ardour/export_failed.h +++ b/libs/ardour/ardour/export_failed.h @@ -24,10 +24,12 @@ #include <exception> #include <string> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class ExportFailed : public std::exception +class LIBARDOUR_API ExportFailed : public std::exception { public: ExportFailed (std::string const &); diff --git a/libs/ardour/ardour/export_filename.h b/libs/ardour/ardour/export_filename.h index 994f584e8d..7eacc11b90 100644 --- a/libs/ardour/ardour/export_filename.h +++ b/libs/ardour/ardour/export_filename.h @@ -34,7 +34,7 @@ namespace ARDOUR class Session; -class ExportFilename { +class LIBARDOUR_API ExportFilename { public: enum DateFormat { diff --git a/libs/ardour/ardour/export_format_base.h b/libs/ardour/ardour/export_format_base.h index a21c977833..7f09d148fe 100644 --- a/libs/ardour/ardour/export_format_base.h +++ b/libs/ardour/ardour/export_format_base.h @@ -30,6 +30,7 @@ #include <samplerate.h> #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "audiographer/general/sample_format_converter.h" @@ -37,7 +38,7 @@ namespace ARDOUR { -class ExportFormatBase { +class LIBARDOUR_API ExportFormatBase { public: enum Type { @@ -113,7 +114,7 @@ class ExportFormatBase { }; /// Class for managing selection and compatibility states - class SelectableCompatible { + class LIBARDOUR_API SelectableCompatible { public: SelectableCompatible () : _selected (false), _compatible (true) { } diff --git a/libs/ardour/ardour/export_format_compatibility.h b/libs/ardour/ardour/export_format_compatibility.h index a220e4e4a2..6f6e367ae0 100644 --- a/libs/ardour/ardour/export_format_compatibility.h +++ b/libs/ardour/ardour/export_format_compatibility.h @@ -28,7 +28,7 @@ namespace ARDOUR { /// Allows adding to all sets. A format should be able to test if it is compatible with this -class ExportFormatCompatibility : public ExportFormatBase, public ExportFormatBase::SelectableCompatible { +class LIBARDOUR_API ExportFormatCompatibility : public ExportFormatBase, public ExportFormatBase::SelectableCompatible { private: public: diff --git a/libs/ardour/ardour/export_format_manager.h b/libs/ardour/ardour/export_format_manager.h index 2b5d0ad804..9a95111509 100644 --- a/libs/ardour/ardour/export_format_manager.h +++ b/libs/ardour/ardour/export_format_manager.h @@ -39,7 +39,7 @@ class ExportFormatCompatibility; class ExportFormatSpecification; class AnyTime; -class ExportFormatManager : public PBD::ScopedConnectionList +class LIBARDOUR_API ExportFormatManager : public PBD::ScopedConnectionList { public: diff --git a/libs/ardour/ardour/export_format_specification.h b/libs/ardour/ardour/export_format_specification.h index fc03eb94b0..1593990d35 100644 --- a/libs/ardour/ardour/export_format_specification.h +++ b/libs/ardour/ardour/export_format_specification.h @@ -25,6 +25,7 @@ #include "pbd/uuid.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/export_format_base.h" @@ -37,7 +38,7 @@ class ExportFormat; class ExportFormatCompatibility; class Session; -class ExportFormatSpecification : public ExportFormatBase { +class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase { private: diff --git a/libs/ardour/ardour/export_formats.h b/libs/ardour/ardour/export_formats.h index 0e9a93ff96..076bb90d3d 100644 --- a/libs/ardour/ardour/export_formats.h +++ b/libs/ardour/ardour/export_formats.h @@ -33,13 +33,13 @@ namespace ARDOUR { -class ExportFormatIncompatible : public failed_constructor { +class LIBARDOUR_API ExportFormatIncompatible : public failed_constructor { public: virtual const char *what() const throw() { return "Export format constructor failed: Format incompatible with system"; } }; /// Base class for formats -class ExportFormat : public ExportFormatBase, public ExportFormatBase::SelectableCompatible { +class LIBARDOUR_API ExportFormat : public ExportFormatBase, public ExportFormatBase::SelectableCompatible { public: ExportFormat () {}; @@ -86,7 +86,7 @@ class ExportFormat : public ExportFormatBase, public ExportFormatBase::Selectabl }; /// Class to be inherited by export formats that have a selectable sample format -class HasSampleFormat : public PBD::ScopedConnectionList { +class LIBARDOUR_API HasSampleFormat : public PBD::ScopedConnectionList { public: class SampleFormatState : public ExportFormatBase::SelectableCompatible { @@ -156,7 +156,7 @@ class HasSampleFormat : public PBD::ScopedConnectionList { ExportFormatBase::SampleFormatSet & _sample_formats; }; -class ExportFormatLinear : public ExportFormat, public HasSampleFormat { +class LIBARDOUR_API ExportFormatLinear : public ExportFormat, public HasSampleFormat { public: ExportFormatLinear (std::string name, FormatId format_id); @@ -174,7 +174,7 @@ class ExportFormatLinear : public ExportFormat, public HasSampleFormat { SampleFormat _default_sample_format; }; -class ExportFormatOggVorbis : public ExportFormat { +class LIBARDOUR_API ExportFormatOggVorbis : public ExportFormat { public: ExportFormatOggVorbis (); ~ExportFormatOggVorbis () {}; @@ -185,7 +185,7 @@ class ExportFormatOggVorbis : public ExportFormat { virtual bool supports_tagging () const { return true; } }; -class ExportFormatFLAC : public ExportFormat, public HasSampleFormat { +class LIBARDOUR_API ExportFormatFLAC : public ExportFormat, public HasSampleFormat { public: ExportFormatFLAC (); ~ExportFormatFLAC () {}; @@ -198,7 +198,7 @@ class ExportFormatFLAC : public ExportFormat, public HasSampleFormat { virtual bool supports_tagging () const { return true; } }; -class ExportFormatBWF : public ExportFormat, public HasSampleFormat { +class LIBARDOUR_API ExportFormatBWF : public ExportFormat, public HasSampleFormat { public: ExportFormatBWF (); ~ExportFormatBWF () {}; diff --git a/libs/ardour/ardour/export_formats_search_path.h b/libs/ardour/ardour/export_formats_search_path.h index 7b6fcea09b..771c6f9bd3 100644 --- a/libs/ardour/ardour/export_formats_search_path.h +++ b/libs/ardour/ardour/export_formats_search_path.h @@ -24,10 +24,10 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * export_formats. */ - PBD::SearchPath export_formats_search_path (); + PBD::Searchpath export_formats_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/export_graph_builder.h b/libs/ardour/ardour/export_graph_builder.h index 07e866475a..40960b2b38 100644 --- a/libs/ardour/ardour/export_graph_builder.h +++ b/libs/ardour/ardour/export_graph_builder.h @@ -48,7 +48,7 @@ namespace ARDOUR class ExportTimespan; class Session; -class ExportGraphBuilder +class LIBARDOUR_API ExportGraphBuilder { private: typedef ExportHandler::FileSpec FileSpec; diff --git a/libs/ardour/ardour/export_handler.h b/libs/ardour/ardour/export_handler.h index d4dd5627f7..1bc80a80e9 100644 --- a/libs/ardour/ardour/export_handler.h +++ b/libs/ardour/ardour/export_handler.h @@ -29,6 +29,7 @@ #include "ardour/export_pointers.h" #include "ardour/session.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace AudioGrapher { @@ -45,7 +46,7 @@ class ExportFilename; class ExportGraphBuilder; class Location; -class ExportElementFactory +class LIBARDOUR_API ExportElementFactory { public: @@ -67,7 +68,7 @@ class ExportElementFactory Session & session; }; -class ExportHandler : public ExportElementFactory +class LIBARDOUR_API ExportHandler : public ExportElementFactory { public: struct FileSpec { diff --git a/libs/ardour/ardour/export_pointers.h b/libs/ardour/ardour/export_pointers.h index edd7f91325..ee29f0ee4c 100644 --- a/libs/ardour/ardour/export_pointers.h +++ b/libs/ardour/ardour/export_pointers.h @@ -25,6 +25,7 @@ #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> +#include "ardour/libardour_visibility.h" #include "ardour/comparable_shared_ptr.h" namespace AudioGrapher { diff --git a/libs/ardour/ardour/export_preset.h b/libs/ardour/ardour/export_preset.h index b24cc70dcf..b11ab75bab 100644 --- a/libs/ardour/ardour/export_preset.h +++ b/libs/ardour/ardour/export_preset.h @@ -26,12 +26,14 @@ #include "pbd/uuid.h" #include "pbd/xml++.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class Session; -class ExportPreset { +class LIBARDOUR_API ExportPreset { public: ExportPreset (std::string filename, Session & s); ~ExportPreset (); diff --git a/libs/ardour/ardour/export_profile_manager.h b/libs/ardour/ardour/export_profile_manager.h index 424e0fe163..2757795ff3 100644 --- a/libs/ardour/ardour/export_profile_manager.h +++ b/libs/ardour/ardour/export_profile_manager.h @@ -35,6 +35,7 @@ #include "ardour/filesystem_paths.h" #include "ardour/location.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/export_handler.h" @@ -46,7 +47,7 @@ class Location; class Session; /// Manages (de)serialization of export profiles and related classes -class ExportProfileManager +class LIBARDOUR_API ExportProfileManager { public: @@ -102,7 +103,7 @@ class ExportProfileManager std::vector<std::string> find_file (std::string const & pattern); std::string export_config_dir; - PBD::SearchPath search_path; + PBD::Searchpath search_path; /* Timespans */ public: diff --git a/libs/ardour/ardour/export_status.h b/libs/ardour/ardour/export_status.h index 31027269f8..6a5be177e4 100644 --- a/libs/ardour/ardour/export_status.h +++ b/libs/ardour/ardour/export_status.h @@ -23,6 +23,7 @@ #include <stdint.h> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "pbd/signals.h" @@ -30,7 +31,7 @@ namespace ARDOUR { -class ExportStatus { +class LIBARDOUR_API ExportStatus { public: ExportStatus (); void init (); diff --git a/libs/ardour/ardour/export_timespan.h b/libs/ardour/ardour/export_timespan.h index 5cb32dbb1a..754335ba48 100644 --- a/libs/ardour/ardour/export_timespan.h +++ b/libs/ardour/ardour/export_timespan.h @@ -25,6 +25,7 @@ #include <boost/shared_ptr.hpp> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR @@ -34,7 +35,7 @@ class ExportStatus; class ExportChannel; class ExportTempFile; -class ExportTimespan +class LIBARDOUR_API ExportTimespan { private: typedef boost::shared_ptr<ExportStatus> ExportStatusPtr; diff --git a/libs/ardour/ardour/file_source.h b/libs/ardour/ardour/file_source.h index 5898d04f0a..4b1dbf2b6c 100644 --- a/libs/ardour/ardour/file_source.h +++ b/libs/ardour/ardour/file_source.h @@ -28,7 +28,7 @@ namespace ARDOUR { -class MissingSource : public std::exception +class LIBARDOUR_API MissingSource : public std::exception { public: MissingSource (const std::string& p, DataType t) throw () @@ -42,7 +42,7 @@ class MissingSource : public std::exception }; /** A source associated with a file on disk somewhere */ -class FileSource : virtual public Source { +class LIBARDOUR_API FileSource : virtual public Source { public: virtual ~FileSource () {} @@ -79,7 +79,7 @@ public: virtual void set_path (const std::string&); - static PBD::Signal3<int,std::string,std::string,std::vector<std::string> > AmbiguousFileName; + static PBD::Signal2<int,std::string,std::vector<std::string> > AmbiguousFileName; protected: FileSource (Session& session, DataType type, diff --git a/libs/ardour/ardour/filename_extensions.h b/libs/ardour/ardour/filename_extensions.h index a7c9274c4a..c0725932fa 100644 --- a/libs/ardour/ardour/filename_extensions.h +++ b/libs/ardour/ardour/filename_extensions.h @@ -21,17 +21,19 @@ #ifndef __ardour_filename_extensions_h__ #define __ardour_filename_extensions_h__ +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -extern const char* const template_suffix; -extern const char* const statefile_suffix; -extern const char* const pending_suffix; -extern const char* const peakfile_suffix; -extern const char* const backup_suffix; -extern const char* const temp_suffix; -extern const char* const history_suffix; -extern const char* const export_preset_suffix; -extern const char* const export_format_suffix; + LIBARDOUR_API extern const char* const template_suffix; + LIBARDOUR_API extern const char* const statefile_suffix; + LIBARDOUR_API extern const char* const pending_suffix; + LIBARDOUR_API extern const char* const peakfile_suffix; + LIBARDOUR_API extern const char* const backup_suffix; + LIBARDOUR_API extern const char* const temp_suffix; + LIBARDOUR_API extern const char* const history_suffix; + LIBARDOUR_API extern const char* const export_preset_suffix; + LIBARDOUR_API extern const char* const export_format_suffix; } diff --git a/libs/ardour/ardour/filesystem_paths.h b/libs/ardour/ardour/filesystem_paths.h index cfeb633597..0bf25c5153 100644 --- a/libs/ardour/ardour/filesystem_paths.h +++ b/libs/ardour/ardour/filesystem_paths.h @@ -22,6 +22,8 @@ #include "pbd/search_path.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** @@ -29,26 +31,26 @@ namespace ARDOUR { * configuration files. * @post user_config_directory() exists */ - std::string user_config_directory (); + LIBARDOUR_API std::string user_config_directory (); /** * @return the path to the directory that contains the system wide ardour * modules. */ - std::string ardour_dll_directory (); + LIBARDOUR_API std::string ardour_dll_directory (); /** * @return the search path to be used when looking for per-system * configuration files. This may include user configuration files. */ - PBD::SearchPath ardour_config_search_path (); + LIBARDOUR_API PBD::Searchpath ardour_config_search_path (); /** * @return the search path to be used when looking for data files * that could be shared by systems (h/w and configuration independent * files, such as icons, XML files, etc) */ - PBD::SearchPath ardour_data_search_path (); + LIBARDOUR_API PBD::Searchpath ardour_data_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/filter.h b/libs/ardour/ardour/filter.h index a9cdc893a6..2b6476c49f 100644 --- a/libs/ardour/ardour/filter.h +++ b/libs/ardour/ardour/filter.h @@ -23,6 +23,7 @@ #include <vector> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -31,7 +32,7 @@ class Region; class Session; class Progress; -class Filter { +class LIBARDOUR_API Filter { public: virtual ~Filter() {} diff --git a/libs/ardour/ardour/graph.h b/libs/ardour/ardour/graph.h index 763723c792..b433580a54 100644 --- a/libs/ardour/ardour/graph.h +++ b/libs/ardour/ardour/graph.h @@ -33,6 +33,7 @@ #include "pbd/semutils.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/audio_backend.h" #include "ardour/session_handle.h" @@ -52,7 +53,7 @@ typedef boost::shared_ptr<GraphNode> node_ptr_t; typedef std::list< node_ptr_t > node_list_t; typedef std::set< node_ptr_t > node_set_t; -class Graph : public SessionHandleRef +class LIBARDOUR_API Graph : public SessionHandleRef { public: Graph (Session & session); diff --git a/libs/ardour/ardour/graphnode.h b/libs/ardour/ardour/graphnode.h index 9e0182300f..55867eac4c 100644 --- a/libs/ardour/ardour/graphnode.h +++ b/libs/ardour/ardour/graphnode.h @@ -38,7 +38,7 @@ typedef std::set< node_ptr_t > node_set_t; typedef std::list< node_ptr_t > node_list_t; /** A node on our processing graph, ie a Route */ -class GraphNode +class LIBARDOUR_API GraphNode { public: GraphNode( boost::shared_ptr<Graph> Graph ); diff --git a/libs/ardour/ardour/iec1ppmdsp.h b/libs/ardour/ardour/iec1ppmdsp.h index 0fe11681b1..b6f1501db7 100644 --- a/libs/ardour/ardour/iec1ppmdsp.h +++ b/libs/ardour/ardour/iec1ppmdsp.h @@ -20,8 +20,9 @@ #ifndef __IEC1PPMDSP_H #define __IEC1PPMDSP_H +#include "ardour/libardour_visibility.h" -class Iec1ppmdsp +class LIBARDOUR_API Iec1ppmdsp { public: diff --git a/libs/ardour/ardour/iec2ppmdsp.h b/libs/ardour/ardour/iec2ppmdsp.h index 8e26dd9e74..6a3852da1d 100644 --- a/libs/ardour/ardour/iec2ppmdsp.h +++ b/libs/ardour/ardour/iec2ppmdsp.h @@ -20,8 +20,9 @@ #ifndef __IEC2PPMDSP_H #define __IEC2PPMDSP_H +#include "ardour/libardour_visibility.h" -class Iec2ppmdsp +class LIBARDOUR_API Iec2ppmdsp { public: diff --git a/libs/ardour/ardour/import_status.h b/libs/ardour/ardour/import_status.h index c261b7a960..4dbf8f8456 100644 --- a/libs/ardour/ardour/import_status.h +++ b/libs/ardour/ardour/import_status.h @@ -26,11 +26,12 @@ #include <stdint.h> #include "ardour/interthread_info.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { -class ImportStatus : public InterThreadInfo { +class LIBARDOUR_API ImportStatus : public InterThreadInfo { public: std::string doing_what; diff --git a/libs/ardour/ardour/importable_source.h b/libs/ardour/ardour/importable_source.h index fc695d88c1..9463f0b28b 100644 --- a/libs/ardour/ardour/importable_source.h +++ b/libs/ardour/ardour/importable_source.h @@ -21,11 +21,12 @@ #define __ardour_importable_source_h__ #include "pbd/failed_constructor.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { -class ImportableSource { +class LIBARDOUR_API ImportableSource { public: ImportableSource () {} virtual ~ImportableSource() {} diff --git a/libs/ardour/ardour/instrument_info.h b/libs/ardour/ardour/instrument_info.h index 8691db24e5..745e4803c0 100644 --- a/libs/ardour/ardour/instrument_info.h +++ b/libs/ardour/ardour/instrument_info.h @@ -28,19 +28,22 @@ #include "evoral/Parameter.hpp" +#include "midi++/libmidi_visibility.h" +#include "ardour/libardour_visibility.h" + namespace MIDI { -namespace Name { -class ChannelNameSet; -class Patch; -typedef std::list<boost::shared_ptr<Patch> > PatchNameList; -} + namespace Name { + class ChannelNameSet; + class Patch; + typedef std::list<boost::shared_ptr<Patch> > PatchNameList; + } } namespace ARDOUR { class Processor; -class InstrumentInfo { +class LIBARDOUR_API InstrumentInfo { public: InstrumentInfo(); ~InstrumentInfo (); diff --git a/libs/ardour/ardour/internal_return.h b/libs/ardour/ardour/internal_return.h index 4d2b32f031..d12b330e37 100644 --- a/libs/ardour/ardour/internal_return.h +++ b/libs/ardour/ardour/internal_return.h @@ -29,7 +29,7 @@ namespace ARDOUR { class InternalSend; -class InternalReturn : public Return +class LIBARDOUR_API InternalReturn : public Return { public: InternalReturn (Session&); diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h index ea3d645754..a06bf39906 100644 --- a/libs/ardour/ardour/internal_send.h +++ b/libs/ardour/ardour/internal_send.h @@ -25,7 +25,7 @@ namespace ARDOUR { -class InternalSend : public Send +class LIBARDOUR_API InternalSend : public Send { public: InternalSend (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_to, Delivery::Role role = Delivery::Aux, bool ignore_bitslot = false); diff --git a/libs/ardour/ardour/interpolation.h b/libs/ardour/ardour/interpolation.h index a4a332c8a2..64b0431e0f 100644 --- a/libs/ardour/ardour/interpolation.h +++ b/libs/ardour/ardour/interpolation.h @@ -20,6 +20,7 @@ #include <math.h> #include <samplerate.h> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #ifndef __interpolation_h__ @@ -27,7 +28,7 @@ namespace ARDOUR { -class Interpolation { +class LIBARDOUR_API Interpolation { protected: double _speed; double _target_speed; @@ -57,12 +58,12 @@ public: } }; -class LinearInterpolation : public Interpolation { +class LIBARDOUR_API LinearInterpolation : public Interpolation { public: framecnt_t interpolate (int channel, framecnt_t nframes, Sample* input, Sample* output); }; -class CubicInterpolation : public Interpolation { +class LIBARDOUR_API CubicInterpolation : public Interpolation { public: framecnt_t interpolate (int channel, framecnt_t nframes, Sample* input, Sample* output); }; diff --git a/libs/ardour/ardour/interthread_info.h b/libs/ardour/ardour/interthread_info.h index 01cacf437c..49055de5d0 100644 --- a/libs/ardour/ardour/interthread_info.h +++ b/libs/ardour/ardour/interthread_info.h @@ -22,6 +22,7 @@ #include <pthread.h> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/process_thread.h" @@ -29,7 +30,7 @@ namespace ARDOUR { class InterThreadInfo { public: - InterThreadInfo () : done (false), cancel (false), progress (0), thread (0) {} + InterThreadInfo () : done (false), cancel (false), progress (0), thread () {} volatile bool done; volatile bool cancel; diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index adad0c753f..1688a2a36d 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -40,6 +40,7 @@ #include "ardour/latent.h" #include "ardour/port_set.h" #include "ardour/session_object.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" #include "ardour/buffer_set.h" @@ -64,7 +65,7 @@ class UserBundle; * An IO can contain ports of varying types, making routes/inserts/etc with * varied combinations of types (eg MIDI and audio) possible. */ -class IO : public SessionObject, public Latent +class LIBARDOUR_API IO : public SessionObject, public Latent { public: static const std::string state_node_name; diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h index 7adfab2225..a2735453a7 100644 --- a/libs/ardour/ardour/io_processor.h +++ b/libs/ardour/ardour/io_processor.h @@ -40,7 +40,7 @@ class Route; /** A mixer strip element (Processor) with 1 or 2 IO elements. */ -class IOProcessor : public Processor +class LIBARDOUR_API IOProcessor : public Processor { public: IOProcessor (Session&, bool with_input, bool with_output, diff --git a/libs/ardour/ardour/jack_utils.h b/libs/ardour/ardour/jack_utils.h new file mode 100644 index 0000000000..40eb30f9ea --- /dev/null +++ b/libs/ardour/ardour/jack_utils.h @@ -0,0 +1,253 @@ +/* + Copyright (C) 2011 Tim Mayberry + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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. + +*/ + +#include <stdint.h> + +#include <vector> +#include <map> +#include <string> + +namespace ARDOUR { + + // Names for the drivers on all possible systems + extern const char * const portaudio_driver_name; + extern const char * const coreaudio_driver_name; + extern const char * const alsa_driver_name; + extern const char * const oss_driver_name; + extern const char * const freebob_driver_name; + extern const char * const ffado_driver_name; + extern const char * const netjack_driver_name; + extern const char * const dummy_driver_name; + + /** + * Get a list of possible JACK audio driver names based on platform + */ + void get_jack_audio_driver_names (std::vector<std::string>& driver_names); + + /** + * Get the default JACK audio driver based on platform + */ + void get_jack_default_audio_driver_name (std::string& driver_name); + + /** + * Get a list of possible JACK midi driver names based on platform + */ + void get_jack_midi_system_names (const std::string& driver, std::vector<std::string>& driver_names); + + /** + * Get the default JACK midi driver based on platform + */ + void get_jack_default_midi_system_name (const std::string& driver_name, std::string& midi_system); + + /** + * Get a list of possible samplerates supported be JACK + */ + void get_jack_sample_rate_strings (std::vector<std::string>& sample_rates); + + /** + * @return The default samplerate + */ + std::string get_jack_default_sample_rate (); + + /** + * @return true if sample rate string was able to be converted + */ + bool get_jack_sample_rate_value_from_string (const std::string& srs, uint32_t& srv); + + /** + * Get a list of possible period sizes supported be JACK + */ + void get_jack_period_size_strings (std::vector<std::string>& samplerates); + + /** + * @return The default period size + */ + std::string get_jack_default_period_size (); + + /** + * @return true if period size string was able to be converted + */ + bool get_jack_period_size_value_from_string (const std::string& pss, uint32_t& psv); + + /** + * These are driver specific I think, so it may require a driver arg + * in future + */ + void get_jack_dither_mode_strings (const std::string& driver, std::vector<std::string>& dither_modes); + + /** + * @return The default dither mode + */ + std::string get_jack_default_dither_mode (const std::string& driver); + + /** + * @return Estimate of latency + * + * API matches current use in GUI + */ + std::string get_jack_latency_string (std::string samplerate, float periods, std::string period_size); + + /** + * @return true if a JACK server is running + */ + bool jack_server_running (); + + /** + * Key being a readable name to display in a GUI + * Value being name used in a jack commandline + */ + typedef std::map<std::string, std::string> device_map_t; + + /** + * Use library specific code to find out what what devices exist for a given + * driver that might work in JACK. There is no easy way to find out what + * modules the JACK server supports so guess based on platform. For instance + * portaudio is cross-platform but we only return devices if built for + * windows etc + */ + void get_jack_alsa_device_names (device_map_t& devices); + void get_jack_portaudio_device_names (device_map_t& devices); + void get_jack_coreaudio_device_names (device_map_t& devices); + void get_jack_oss_device_names (device_map_t& devices); + void get_jack_freebob_device_names (device_map_t& devices); + void get_jack_ffado_device_names (device_map_t& devices); + void get_jack_netjack_device_names (device_map_t& devices); + void get_jack_dummy_device_names (device_map_t& devices); + + /* + * @return true if there were devices found for the driver + * + * @param driver The driver name returned by get_jack_audio_driver_names + * @param devices The map used to insert the drivers into, devices will be cleared before + * adding the available drivers + */ + bool get_jack_device_names_for_audio_driver (const std::string& driver, device_map_t& devices); + + /* + * @return a list of readable device names for a specific driver. + */ + std::vector<std::string> get_jack_device_names_for_audio_driver (const std::string& driver); + + /** + * @return true if the driver supports playback and recording + * on separate devices + */ + bool get_jack_audio_driver_supports_two_devices (const std::string& driver); + + bool get_jack_audio_driver_supports_latency_adjustment (const std::string& driver); + + bool get_jack_audio_driver_supports_setting_period_count (const std::string& driver); + + /** + * The possible names to use to try and find servers, this includes + * any file extensions like .exe on Windows + * + * @return true if the JACK application names for this platform could be guessed + */ + bool get_jack_server_application_names (std::vector<std::string>& server_names); + + /** + * Sets the PATH environment variable to contain directories likely to contain + * JACK servers so that if the JACK server is auto-started it can find the server + * executable. + * + * This is only modifies PATH on the mac at the moment. + */ + void set_path_env_for_jack_autostart (const std::vector<std::string>&); + + /** + * Get absolute paths to directories that might contain JACK servers on the system + * + * @return true if !server_paths.empty() + */ + bool get_jack_server_dir_paths (std::vector<std::string>& server_dir_paths); + + /** + * Get absolute paths to JACK servers on the system + * + * @return true if a server was found + */ + bool get_jack_server_paths (const std::vector<std::string>& server_dir_paths, + const std::vector<std::string>& server_names, + std::vector<std::string>& server_paths); + + + bool get_jack_server_paths (std::vector<std::string>& server_paths); + + /** + * Get absolute path to default JACK server + */ + bool get_jack_default_server_path (std::string& server_path); + + /** + * @return The name of the jack server config file + */ + std::string get_jack_server_config_file_name (); + + std::string get_jack_server_user_config_dir_path (); + + std::string get_jack_server_user_config_file_path (); + + bool write_jack_config_file (const std::string& config_file_path, const std::string& command_line); + + struct JackCommandLineOptions { + + // see implementation for defaults + JackCommandLineOptions (); + + //operator bool + //operator ostream + + std::string server_path; + uint32_t timeout; + bool no_mlock; + uint32_t ports_max; + bool realtime; + uint32_t priority; + bool unlock_gui_libs; + bool verbose; + bool temporary; + bool playback_only; + bool capture_only; + std::string driver; + std::string input_device; + std::string output_device; + uint32_t num_periods; + uint32_t period_size; + uint32_t samplerate; + uint32_t input_latency; + uint32_t output_latency; + bool hardware_metering; + bool hardware_monitoring; + std::string dither_mode; + bool force16_bit; + bool soft_mode; + std::string midi_driver; + }; + + /** + * @return true if able to build a valid command line based on options + */ + bool get_jack_command_line_string (const JackCommandLineOptions& options, std::string& command_line); + + /** + * We don't need this at the moment because the gui stores all its settings + */ + //std::string get_jack_command_line_from_config_file (const std::string& config_file_path); +} diff --git a/libs/ardour/ardour/kmeterdsp.h b/libs/ardour/ardour/kmeterdsp.h index 69d1215b98..7fe2b9d11b 100644 --- a/libs/ardour/ardour/kmeterdsp.h +++ b/libs/ardour/ardour/kmeterdsp.h @@ -20,7 +20,9 @@ #ifndef __KMETERDSP_H #define __KMETERDSP_H -class Kmeterdsp +#include "ardour/libardour_visibility.h" + +class LIBARDOUR_API Kmeterdsp { public: diff --git a/libs/ardour/ardour/ladspa_plugin.h b/libs/ardour/ardour/ladspa_plugin.h index 6853a1dc36..a3b99575fe 100644 --- a/libs/ardour/ardour/ladspa_plugin.h +++ b/libs/ardour/ardour/ladspa_plugin.h @@ -23,8 +23,8 @@ #include <set> #include <vector> #include <string> -#include <dlfcn.h> +#include <glibmm/module.h> #include "pbd/stateful.h" @@ -36,10 +36,10 @@ namespace ARDOUR { class AudioEngine; class Session; -class LadspaPlugin : public ARDOUR::Plugin +class LIBARDOUR_API LadspaPlugin : public ARDOUR::Plugin { public: - LadspaPlugin (void *module, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, framecnt_t sample_rate); + LadspaPlugin (std::string module_path, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, framecnt_t sample_rate); LadspaPlugin (const LadspaPlugin &); ~LadspaPlugin (); @@ -122,7 +122,8 @@ class LadspaPlugin : public ARDOUR::Plugin void connect_port (uint32_t port, float *ptr) { _descriptor->connect_port (_handle, port, ptr); } private: - void* _module; + std::string _module_path; + Glib::Module* _module; const LADSPA_Descriptor* _descriptor; LADSPA_Handle _handle; framecnt_t _sample_rate; @@ -134,7 +135,7 @@ class LadspaPlugin : public ARDOUR::Plugin void find_presets (); - void init (void *mod, uint32_t index, framecnt_t rate); + void init (std::string module_path, uint32_t index, framecnt_t rate); void run_in_place (pframes_t nsamples); void latency_compute_run (); int set_state_2X (const XMLNode&, int version); @@ -146,7 +147,7 @@ class LadspaPlugin : public ARDOUR::Plugin void add_state (XMLNode *) const; }; -class LadspaPluginInfo : public PluginInfo { +class LIBARDOUR_API LadspaPluginInfo : public PluginInfo { public: LadspaPluginInfo (); ~LadspaPluginInfo () { }; diff --git a/libs/ardour/ardour/ladspa_search_path.h b/libs/ardour/ardour/ladspa_search_path.h new file mode 100644 index 0000000000..bc184b5248 --- /dev/null +++ b/libs/ardour/ardour/ladspa_search_path.h @@ -0,0 +1,39 @@ +/* + Copyright (C) 2011 Tim Mayberry + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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. + +*/ + +#ifndef ARDOUR_LADSPA_SEARCH_PATH_INCLUDED +#define ARDOUR_LADSPA_SEARCH_PATH_INCLUDED + +#include "pbd/search_path.h" + +namespace ARDOUR { + + /** + * return a Searchpath containing directories in which to look for + * LADSPA plugins. + * + * If LADSPA_PATH is defined then the Searchpath returned + * will contain the directories specified in it as well as the + * user and system directories. + */ + PBD::Searchpath ladspa_search_path (); + +} // namespace ARDOUR + +#endif diff --git a/libs/ardour/ardour/latent.h b/libs/ardour/ardour/latent.h index c6e81c17a2..bd639a8651 100644 --- a/libs/ardour/ardour/latent.h +++ b/libs/ardour/ardour/latent.h @@ -20,11 +20,12 @@ #ifndef __ardour_latent_h__ #define __ardour_latent_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { -class Latent { +class LIBARDOUR_API Latent { public: Latent() : _user_latency (0) {} virtual ~Latent() {} diff --git a/libs/ardour/ardour/libardour_visibility.h b/libs/ardour/ardour/libardour_visibility.h new file mode 100644 index 0000000000..917307732c --- /dev/null +++ b/libs/ardour/ardour/libardour_visibility.h @@ -0,0 +1,45 @@ +/* + Copyright (C) 2013 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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. + +*/ + +#ifndef __libardour_libardour_visibility_h__ +#define __libardour_libardour_visibility_h__ + +#if defined(COMPILER_MSVC) + #define LIBARDOUR_DLL_IMPORT __declspec(dllimport) + #define LIBARDOUR_DLL_EXPORT __declspec(dllexport) + #define LIBARDOUR_DLL_LOCAL +#else + #define LIBARDOUR_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBARDOUR_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBARDOUR_DLL_LOCAL __attribute__ ((visibility ("hidden"))) +#endif + +#ifdef LIBARDOUR_STATIC // libardour is not a DLL +#define LIBARDOUR_API +#define LIBARDOUR_LOCAL +#else + #ifdef LIBARDOUR_DLL_EXPORTS // defined if we are building the libardour DLL (instead of using it) + #define LIBARDOUR_API LIBARDOUR_DLL_EXPORT + #else + #define LIBARDOUR_API LIBARDOUR_DLL_IMPORT + #endif + #define LIBARDOUR_LOCAL LIBARDOUR_DLL_LOCAL +#endif + +#endif /* __libardour_libardour_visibility_h__ */ diff --git a/libs/ardour/ardour/linux_vst_support.h b/libs/ardour/ardour/linux_vst_support.h index c99c4a8cb3..cb18a0b1d4 100644 --- a/libs/ardour/ardour/linux_vst_support.h +++ b/libs/ardour/ardour/linux_vst_support.h @@ -25,44 +25,46 @@ #include <pthread.h> #include <stdio.h> +#include "ardour/libardour_visibility.h" #include "ardour/vst_types.h" /******************************************************************************************/ /*VSTFX - an engine to manage native linux VST plugins - derived from FST for Windows VSTs*/ /******************************************************************************************/ -extern void (*vstfx_error_callback)(const char *msg); +LIBARDOUR_API extern void (*vstfx_error_callback)(const char *msg); -void vstfx_set_error_function (void (*func)(const char *)); +LIBARDOUR_API void vstfx_set_error_function (void (*func)(const char *)); -void vstfx_error (const char *fmt, ...); +LIBARDOUR_API void vstfx_error (const char *fmt, ...); /*API to vstfx*/ -extern int vstfx_launch_editor (VSTState *); -extern int vstfx_init (void *); -extern void vstfx_exit (); -extern VSTHandle * vstfx_load (const char*); -extern int vstfx_unload (VSTHandle *); -extern VSTState * vstfx_instantiate (VSTHandle *, audioMasterCallback, void *); -extern void vstfx_close (VSTState*); +LIBARDOUR_API extern int vstfx_launch_editor (VSTState *); +LIBARDOUR_API extern int vstfx_init (void *); +LIBARDOUR_API extern void vstfx_exit (); +LIBARDOUR_API extern VSTHandle * vstfx_load (const char*); +LIBARDOUR_API extern int vstfx_unload (VSTHandle *); -extern int vstfx_create_editor (VSTState *); -extern int vstfx_run_editor (VSTState *); -extern void vstfx_destroy_editor (VSTState *); +LIBARDOUR_API extern VSTState * vstfx_instantiate (VSTHandle *, audioMasterCallback, void *); +LIBARDOUR_API extern void vstfx_close (VSTState*); -extern VSTInfo * vstfx_get_info (char *); -extern void vstfx_free_info (VSTInfo *); -extern void vstfx_event_loop_remove_plugin (VSTState *); -extern int vstfx_call_dispatcher (VSTState *, int, int, int, void *, float); +LIBARDOUR_API extern int vstfx_create_editor (VSTState *); +LIBARDOUR_API extern int vstfx_run_editor (VSTState *); +LIBARDOUR_API extern void vstfx_destroy_editor (VSTState *); + +LIBARDOUR_API extern VSTInfo * vstfx_get_info (char *); +LIBARDOUR_API extern void vstfx_free_info (VSTInfo *); +LIBARDOUR_API extern void vstfx_event_loop_remove_plugin (VSTState *); +LIBARDOUR_API extern int vstfx_call_dispatcher (VSTState *, int, int, int, void *, float); /** Load a plugin state from a file.**/ -extern int vstfx_load_state (VSTState* vstfx, char * filename); +LIBARDOUR_API extern int vstfx_load_state (VSTState* vstfx, char * filename); /** Save a plugin state to a file.**/ -extern bool vstfx_save_state (VSTState* vstfx, char * filename); +LIBARDOUR_API extern bool vstfx_save_state (VSTState* vstfx, char * filename); #endif /* __vstfx_h__ */ diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h index bb42df1b58..b0956eea36 100644 --- a/libs/ardour/ardour/location.h +++ b/libs/ardour/ardour/location.h @@ -38,7 +38,7 @@ namespace ARDOUR { -class Location : public SessionHandleRef, public PBD::StatefulDestructible +class LIBARDOUR_API Location : public SessionHandleRef, public PBD::StatefulDestructible { public: enum Flags { @@ -131,7 +131,7 @@ class Location : public SessionHandleRef, public PBD::StatefulDestructible void recompute_bbt_from_frames (); }; -class Locations : public SessionHandleRef, public PBD::StatefulDestructible +class LIBARDOUR_API Locations : public SessionHandleRef, public PBD::StatefulDestructible { public: typedef std::list<Location *> LocationList; diff --git a/libs/ardour/ardour/location_importer.h b/libs/ardour/ardour/location_importer.h index 332c5ae685..574b948062 100644 --- a/libs/ardour/ardour/location_importer.h +++ b/libs/ardour/ardour/location_importer.h @@ -33,14 +33,14 @@ namespace ARDOUR { class Location; class Session; -class LocationImportHandler : public ElementImportHandler +class LIBARDOUR_API LocationImportHandler : public ElementImportHandler { public: LocationImportHandler (XMLTree const & source, Session & session); std::string get_info () const; }; -class LocationImporter : public ElementImporter +class LIBARDOUR_API LocationImporter : public ElementImporter { public: LocationImporter (XMLTree const & source, Session & session, LocationImportHandler & handler, XMLNode const & node); diff --git a/libs/ardour/ardour/logcurve.h b/libs/ardour/ardour/logcurve.h index 4c91ad9a79..2585da66c8 100644 --- a/libs/ardour/ardour/logcurve.h +++ b/libs/ardour/ardour/logcurve.h @@ -25,7 +25,7 @@ namespace ARDOUR { -class LogCurve { +class LIBARDOUR_API LogCurve { public: LogCurve (float steepness = 0.2, uint32_t len = 0) { l = len; @@ -102,7 +102,7 @@ class LogCurve { uint32_t l; }; -class LogCurveIn : public LogCurve +class LIBARDOUR_API LogCurveIn : public LogCurve { public: LogCurveIn (float steepness = 0.2, uint32_t len = 0) @@ -117,7 +117,7 @@ class LogCurveIn : public LogCurve } }; -class LogCurveOut : public LogCurve +class LIBARDOUR_API LogCurveOut : public LogCurve { public: LogCurveOut (float steepness = 0.2, uint32_t len = 0) diff --git a/libs/ardour/ardour/lv2_bundled_search_path.h b/libs/ardour/ardour/lv2_bundled_search_path.h index f5780c5e0e..9314ee27d4 100644 --- a/libs/ardour/ardour/lv2_bundled_search_path.h +++ b/libs/ardour/ardour/lv2_bundled_search_path.h @@ -25,10 +25,10 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * lv2 plugins. */ - PBD::SearchPath lv2_bundled_search_path (); + PBD::Searchpath lv2_bundled_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/lv2_plugin.h b/libs/ardour/ardour/lv2_plugin.h index 56aa9dc7cf..034101ee41 100644 --- a/libs/ardour/ardour/lv2_plugin.h +++ b/libs/ardour/ardour/lv2_plugin.h @@ -29,6 +29,8 @@ #include "ardour/worker.h" #include "pbd/ringbuffer.h" +typedef struct LV2_Evbuf_Impl LV2_Evbuf; + namespace ARDOUR { // a callback function for lilv_state_new_from_instance(). friend of LV2Plugin @@ -41,7 +43,7 @@ const void* lv2plugin_get_port_value(const char* port_symbol, class AudioEngine; class Session; -class LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee +class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee { public: LV2Plugin (ARDOUR::AudioEngine& engine, @@ -270,7 +272,7 @@ class LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee }; -class LV2PluginInfo : public PluginInfo { +class LIBARDOUR_API LV2PluginInfo : public PluginInfo { public: LV2PluginInfo (const void* c_plugin); ~LV2PluginInfo (); diff --git a/libs/ardour/ardour/lxvst_plugin.h b/libs/ardour/ardour/lxvst_plugin.h index 58bc626d32..f1a50b2f30 100644 --- a/libs/ardour/ardour/lxvst_plugin.h +++ b/libs/ardour/ardour/lxvst_plugin.h @@ -30,7 +30,7 @@ namespace ARDOUR { class AudioEngine; class Session; -class LXVSTPlugin : public VSTPlugin +class LIBARDOUR_API LXVSTPlugin : public VSTPlugin { public: LXVSTPlugin (AudioEngine &, Session &, VSTHandle *); @@ -40,7 +40,7 @@ class LXVSTPlugin : public VSTPlugin std::string state_node_name () const { return "lxvst"; } }; -class LXVSTPluginInfo : public PluginInfo +class LIBARDOUR_API LXVSTPluginInfo : public PluginInfo { public: LXVSTPluginInfo (); diff --git a/libs/ardour/ardour/meter.h b/libs/ardour/ardour/meter.h index df1e381bb4..8ed1ade50d 100644 --- a/libs/ardour/ardour/meter.h +++ b/libs/ardour/ardour/meter.h @@ -20,6 +20,7 @@ #define __ardour_meter_h__ #include <vector> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/processor.h" #include "pbd/fastlog.h" @@ -35,7 +36,7 @@ class BufferSet; class ChanCount; class Session; -class Metering { +class LIBARDOUR_API Metering { public: static void update_meters (); static PBD::Signal0<void> Meter; @@ -47,7 +48,7 @@ class Metering { /** Meters peaks on the input and stores them for access. */ -class PeakMeter : public Processor { +class LIBARDOUR_API PeakMeter : public Processor { public: PeakMeter(Session& s, const std::string& name); ~PeakMeter(); diff --git a/libs/ardour/ardour/midi_automation_list_binder.h b/libs/ardour/ardour/midi_automation_list_binder.h index 89c6cdb90b..241c4e7320 100644 --- a/libs/ardour/ardour/midi_automation_list_binder.h +++ b/libs/ardour/ardour/midi_automation_list_binder.h @@ -27,7 +27,7 @@ class MidiSource; class AutomationList; /** A class for late-binding a MidiSource and a Parameter to an AutomationList */ -class MidiAutomationListBinder : public MementoCommandBinder<ARDOUR::AutomationList> +class LIBARDOUR_API MidiAutomationListBinder : public MementoCommandBinder<ARDOUR::AutomationList> { public: MidiAutomationListBinder (boost::shared_ptr<ARDOUR::MidiSource>, Evoral::Parameter); diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h index 781396a598..0a799c41ab 100644 --- a/libs/ardour/ardour/midi_buffer.h +++ b/libs/ardour/ardour/midi_buffer.h @@ -29,7 +29,7 @@ namespace ARDOUR { /** Buffer containing 8-bit unsigned char (MIDI) data. */ -class MidiBuffer : public Buffer +class LIBARDOUR_API MidiBuffer : public Buffer { public: typedef framepos_t TimeType; diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h index c2c3f5801f..01e8904736 100644 --- a/libs/ardour/ardour/midi_diskstream.h +++ b/libs/ardour/ardour/midi_diskstream.h @@ -52,7 +52,7 @@ class SMFSource; class Send; class Session; -class MidiDiskstream : public Diskstream +class LIBARDOUR_API MidiDiskstream : public Diskstream { public: MidiDiskstream (Session &, const string& name, Diskstream::Flag f = Recordable); diff --git a/libs/ardour/ardour/midi_model.h b/libs/ardour/ardour/midi_model.h index 3ecfca7d1c..dc1c7af0e9 100644 --- a/libs/ardour/ardour/midi_model.h +++ b/libs/ardour/ardour/midi_model.h @@ -27,10 +27,12 @@ #include <boost/utility.hpp> #include <glibmm/threads.h> #include "pbd/command.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/midi_buffer.h" #include "ardour/midi_ring_buffer.h" #include "ardour/automatable_sequence.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "evoral/Note.hpp" #include "evoral/Sequence.hpp" @@ -47,7 +49,7 @@ class MidiSource; * Because of this MIDI controllers and automatable controllers/widgets/etc * are easily interchangeable. */ -class MidiModel : public AutomatableSequence<Evoral::MusicalTime> { +class LIBARDOUR_API MidiModel : public AutomatableSequence<Evoral::MusicalTime> { public: typedef Evoral::MusicalTime TimeType; @@ -56,7 +58,7 @@ public: NoteMode note_mode() const { return (percussive() ? Percussive : Sustained); } void set_note_mode(NoteMode mode) { set_percussive(mode == Percussive); }; - class DiffCommand : public Command { + class LIBARDOUR_API DiffCommand : public Command { public: DiffCommand (boost::shared_ptr<MidiModel> m, const std::string& name); @@ -77,7 +79,7 @@ public: }; - class NoteDiffCommand : public DiffCommand { + class LIBARDOUR_API NoteDiffCommand : public DiffCommand { public: NoteDiffCommand (boost::shared_ptr<MidiModel> m, const std::string& name) : DiffCommand (m, name) {} @@ -143,7 +145,7 @@ public: }; /* Currently this class only supports changes of sys-ex time, but could be expanded */ - class SysExDiffCommand : public DiffCommand { + class LIBARDOUR_API SysExDiffCommand : public DiffCommand { public: SysExDiffCommand (boost::shared_ptr<MidiModel> m, const XMLNode& node); @@ -178,7 +180,7 @@ public: Change unmarshal_change (XMLNode *); }; - class PatchChangeDiffCommand : public DiffCommand { + class LIBARDOUR_API PatchChangeDiffCommand : public DiffCommand { public: PatchChangeDiffCommand (boost::shared_ptr<MidiModel>, const std::string &); PatchChangeDiffCommand (boost::shared_ptr<MidiModel>, const XMLNode &); @@ -220,6 +222,8 @@ public: uint8_t new_program; int new_bank; }; + + Change() : patch_id (-1) {} }; typedef std::list<Change> ChangeList; diff --git a/libs/ardour/ardour/midi_operator.h b/libs/ardour/ardour/midi_operator.h index c5def76384..00678a2831 100644 --- a/libs/ardour/ardour/midi_operator.h +++ b/libs/ardour/ardour/midi_operator.h @@ -32,7 +32,7 @@ namespace ARDOUR { class MidiModel; -class MidiOperator { +class LIBARDOUR_API MidiOperator { public: MidiOperator () {} virtual ~MidiOperator() {} diff --git a/libs/ardour/ardour/midi_patch_manager.h b/libs/ardour/ardour/midi_patch_manager.h index 77e63a2791..cd898aa00f 100644 --- a/libs/ardour/ardour/midi_patch_manager.h +++ b/libs/ardour/ardour/midi_patch_manager.h @@ -35,7 +35,7 @@ namespace MIDI namespace Name { -class MidiPatchManager : public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr +class LIBARDOUR_API MidiPatchManager : public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr { /// Singleton private: diff --git a/libs/ardour/ardour/midi_patch_search_path.h b/libs/ardour/ardour/midi_patch_search_path.h index 5d27823461..168e75af4a 100644 --- a/libs/ardour/ardour/midi_patch_search_path.h +++ b/libs/ardour/ardour/midi_patch_search_path.h @@ -24,15 +24,15 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * MIDI patch files ("*.midnam") aka MIDNAM files * - * If ARDOUR_MIDI_PATCH_PATH is defined then the SearchPath returned + * If ARDOUR_MIDI_PATCH_PATH is defined then the Searchpath returned * will contain only those directories specified in it, otherwise it will * contain the user and system directories which may contain control * surface plugins. */ - PBD::SearchPath midi_patch_search_path (); + PBD::Searchpath midi_patch_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/midi_playlist.h b/libs/ardour/ardour/midi_playlist.h index 543e1b353f..b118214c9e 100644 --- a/libs/ardour/ardour/midi_playlist.h +++ b/libs/ardour/ardour/midi_playlist.h @@ -32,12 +32,11 @@ namespace ARDOUR { class Session; -class Region; class MidiRegion; class Source; template<typename T> class MidiRingBuffer; -class MidiPlaylist : public ARDOUR::Playlist +class LIBARDOUR_API MidiPlaylist : public ARDOUR::Playlist { public: MidiPlaylist (Session&, const XMLNode&, bool hidden = false); diff --git a/libs/ardour/ardour/midi_playlist_source.h b/libs/ardour/ardour/midi_playlist_source.h index 5e3bb0de67..7a61f5aa02 100644 --- a/libs/ardour/ardour/midi_playlist_source.h +++ b/libs/ardour/ardour/midi_playlist_source.h @@ -32,7 +32,7 @@ namespace ARDOUR { class MidiPlaylist; -class MidiPlaylistSource : public MidiSource, public PlaylistSource { +class LIBARDOUR_API MidiPlaylistSource : public MidiSource, public PlaylistSource { public: virtual ~MidiPlaylistSource (); diff --git a/libs/ardour/ardour/midi_port.h b/libs/ardour/ardour/midi_port.h index 00617d90ec..cc9fee1b15 100644 --- a/libs/ardour/ardour/midi_port.h +++ b/libs/ardour/ardour/midi_port.h @@ -31,7 +31,7 @@ namespace ARDOUR { class MidiEngine; -class MidiPort : public Port { +class LIBARDOUR_API MidiPort : public Port { public: ~MidiPort(); diff --git a/libs/ardour/ardour/midi_region.h b/libs/ardour/ardour/midi_region.h index daca7a243d..b326bb30d8 100644 --- a/libs/ardour/ardour/midi_region.h +++ b/libs/ardour/ardour/midi_region.h @@ -34,9 +34,9 @@ namespace ARDOUR { property, but it allows us to signal changes to the MidiModel used by the MidiRegion */ - extern PBD::PropertyDescriptor<void*> midi_data; - extern PBD::PropertyDescriptor<Evoral::MusicalTime> start_beats; - extern PBD::PropertyDescriptor<Evoral::MusicalTime> length_beats; + LIBARDOUR_API extern PBD::PropertyDescriptor<void*> midi_data; + LIBARDOUR_API extern PBD::PropertyDescriptor<Evoral::MusicalTime> start_beats; + LIBARDOUR_API extern PBD::PropertyDescriptor<Evoral::MusicalTime> length_beats; } } @@ -53,9 +53,10 @@ class MidiFilter; class MidiModel; class MidiSource; class MidiStateTracker; + template<typename T> class MidiRingBuffer; -class MidiRegion : public Region +class LIBARDOUR_API MidiRegion : public Region { public: static void make_property_quarks (); diff --git a/libs/ardour/ardour/midi_ring_buffer.h b/libs/ardour/ardour/midi_ring_buffer.h index d5c9947b9a..78d14b9185 100644 --- a/libs/ardour/ardour/midi_ring_buffer.h +++ b/libs/ardour/ardour/midi_ring_buffer.h @@ -24,6 +24,7 @@ #include "evoral/EventRingBuffer.hpp" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/midi_state_tracker.h" @@ -40,7 +41,7 @@ class MidiBuffer; * [timestamp][type][size][size bytes of raw MIDI][timestamp][type][size](etc...) */ template<typename T> -class MidiRingBuffer : public Evoral::EventRingBuffer<T> { +class /*LIBARDOUR_API*/ MidiRingBuffer : public Evoral::EventRingBuffer<T> { public: /** @param size Size in bytes. */ diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h index a5aac8859b..ba50102ec9 100644 --- a/libs/ardour/ardour/midi_source.h +++ b/libs/ardour/ardour/midi_source.h @@ -36,10 +36,11 @@ namespace ARDOUR { class MidiStateTracker; class MidiModel; + template<typename T> class MidiRingBuffer; /** Source for MIDI data */ -class MidiSource : virtual public Source, public boost::enable_shared_from_this<MidiSource> +class LIBARDOUR_API MidiSource : virtual public Source, public boost::enable_shared_from_this<MidiSource> { public: typedef double TimeType; diff --git a/libs/ardour/ardour/midi_state_tracker.h b/libs/ardour/ardour/midi_state_tracker.h index 24d3ab73a1..046e77f38c 100644 --- a/libs/ardour/ardour/midi_state_tracker.h +++ b/libs/ardour/ardour/midi_state_tracker.h @@ -27,12 +27,13 @@ template <typename T> class EventSink; } namespace ARDOUR { + class MidiSource; /** Tracks played notes, so they can be resolved in potential stuck note * situations (e.g. looping, transport stop, etc). */ -class MidiStateTracker +class LIBARDOUR_API MidiStateTracker { public: MidiStateTracker(); diff --git a/libs/ardour/ardour/midi_stretch.h b/libs/ardour/ardour/midi_stretch.h index 42b201b55a..b6f6ac5073 100644 --- a/libs/ardour/ardour/midi_stretch.h +++ b/libs/ardour/ardour/midi_stretch.h @@ -25,7 +25,7 @@ namespace ARDOUR { -class MidiStretch : public Filter { +class LIBARDOUR_API MidiStretch : public Filter { public: MidiStretch (ARDOUR::Session&, const TimeFXRequest&); ~MidiStretch (); diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h index 3b75c0a51b..cf6d3f7b64 100644 --- a/libs/ardour/ardour/midi_track.h +++ b/libs/ardour/ardour/midi_track.h @@ -20,6 +20,8 @@ #ifndef __ardour_midi_track_h__ #define __ardour_midi_track_h__ +#include "pbd/ffs.h" + #include "ardour/track.h" #include "ardour/midi_ring_buffer.h" @@ -33,7 +35,7 @@ class RouteGroup; class SMFSource; class Session; -class MidiTrack : public Track +class LIBARDOUR_API MidiTrack : public Track { public: MidiTrack (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal); @@ -183,7 +185,7 @@ private: /* if mode is ForceChannel, force mask to the lowest set channel or 1 if no * channels are set. */ -#define force_mask(mode,mask) (((mode) == ForceChannel) ? (((mask) ? (1<<(ffs((mask))-1)) : 1)) : mask) +#define force_mask(mode,mask) (((mode) == ForceChannel) ? (((mask) ? (1<<(PBD::ffs((mask))-1)) : 1)) : mask) void _set_playback_channel_mode(ChannelMode mode, uint16_t mask) { mask = force_mask (mode, mask); diff --git a/libs/ardour/ardour/midi_ui.h b/libs/ardour/ardour/midi_ui.h index 9e46f226f7..85a8a15e21 100644 --- a/libs/ardour/ardour/midi_ui.h +++ b/libs/ardour/ardour/midi_ui.h @@ -22,6 +22,7 @@ #include <list> +#define ABSTRACT_UI_EXPORTS #include "pbd/abstract_ui.h" #include "pbd/signals.h" #include "pbd/stacktrace.h" @@ -37,13 +38,13 @@ class AsyncMIDIPort; certain types of requests to the MIDI UI */ -struct MidiUIRequest : public BaseUI::BaseRequestObject { +struct LIBARDOUR_API MidiUIRequest : public BaseUI::BaseRequestObject { public: MidiUIRequest () { } ~MidiUIRequest() { } }; -class MidiControlUI : public AbstractUI<MidiUIRequest> +class LIBARDOUR_API MidiControlUI : public AbstractUI<MidiUIRequest> { public: MidiControlUI (Session& s); diff --git a/libs/ardour/ardour/midiport_manager.h b/libs/ardour/ardour/midiport_manager.h index 9f93c43d5a..b5b46e8510 100644 --- a/libs/ardour/ardour/midiport_manager.h +++ b/libs/ardour/ardour/midiport_manager.h @@ -29,6 +29,7 @@ #include "midi++/types.h" #include "midi++/port.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -36,7 +37,7 @@ namespace ARDOUR { class MidiPort; class Port; -class MidiPortManager { +class LIBARDOUR_API MidiPortManager { public: MidiPortManager(); virtual ~MidiPortManager (); diff --git a/libs/ardour/ardour/mix.h b/libs/ardour/ardour/mix.h index 1c3fb6e5c4..3cd9a3e60f 100644 --- a/libs/ardour/ardour/mix.h +++ b/libs/ardour/ardour/mix.h @@ -19,6 +19,7 @@ #ifndef __ardour_mix_h__ #define __ardour_mix_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" @@ -26,39 +27,39 @@ extern "C" { /* SSE functions */ -float x86_sse_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); -void x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); -void x86_sse_mix_buffers_with_gain(ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); -void x86_sse_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); + LIBARDOUR_API float x86_sse_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); + LIBARDOUR_API void x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); + LIBARDOUR_API void x86_sse_mix_buffers_with_gain(ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); + LIBARDOUR_API void x86_sse_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); } -void x86_sse_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max); +LIBARDOUR_API void x86_sse_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max); /* debug wrappers for SSE functions */ -float debug_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); -void debug_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); -void debug_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); -void debug_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); +LIBARDOUR_API float debug_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); +LIBARDOUR_API void debug_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); +LIBARDOUR_API void debug_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); +LIBARDOUR_API void debug_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); #endif #if defined (__APPLE__) -float veclib_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); -void veclib_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max); -void veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); -void veclib_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); -void veclib_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); +LIBARDOUR_API float veclib_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); +LIBARDOUR_API void veclib_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max); +LIBARDOUR_API void veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); +LIBARDOUR_API void veclib_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); +LIBARDOUR_API void veclib_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); #endif /* non-optimized functions */ -float default_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); -void default_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max); -void default_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); -void default_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); -void default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); +LIBARDOUR_API float default_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); +LIBARDOUR_API void default_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max); +LIBARDOUR_API void default_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); +LIBARDOUR_API void default_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); +LIBARDOUR_API void default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); #endif /* __ardour_mix_h__ */ diff --git a/libs/ardour/ardour/monitor_processor.h b/libs/ardour/ardour/monitor_processor.h index 64d3b86bfb..33b3e9c366 100644 --- a/libs/ardour/ardour/monitor_processor.h +++ b/libs/ardour/ardour/monitor_processor.h @@ -28,6 +28,7 @@ #include "pbd/compose.h" #include "pbd/controllable.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/processor.h" @@ -38,7 +39,7 @@ namespace ARDOUR { class Session; template<typename T> -class MPControl : public PBD::Controllable { +class /*LIBARDOUR_API*/ MPControl : public PBD::Controllable { public: MPControl (T initial, const std::string& name, PBD::Controllable::Flag flag, float lower = 0.0f, float upper = 1.0f) @@ -104,7 +105,7 @@ protected: T _upper; }; -class MonitorProcessor : public Processor +class LIBARDOUR_API MonitorProcessor : public Processor { public: MonitorProcessor (Session&); diff --git a/libs/ardour/ardour/movable.h b/libs/ardour/ardour/movable.h index d68d7620ba..df63987f4f 100644 --- a/libs/ardour/ardour/movable.h +++ b/libs/ardour/ardour/movable.h @@ -22,7 +22,7 @@ namespace ARDOUR { -class Movable { +class LIBARDOUR_API Movable { public: Movable() {} diff --git a/libs/ardour/ardour/msvc_libardour.h b/libs/ardour/ardour/msvc_libardour.h new file mode 100644 index 0000000000..f8edcdd3cb --- /dev/null +++ b/libs/ardour/ardour/msvc_libardour.h @@ -0,0 +1,73 @@ +/* + Copyright (C) 2009 John Emmas + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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. + +*/ +#ifndef __msvc_libardour_h__ +#define __msvc_libardour_h__ + +#include <ardour/libardour_visibility.h> +#include <limits.h> + +#ifndef _MAX_PATH +#define _MAX_PATH 260 +#endif +#ifndef PATH_MAX +#define PATH_MAX _MAX_PATH +#endif + +#define LIBARDOUR_APICALLTYPE __cdecl + +namespace ARDOUR { + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +// LIBARDOUR_API char* LIBARDOUR_APICALLTYPE placeholder_for_non_msvc_specific_function(s); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +} // namespace ARDOUR + +#ifdef COMPILER_MSVC +#include <rpc.h> +//#include <io.h> + +#ifndef __THROW +#define __THROW throw() +#endif +#include <ardourext/sys/time.h> + +namespace ARDOUR { + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +LIBARDOUR_API int LIBARDOUR_APICALLTYPE symlink(const char *dest, const char *shortcut, const char *working_directory = 0); +LIBARDOUR_API int LIBARDOUR_APICALLTYPE readlink(const char *__restrict shortcut, char *__restrict buf, size_t bufsize); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +} // namespace ARDOUR + +#endif // COMPILER_MSVC +#endif // __mavc_libardour_h__ diff --git a/libs/ardour/ardour/mtdm.h b/libs/ardour/ardour/mtdm.h index b46e53c0a2..b57df7254a 100644 --- a/libs/ardour/ardour/mtdm.h +++ b/libs/ardour/ardour/mtdm.h @@ -21,7 +21,9 @@ #include <stddef.h> -class MTDM +#include "ardour/libardour_visibility.h" + +class LIBARDOUR_API MTDM { public: diff --git a/libs/ardour/ardour/mute_master.h b/libs/ardour/ardour/mute_master.h index 460c7bf48b..8a83352a5b 100644 --- a/libs/ardour/ardour/mute_master.h +++ b/libs/ardour/ardour/mute_master.h @@ -31,7 +31,7 @@ namespace ARDOUR { class Session; -class MuteMaster : public SessionHandleRef, public PBD::Stateful +class LIBARDOUR_API MuteMaster : public SessionHandleRef, public PBD::Stateful { public: /** deliveries to mute when the channel is "muted" */ diff --git a/libs/ardour/ardour/onset_detector.h b/libs/ardour/ardour/onset_detector.h index 6604a3a362..40eac9b465 100644 --- a/libs/ardour/ardour/onset_detector.h +++ b/libs/ardour/ardour/onset_detector.h @@ -27,7 +27,7 @@ namespace ARDOUR { class AudioSource; class Session; -class OnsetDetector : public AudioAnalyser +class LIBARDOUR_API OnsetDetector : public AudioAnalyser { public: OnsetDetector (float sample_rate); diff --git a/libs/ardour/ardour/operations.h b/libs/ardour/ardour/operations.h index dd6329d7b9..d113c621c2 100644 --- a/libs/ardour/ardour/operations.h +++ b/libs/ardour/ardour/operations.h @@ -17,6 +17,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "ardour/libardour_visibility.h" + /** These are GQuarks for a subset of UI operations. We use these * so that the undo system can be queried to find out what operations * are currently in progress, by calling Session::current_operations(). @@ -27,19 +29,19 @@ namespace Operations { - extern GQuark capture; - extern GQuark paste; - extern GQuark duplicate_region; - extern GQuark insert_file; - extern GQuark insert_region; - extern GQuark drag_region_brush; - extern GQuark region_drag; - extern GQuark selection_grab; - extern GQuark region_fill; - extern GQuark fill_selection; - extern GQuark create_region; - extern GQuark region_copy; - extern GQuark fixed_time_region_copy; + LIBARDOUR_API extern GQuark capture; + LIBARDOUR_API extern GQuark paste; + LIBARDOUR_API extern GQuark duplicate_region; + LIBARDOUR_API extern GQuark insert_file; + LIBARDOUR_API extern GQuark insert_region; + LIBARDOUR_API extern GQuark drag_region_brush; + LIBARDOUR_API extern GQuark region_drag; + LIBARDOUR_API extern GQuark selection_grab; + LIBARDOUR_API extern GQuark region_fill; + LIBARDOUR_API extern GQuark fill_selection; + LIBARDOUR_API extern GQuark create_region; + LIBARDOUR_API extern GQuark region_copy; + LIBARDOUR_API extern GQuark fixed_time_region_copy; }; diff --git a/libs/ardour/ardour/pan_controllable.h b/libs/ardour/ardour/pan_controllable.h index be0c9260c0..9abbec42ab 100644 --- a/libs/ardour/ardour/pan_controllable.h +++ b/libs/ardour/ardour/pan_controllable.h @@ -34,7 +34,7 @@ namespace ARDOUR { class Session; class Pannable; -class PanControllable : public AutomationControl +class LIBARDOUR_API PanControllable : public AutomationControl { public: PanControllable (Session& s, std::string name, Pannable* o, Evoral::Parameter param) diff --git a/libs/ardour/ardour/pannable.h b/libs/ardour/ardour/pannable.h index 0d5200b685..62c9cd123b 100644 --- a/libs/ardour/ardour/pannable.h +++ b/libs/ardour/ardour/pannable.h @@ -36,7 +36,7 @@ class Session; class AutomationControl; class Panner; -class Pannable : public PBD::Stateful, public Automatable, public SessionHandleRef +class LIBARDOUR_API Pannable : public PBD::Stateful, public Automatable, public SessionHandleRef { public: Pannable (Session& s); diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h index 18e3e8045a..211ad0ca8e 100644 --- a/libs/ardour/ardour/panner.h +++ b/libs/ardour/ardour/panner.h @@ -30,10 +30,23 @@ #include "pbd/signals.h" #include "pbd/stateful.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/automation_control.h" #include "ardour/automatable.h" + +/* This section is for actual panners to use. They will include this file, + * declare ARDOURPANNER_DLL_EXPORTS during compilation, and ... voila. + */ + +#ifdef ARDOURPANNER_DLL_EXPORTS // defined if we are building a panner implementation + #define ARDOURPANNER_API LIBARDOUR_DLL_EXPORT + #else + #define ARDOURPANNER_API LIBARDOUR_DLL_IMPORT + #endif +#define ARDOURPANNER_LOCAL LIBARDOUR_DLL_LOCAL + namespace ARDOUR { class Session; @@ -42,7 +55,7 @@ class BufferSet; class AudioBuffer; class Speakers; -class Panner : public PBD::Stateful, public PBD::ScopedConnectionList +class LIBARDOUR_API Panner : public PBD::Stateful, public PBD::ScopedConnectionList { public: Panner (boost::shared_ptr<Pannable>); @@ -175,7 +188,7 @@ protected: } // namespace extern "C" { -struct PanPluginDescriptor { +struct LIBARDOUR_API PanPluginDescriptor { std::string name; std::string panner_uri; std::string gui_uri; diff --git a/libs/ardour/ardour/panner_manager.h b/libs/ardour/ardour/panner_manager.h index 4a29e1c36b..73d667424f 100644 --- a/libs/ardour/ardour/panner_manager.h +++ b/libs/ardour/ardour/panner_manager.h @@ -20,7 +20,10 @@ #ifndef __ardour_panner_manager_h__ #define __ardour_panner_manager_h__ -#include <dlfcn.h> +#include <map> +#include <string> +#include <glibmm/module.h> + #include "ardour/panner.h" #include "ardour/session_handle.h" @@ -28,21 +31,22 @@ namespace ARDOUR { typedef std::map<std::string,std::string> PannerUriMap; -struct PannerInfo { +struct LIBARDOUR_API PannerInfo { + PanPluginDescriptor descriptor; - void* module; + Glib::Module* module; - PannerInfo (PanPluginDescriptor& d, void* handle) + PannerInfo (PanPluginDescriptor& d, Glib::Module* m) : descriptor (d) - , module (handle) + , module (m) {} ~PannerInfo () { - dlclose (module); + delete module; } }; -class PannerManager : public ARDOUR::SessionHandlePtr +class LIBARDOUR_API PannerManager : public ARDOUR::SessionHandlePtr { public: ~PannerManager (); diff --git a/libs/ardour/ardour/panner_search_path.h b/libs/ardour/ardour/panner_search_path.h index 889b9efb23..23004223b4 100644 --- a/libs/ardour/ardour/panner_search_path.h +++ b/libs/ardour/ardour/panner_search_path.h @@ -24,15 +24,15 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * panner plugins. * - * If ARDOUR_PANNER_PATH is defined then the SearchPath returned + * If ARDOUR_PANNER_PATH is defined then the Searchpath returned * will contain only those directories specified in it, otherwise it will * contain the user and system directories which may contain control * surface plugins. */ - PBD::SearchPath panner_search_path (); + PBD::Searchpath panner_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/panner_shell.h b/libs/ardour/ardour/panner_shell.h index da4e6e3bee..f344afd54a 100644 --- a/libs/ardour/ardour/panner_shell.h +++ b/libs/ardour/ardour/panner_shell.h @@ -30,6 +30,7 @@ #include "pbd/cartesian.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/session_object.h" @@ -46,7 +47,7 @@ class Pannable; /** Class to manage panning by instantiating and controlling * an appropriate Panner object for a given in/out configuration. */ -class PannerShell : public SessionObject +class LIBARDOUR_API PannerShell : public SessionObject { public: PannerShell (std::string name, Session&, boost::shared_ptr<Pannable>, bool is_send = false); diff --git a/libs/ardour/ardour/peak.h b/libs/ardour/ardour/peak.h index ab99889dd3..9c871a9e35 100644 --- a/libs/ardour/ardour/peak.h +++ b/libs/ardour/ardour/peak.h @@ -21,6 +21,7 @@ #define __ardour_peak_h__ #include <cmath> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" diff --git a/libs/ardour/ardour/pi_controller.h b/libs/ardour/ardour/pi_controller.h index bcbc81701a..8daf7a7068 100644 --- a/libs/ardour/ardour/pi_controller.h +++ b/libs/ardour/ardour/pi_controller.h @@ -19,9 +19,10 @@ #ifndef __libardour_pi_controller__ #define __libardour_pi_controller__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" -class PIController { +class LIBARDOUR_API PIController { public: PIController (double resample_factor, int fir_size); ~PIController(); @@ -54,7 +55,7 @@ public: #define ESTIMATOR_SIZE 16 -class PIChaser { +class LIBARDOUR_API PIChaser { public: PIChaser(); ~PIChaser(); diff --git a/libs/ardour/ardour/pitch.h b/libs/ardour/ardour/pitch.h index 961609938c..4c8db5fb80 100644 --- a/libs/ardour/ardour/pitch.h +++ b/libs/ardour/ardour/pitch.h @@ -37,7 +37,7 @@ namespace ARDOUR { namespace ARDOUR { -class Pitch : public RBEffect { +class LIBARDOUR_API Pitch : public RBEffect { public: Pitch (ARDOUR::Session&, TimeFXRequest&); ~Pitch () {} @@ -49,7 +49,7 @@ class Pitch : public RBEffect { namespace ARDOUR { -class Pitch : public Filter { +class LIBARDOUR_API Pitch : public Filter { public: Pitch (ARDOUR::Session&, TimeFXRequest&); ~Pitch () {} diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h index 754e48cc25..5629a04629 100644 --- a/libs/ardour/ardour/playlist.h +++ b/libs/ardour/ardour/playlist.h @@ -41,13 +41,13 @@ #include "evoral/types.hpp" #include "ardour/ardour.h" +#include "ardour/region.h" #include "ardour/session_object.h" #include "ardour/data_type.h" namespace ARDOUR { class Session; -class Region; class Playlist; class Crossfade; @@ -55,10 +55,10 @@ namespace Properties { /* fake the type, since regions are handled by SequenceProperty which doesn't care about such things. */ - extern PBD::PropertyDescriptor<bool> regions; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> regions; } -class RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_ptr<Region> > > +class LIBARDOUR_API RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_ptr<Region> > > { public: RegionListProperty (Playlist&); @@ -78,7 +78,7 @@ class RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_ Playlist& _playlist; }; -class Playlist : public SessionObject , public boost::enable_shared_from_this<Playlist> +class LIBARDOUR_API Playlist : public SessionObject , public boost::enable_shared_from_this<Playlist> { public: static void make_property_quarks (); diff --git a/libs/ardour/ardour/playlist_factory.h b/libs/ardour/ardour/playlist_factory.h index 8b5d9d6a23..505836234b 100644 --- a/libs/ardour/ardour/playlist_factory.h +++ b/libs/ardour/ardour/playlist_factory.h @@ -28,7 +28,7 @@ namespace ARDOUR { class Session; -class PlaylistFactory { +class LIBARDOUR_API PlaylistFactory { public: static PBD::Signal2<void,boost::shared_ptr<Playlist>, bool> PlaylistCreated; diff --git a/libs/ardour/ardour/playlist_source.h b/libs/ardour/ardour/playlist_source.h index 71802fddb6..55cc1f6b59 100644 --- a/libs/ardour/ardour/playlist_source.h +++ b/libs/ardour/ardour/playlist_source.h @@ -31,7 +31,7 @@ namespace ARDOUR { class Playlist; -class PlaylistSource : virtual public Source { +class LIBARDOUR_API PlaylistSource : virtual public Source { public: virtual ~PlaylistSource (); diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h index 1bc7dc5afd..a69b87efbd 100644 --- a/libs/ardour/ardour/plugin.h +++ b/libs/ardour/ardour/plugin.h @@ -32,6 +32,7 @@ #include "ardour/cycles.h" #include "ardour/latent.h" #include "ardour/plugin_insert.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/midi_state_tracker.h" @@ -49,7 +50,7 @@ class Plugin; typedef boost::shared_ptr<Plugin> PluginPtr; -class PluginInfo { +class LIBARDOUR_API PluginInfo { public: PluginInfo () { } virtual ~PluginInfo () { } @@ -87,7 +88,7 @@ class PluginInfo { typedef boost::shared_ptr<PluginInfo> PluginInfoPtr; typedef std::list<PluginInfoPtr> PluginInfoList; -class Plugin : public PBD::StatefulDestructible, public Latent +class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent { public: Plugin (ARDOUR::AudioEngine&, ARDOUR::Session&); diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index 7d7e2e7269..627c847513 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -26,6 +26,7 @@ #include <boost/weak_ptr.hpp> #include "ardour/ardour.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/processor.h" #include "ardour/automation_control.h" @@ -40,7 +41,7 @@ class Plugin; /** Plugin inserts: send data through a plugin */ -class PluginInsert : public Processor +class LIBARDOUR_API PluginInsert : public Processor { public: PluginInsert (Session&, boost::shared_ptr<Plugin> = boost::shared_ptr<Plugin>()); diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h index a7a5703690..bee1c68704 100644 --- a/libs/ardour/ardour/plugin_manager.h +++ b/libs/ardour/ardour/plugin_manager.h @@ -30,6 +30,7 @@ #include <set> #include <boost/utility.hpp> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/plugin.h" @@ -37,7 +38,7 @@ namespace ARDOUR { class Plugin; -class PluginManager : public boost::noncopyable { +class LIBARDOUR_API PluginManager : public boost::noncopyable { public: static PluginManager& instance(); @@ -51,7 +52,6 @@ class PluginManager : public boost::noncopyable { void refresh (); - int add_ladspa_directory (std::string dirpath); int add_windows_vst_directory (std::string dirpath); int add_lxvst_directory (std::string dirpath); @@ -103,7 +103,6 @@ class PluginManager : public boost::noncopyable { std::map<uint32_t, std::string> rdf_type; - std::string ladspa_path; std::string windows_vst_path; std::string lxvst_path; @@ -127,7 +126,6 @@ class PluginManager : public boost::noncopyable { int lxvst_discover_from_path (std::string path); int lxvst_discover (std::string path); - int ladspa_discover_from_path (std::string path); int ladspa_discover (std::string path); std::string get_ladspa_category (uint32_t id); diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h index 77bf2b6f71..5fb9a7efc3 100644 --- a/libs/ardour/ardour/port.h +++ b/libs/ardour/ardour/port.h @@ -31,6 +31,7 @@ #include "ardour/data_type.h" #include "ardour/port_engine.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -38,7 +39,7 @@ namespace ARDOUR { class AudioEngine; class Buffer; -class Port : public boost::noncopyable +class LIBARDOUR_API Port : public boost::noncopyable { public: virtual ~Port (); diff --git a/libs/ardour/ardour/port_engine.h b/libs/ardour/ardour/port_engine.h index 68f8fe1232..62996b7cdf 100644 --- a/libs/ardour/ardour/port_engine.h +++ b/libs/ardour/ardour/port_engine.h @@ -26,6 +26,7 @@ #include <stdint.h> #include "ardour/data_type.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -74,7 +75,7 @@ class PortManager; * documentation, on which this entire object is based. */ -class PortEngine { +class LIBARDOUR_API PortEngine { public: PortEngine (PortManager& pm) : manager (pm) {} virtual ~PortEngine() {} diff --git a/libs/ardour/ardour/port_insert.h b/libs/ardour/ardour/port_insert.h index abd9fb73cc..327080984a 100644 --- a/libs/ardour/ardour/port_insert.h +++ b/libs/ardour/ardour/port_insert.h @@ -26,6 +26,7 @@ #include "ardour/ardour.h" #include "ardour/io_processor.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" class XMLNode; @@ -41,7 +42,7 @@ class Pannable; /** Port inserts: send output to a Jack port, pick up input at a Jack port */ -class PortInsert : public IOProcessor +class LIBARDOUR_API PortInsert : public IOProcessor { public: PortInsert (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster> mm); diff --git a/libs/ardour/ardour/port_manager.h b/libs/ardour/ardour/port_manager.h index ba15142d83..b36e98fe64 100644 --- a/libs/ardour/ardour/port_manager.h +++ b/libs/ardour/ardour/port_manager.h @@ -40,7 +40,7 @@ namespace ARDOUR { class PortEngine; class AudioBackend; -class PortManager +class LIBARDOUR_API PortManager { public: typedef std::map<std::string,boost::shared_ptr<Port> > Ports; diff --git a/libs/ardour/ardour/port_set.h b/libs/ardour/ardour/port_set.h index 690875cd86..cd76f75ee3 100644 --- a/libs/ardour/ardour/port_set.h +++ b/libs/ardour/ardour/port_set.h @@ -39,7 +39,7 @@ class MidiPort; * and once in a vector of all port (_all_ports). This is to speed up the * fairly common case of iterating over all ports. */ -class PortSet : public boost::noncopyable { +class LIBARDOUR_API PortSet : public boost::noncopyable { public: PortSet(); diff --git a/libs/ardour/ardour/process_thread.h b/libs/ardour/ardour/process_thread.h index f96595fbbf..779fdaea2d 100644 --- a/libs/ardour/ardour/process_thread.h +++ b/libs/ardour/ardour/process_thread.h @@ -23,6 +23,7 @@ #include <glibmm/threads.h> #include "ardour/chan_count.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -30,7 +31,7 @@ namespace ARDOUR { class ThreadBuffers; class BufferSet; -class ProcessThread +class LIBARDOUR_API ProcessThread { public: ProcessThread (); diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index 18f13dbc78..85d466a169 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -30,6 +30,7 @@ #include "ardour/buffer_set.h" #include "ardour/latent.h" #include "ardour/session_object.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/automatable.h" @@ -41,7 +42,7 @@ class Session; class Route; /** A mixer strip element - plugin, send, meter, etc */ -class Processor : public SessionObject, public Automatable, public Latent +class LIBARDOUR_API Processor : public SessionObject, public Automatable, public Latent { public: static const std::string state_node_name; diff --git a/libs/ardour/ardour/profile.h b/libs/ardour/ardour/profile.h index 5d4e611833..9346138e00 100644 --- a/libs/ardour/ardour/profile.h +++ b/libs/ardour/ardour/profile.h @@ -23,9 +23,11 @@ #include <boost/dynamic_bitset.hpp> #include <stdint.h> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class RuntimeProfile { +class LIBARDOUR_API RuntimeProfile { public: enum Element { SmallScreen, @@ -51,7 +53,7 @@ private: }; -extern RuntimeProfile* Profile; +LIBARDOUR_API extern RuntimeProfile* Profile; }; // namespace ARDOUR diff --git a/libs/ardour/ardour/progress.h b/libs/ardour/ardour/progress.h index 10b7d75960..79043a31ee 100644 --- a/libs/ardour/ardour/progress.h +++ b/libs/ardour/ardour/progress.h @@ -22,10 +22,12 @@ #include <list> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** A class to handle reporting of progress of something */ -class Progress +class LIBARDOUR_API Progress { public: Progress (); diff --git a/libs/ardour/ardour/proxy_controllable.h b/libs/ardour/ardour/proxy_controllable.h index 169f60f9f5..066f2aac81 100644 --- a/libs/ardour/ardour/proxy_controllable.h +++ b/libs/ardour/ardour/proxy_controllable.h @@ -30,7 +30,7 @@ namespace ARDOUR { so that it can be used like a regular Controllable, bound to MIDI, OSC etc. */ -class ProxyControllable : public PBD::Controllable { +class LIBARDOUR_API ProxyControllable : public PBD::Controllable { public: ProxyControllable (const std::string& name, PBD::Controllable::Flag flags, boost::function1<bool,double> setter, diff --git a/libs/ardour/ardour/public_diskstream.h b/libs/ardour/ardour/public_diskstream.h index 125e1a21ce..5b5cd48231 100644 --- a/libs/ardour/ardour/public_diskstream.h +++ b/libs/ardour/ardour/public_diskstream.h @@ -27,7 +27,7 @@ class Source; class Location; /** Public interface to a Diskstream */ -class PublicDiskstream +class LIBARDOUR_API PublicDiskstream { public: virtual ~PublicDiskstream() {} diff --git a/libs/ardour/ardour/quantize.h b/libs/ardour/ardour/quantize.h index e56927767e..c41d172177 100644 --- a/libs/ardour/ardour/quantize.h +++ b/libs/ardour/ardour/quantize.h @@ -21,6 +21,7 @@ #ifndef __ardour_quantize_h__ #define __ardour_quantize_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/midi_operator.h" @@ -28,7 +29,7 @@ namespace ARDOUR { class Session; -class Quantize : public MidiOperator { +class LIBARDOUR_API Quantize : public MidiOperator { public: Quantize (ARDOUR::Session&, bool snap_start, bool snap_end, double start_grid, double end_grid, diff --git a/libs/ardour/ardour/rb_effect.h b/libs/ardour/ardour/rb_effect.h index 1d36f31332..6c10278fb3 100644 --- a/libs/ardour/ardour/rb_effect.h +++ b/libs/ardour/ardour/rb_effect.h @@ -27,7 +27,7 @@ namespace ARDOUR { class AudioRegion; -class RBEffect : public Filter { +class LIBARDOUR_API RBEffect : public Filter { public: RBEffect (ARDOUR::Session&, TimeFXRequest&); ~RBEffect (); diff --git a/libs/ardour/ardour/rc_configuration.h b/libs/ardour/ardour/rc_configuration.h index e2f68477a1..d85c723ff8 100644 --- a/libs/ardour/ardour/rc_configuration.h +++ b/libs/ardour/ardour/rc_configuration.h @@ -23,6 +23,7 @@ #include <map> #include <string> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" #include "ardour/configuration.h" @@ -31,7 +32,7 @@ class XMLNode; namespace ARDOUR { -class RCConfiguration : public Configuration +class LIBARDOUR_API RCConfiguration : public Configuration { public: RCConfiguration(); @@ -83,8 +84,8 @@ class RCConfiguration : public Configuration }; /* XXX: rename this */ -extern RCConfiguration *Config; -extern gain_t speed_quietning; /* see comment in configuration.cc */ +LIBARDOUR_API extern RCConfiguration *Config; +LIBARDOUR_API extern gain_t speed_quietning; /* see comment in configuration.cc */ } // namespace ARDOUR diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h index 3c74f067ae..19500ccf74 100644 --- a/libs/ardour/ardour/rc_configuration_vars.h +++ b/libs/ardour/ardour/rc_configuration_vars.h @@ -158,6 +158,7 @@ CONFIG_VARIABLE (MeterLineUp, meter_line_up_din, "meter-line-up-din", MeteringLi CONFIG_VARIABLE (float, meter_peak, "meter-peak", 0.0f) CONFIG_VARIABLE (bool, meter_style_led, "meter-style-led", true) CONFIG_VARIABLE (bool, show_editor_meter, "show-editor-meter", true) +CONFIG_VARIABLE (double, waveform_clip_level, "waveform-clip-level", -0.0933967) /* units of dB */ /* miscellany */ @@ -192,7 +193,6 @@ CONFIG_VARIABLE (WaveformScale, waveform_scale, "waveform-scale", Linear) CONFIG_VARIABLE (WaveformShape, waveform_shape, "waveform-shape", Traditional) CONFIG_VARIABLE (bool, allow_special_bus_removal, "allow-special-bus-removal", false) CONFIG_VARIABLE (int32_t, processor_usage, "processor-usage", -1) -CONFIG_VARIABLE (bool, color_regions_using_track_color, "color-regions-using-track-color", false) CONFIG_VARIABLE (gain_t, max_gain, "max-gain", 2.0) /* +6.0dB */ CONFIG_VARIABLE (bool, update_editor_during_summary_drag, "update-editor-during-summary-drag", true) CONFIG_VARIABLE (bool, never_display_periodic_midi, "never-display-periodic-midi", true) diff --git a/libs/ardour/ardour/readable.h b/libs/ardour/ardour/readable.h index d184902deb..18190436df 100644 --- a/libs/ardour/ardour/readable.h +++ b/libs/ardour/ardour/readable.h @@ -20,11 +20,12 @@ #ifndef __ardour_readable_h__ #define __ardour_readable_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { -class Readable { +class LIBARDOUR_API Readable { public: Readable () {} virtual ~Readable() {} diff --git a/libs/ardour/ardour/recent_sessions.h b/libs/ardour/ardour/recent_sessions.h index 2951496849..03134da6d2 100644 --- a/libs/ardour/ardour/recent_sessions.h +++ b/libs/ardour/ardour/recent_sessions.h @@ -24,13 +24,15 @@ #include <utility> #include <string> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { typedef std::deque<std::pair<std::string,std::string> > RecentSessions; - int read_recent_sessions (RecentSessions& rs); - int store_recent_sessions (std::string name, std::string path); - int write_recent_sessions (RecentSessions& rs); - int remove_recent_sessions (const std::string& path); + LIBARDOUR_API int read_recent_sessions (RecentSessions& rs); + LIBARDOUR_API int store_recent_sessions (std::string name, std::string path); + LIBARDOUR_API int write_recent_sessions (RecentSessions& rs); + LIBARDOUR_API int remove_recent_sessions (const std::string& path); }; // namespace ARDOUR #endif // __ardour_recent_sessions_h__ diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h index 3ee829ed12..a66047a02a 100644 --- a/libs/ardour/ardour/region.h +++ b/libs/ardour/ardour/region.h @@ -38,35 +38,34 @@ class XMLNode; - namespace ARDOUR { namespace Properties { - extern PBD::PropertyDescriptor<bool> muted; - extern PBD::PropertyDescriptor<bool> opaque; - extern PBD::PropertyDescriptor<bool> locked; - extern PBD::PropertyDescriptor<bool> video_locked; - extern PBD::PropertyDescriptor<bool> automatic; - extern PBD::PropertyDescriptor<bool> whole_file; - extern PBD::PropertyDescriptor<bool> import; - extern PBD::PropertyDescriptor<bool> external; - extern PBD::PropertyDescriptor<bool> sync_marked; - extern PBD::PropertyDescriptor<bool> left_of_split; - extern PBD::PropertyDescriptor<bool> right_of_split; - extern PBD::PropertyDescriptor<bool> hidden; - extern PBD::PropertyDescriptor<bool> position_locked; - extern PBD::PropertyDescriptor<bool> valid_transients; - extern PBD::PropertyDescriptor<framepos_t> start; - extern PBD::PropertyDescriptor<framecnt_t> length; - extern PBD::PropertyDescriptor<framepos_t> position; - extern PBD::PropertyDescriptor<framecnt_t> sync_position; - extern PBD::PropertyDescriptor<layer_t> layer; - extern PBD::PropertyDescriptor<framepos_t> ancestral_start; - extern PBD::PropertyDescriptor<framecnt_t> ancestral_length; - extern PBD::PropertyDescriptor<float> stretch; - extern PBD::PropertyDescriptor<float> shift; - extern PBD::PropertyDescriptor<PositionLockStyle> position_lock_style; - extern PBD::PropertyDescriptor<uint64_t> layering_index; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> muted; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> opaque; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> locked; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> video_locked; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> automatic; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> whole_file; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> import; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> external; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> sync_marked; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> left_of_split; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> right_of_split; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> hidden; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> position_locked; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> valid_transients; + LIBARDOUR_API extern PBD::PropertyDescriptor<framepos_t> start; + LIBARDOUR_API extern PBD::PropertyDescriptor<framecnt_t> length; + LIBARDOUR_API extern PBD::PropertyDescriptor<framepos_t> position; + LIBARDOUR_API extern PBD::PropertyDescriptor<framecnt_t> sync_position; + LIBARDOUR_API extern PBD::PropertyDescriptor<layer_t> layer; + LIBARDOUR_API extern PBD::PropertyDescriptor<framepos_t> ancestral_start; + LIBARDOUR_API extern PBD::PropertyDescriptor<framecnt_t> ancestral_length; + LIBARDOUR_API extern PBD::PropertyDescriptor<float> stretch; + LIBARDOUR_API extern PBD::PropertyDescriptor<float> shift; + LIBARDOUR_API extern PBD::PropertyDescriptor<PositionLockStyle> position_lock_style; + LIBARDOUR_API extern PBD::PropertyDescriptor<uint64_t> layering_index; }; class Playlist; @@ -74,14 +73,14 @@ class Filter; class ExportSpecification; class Progress; -enum RegionEditState { +enum LIBARDOUR_API RegionEditState { EditChangesNothing = 0, EditChangesName = 1, EditChangesID = 2 }; -class Region +class LIBARDOUR_API Region : public SessionObject , public boost::enable_shared_from_this<Region> , public Readable @@ -220,7 +219,7 @@ class Region bool at_natural_position () const; void move_to_natural_position (); - void trim_start (framepos_t new_position); + void move_start (frameoffset_t distance); void trim_front (framepos_t new_position); void trim_end (framepos_t new_position); void trim_to (framepos_t position, framecnt_t length); diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h index ed0c962d87..a9b73dc462 100644 --- a/libs/ardour/ardour/region_factory.h +++ b/libs/ardour/ardour/region_factory.h @@ -28,6 +28,7 @@ #include "pbd/property_list.h" #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" class XMLNode; @@ -38,7 +39,7 @@ namespace ARDOUR { class Session; class AudioRegion; -class RegionFactory { +class LIBARDOUR_API RegionFactory { public: typedef std::map<PBD::ID,boost::shared_ptr<Region> > RegionMap; diff --git a/libs/ardour/ardour/region_sorters.h b/libs/ardour/ardour/region_sorters.h index baa3a3417d..9fd739a4da 100644 --- a/libs/ardour/ardour/region_sorters.h +++ b/libs/ardour/ardour/region_sorters.h @@ -24,13 +24,13 @@ namespace ARDOUR { -struct RegionSortByPosition { +struct LIBARDOUR_API RegionSortByPosition { bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) { return a->position() < b->position(); } }; -struct RegionSortByLayer { +struct LIBARDOUR_API RegionSortByLayer { bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) { return a->layer() < b->layer(); } diff --git a/libs/ardour/ardour/resampled_source.h b/libs/ardour/ardour/resampled_source.h index a36ad4331f..bb088f36fb 100644 --- a/libs/ardour/ardour/resampled_source.h +++ b/libs/ardour/ardour/resampled_source.h @@ -22,12 +22,13 @@ #include <samplerate.h> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/importable_source.h" namespace ARDOUR { -class ResampledImportableSource : public ImportableSource +class LIBARDOUR_API ResampledImportableSource : public ImportableSource { public: ResampledImportableSource (boost::shared_ptr<ImportableSource>, framecnt_t rate, SrcQuality); diff --git a/libs/ardour/ardour/return.h b/libs/ardour/ardour/return.h index 6dcd6ac2fc..45bb5573b2 100644 --- a/libs/ardour/ardour/return.h +++ b/libs/ardour/ardour/return.h @@ -34,7 +34,7 @@ class Amp; class PeakMeter; -class Return : public IOProcessor +class LIBARDOUR_API Return : public IOProcessor { public: Return (Session&, bool internal = false); diff --git a/libs/ardour/ardour/reverse.h b/libs/ardour/ardour/reverse.h index edc72ce707..4c24a7c1cb 100644 --- a/libs/ardour/ardour/reverse.h +++ b/libs/ardour/ardour/reverse.h @@ -24,7 +24,7 @@ namespace ARDOUR { -class Reverse : public Filter { +class LIBARDOUR_API Reverse : public Filter { public: Reverse (ARDOUR::Session&); ~Reverse (); diff --git a/libs/ardour/ardour/revision.h b/libs/ardour/ardour/revision.h index 9eeb1e2a9a..69c7519e01 100644 --- a/libs/ardour/ardour/revision.h +++ b/libs/ardour/ardour/revision.h @@ -20,8 +20,15 @@ #ifndef __ardour_revision_h__ #define __ardour_revision_h__ +#include "ardour/libardour_visibility.h" + namespace ARDOUR { - extern const char* revision; + + extern LIBARDOUR_API const char* revision; + + extern "C" { + LIBARDOUR_API const char* get_ardour_revision(); + } } #endif diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 83605d7413..fb2b18f177 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -43,6 +43,7 @@ #include "ardour/ardour.h" #include "ardour/instrument_info.h" #include "ardour/io.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/mute_master.h" #include "ardour/route_group_member.h" @@ -67,7 +68,7 @@ class Pannable; class CapturingProcessor; class InternalSend; -class Route : public SessionObject, public Automatable, public RouteGroupMember, public GraphNode, public boost::enable_shared_from_this<Route> +class LIBARDOUR_API Route : public SessionObject, public Automatable, public RouteGroupMember, public GraphNode, public boost::enable_shared_from_this<Route> { public: diff --git a/libs/ardour/ardour/route_graph.h b/libs/ardour/ardour/route_graph.h index 0b0af6c7dd..77e74ceafd 100644 --- a/libs/ardour/ardour/route_graph.h +++ b/libs/ardour/ardour/route_graph.h @@ -37,7 +37,7 @@ typedef boost::shared_ptr<Route> GraphVertex; * * This may be a premature optimisation... */ -class GraphEdges +class LIBARDOUR_API GraphEdges { public: typedef std::map<GraphVertex, std::set<GraphVertex> > EdgeMap; diff --git a/libs/ardour/ardour/route_group.h b/libs/ardour/ardour/route_group.h index 2f62193d83..763430e1f1 100644 --- a/libs/ardour/ardour/route_group.h +++ b/libs/ardour/ardour/route_group.h @@ -29,24 +29,25 @@ #include "pbd/stateful.h" #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/session_object.h" namespace ARDOUR { namespace Properties { - extern PBD::PropertyDescriptor<bool> relative; - extern PBD::PropertyDescriptor<bool> active; - extern PBD::PropertyDescriptor<bool> gain; - extern PBD::PropertyDescriptor<bool> mute; - extern PBD::PropertyDescriptor<bool> solo; - extern PBD::PropertyDescriptor<bool> recenable; - extern PBD::PropertyDescriptor<bool> select; - extern PBD::PropertyDescriptor<bool> route_active; - extern PBD::PropertyDescriptor<bool> color; - extern PBD::PropertyDescriptor<bool> monitoring; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> relative; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> active; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> gain; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> mute; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> solo; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> recenable; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> select; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> route_active; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> color; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> monitoring; /* we use this, but its declared in region.cc */ - extern PBD::PropertyDescriptor<bool> hidden; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> hidden; }; class Route; @@ -54,7 +55,7 @@ class Track; class AudioTrack; class Session; -class RouteGroup : public SessionObject +class LIBARDOUR_API RouteGroup : public SessionObject { public: static void make_property_quarks(); diff --git a/libs/ardour/ardour/route_group_member.h b/libs/ardour/ardour/route_group_member.h index 2665c719e6..b0368cb240 100644 --- a/libs/ardour/ardour/route_group_member.h +++ b/libs/ardour/ardour/route_group_member.h @@ -26,7 +26,7 @@ namespace ARDOUR { class RouteGroup; -class RouteGroupMember +class LIBARDOUR_API RouteGroupMember { public: RouteGroupMember () : _route_group (0) {} diff --git a/libs/ardour/ardour/runtime_functions.h b/libs/ardour/ardour/runtime_functions.h index 8882d721d7..e1d6b99f61 100644 --- a/libs/ardour/ardour/runtime_functions.h +++ b/libs/ardour/ardour/runtime_functions.h @@ -20,6 +20,7 @@ #ifndef __ardour_runtime_functions_h__ #define __ardour_runtime_functions_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -30,11 +31,11 @@ namespace ARDOUR { typedef void (*mix_buffers_with_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, pframes_t, float); typedef void (*mix_buffers_no_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, pframes_t); - extern compute_peak_t compute_peak; - extern find_peaks_t find_peaks; - extern apply_gain_to_buffer_t apply_gain_to_buffer; - extern mix_buffers_with_gain_t mix_buffers_with_gain; - extern mix_buffers_no_gain_t mix_buffers_no_gain; + LIBARDOUR_API extern compute_peak_t compute_peak; + LIBARDOUR_API extern find_peaks_t find_peaks; + LIBARDOUR_API extern apply_gain_to_buffer_t apply_gain_to_buffer; + LIBARDOUR_API extern mix_buffers_with_gain_t mix_buffers_with_gain; + LIBARDOUR_API extern mix_buffers_no_gain_t mix_buffers_no_gain; } #endif /* __ardour_runtime_functions_h__ */ diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h index 6e2775286d..a9d2c5dacd 100644 --- a/libs/ardour/ardour/send.h +++ b/libs/ardour/ardour/send.h @@ -32,7 +32,7 @@ namespace ARDOUR { class PeakMeter; class Amp; -class Send : public Delivery +class LIBARDOUR_API Send : public Delivery { public: Send (Session&, boost::shared_ptr<Pannable> pannable, boost::shared_ptr<MuteMaster>, Delivery::Role r = Delivery::Send, bool ignore_bitslot = false); diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 09421a580b..f77e09736f 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -141,7 +141,7 @@ class WindowsVSTPlugin; extern void setup_enum_writer (); -class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager +class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager { public: enum RecordState { @@ -238,7 +238,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi return _bundles.reader (); } - struct RoutePublicOrderSorter { + struct LIBARDOUR_API RoutePublicOrderSorter { bool operator() (boost::shared_ptr<Route>, boost::shared_ptr<Route> b); }; @@ -830,7 +830,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi void request_resume_timecode_transmission (); bool timecode_transmission_suspended () const; - std::string source_search_path(DataType) const; + std::vector<std::string> source_search_path(DataType) const; void ensure_search_path_includes (const std::string& path, DataType type); std::list<std::string> unknown_processors () const; diff --git a/libs/ardour/ardour/session_configuration.h b/libs/ardour/ardour/session_configuration.h index 46d6defa7d..e72d19f322 100644 --- a/libs/ardour/ardour/session_configuration.h +++ b/libs/ardour/ardour/session_configuration.h @@ -24,7 +24,7 @@ namespace ARDOUR { -class SessionConfiguration : public Configuration +class LIBARDOUR_API SessionConfiguration : public Configuration { public: SessionConfiguration (); diff --git a/libs/ardour/ardour/session_directory.h b/libs/ardour/ardour/session_directory.h index a4c372d6ed..685f0870dd 100644 --- a/libs/ardour/ardour/session_directory.h +++ b/libs/ardour/ardour/session_directory.h @@ -22,9 +22,11 @@ #include <string> #include <vector> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class SessionDirectory +class LIBARDOUR_API SessionDirectory { public: diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index ccec43d909..1283f32004 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -28,6 +28,7 @@ #include "pbd/ringbuffer.h" #include "pbd/event_loop.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -35,7 +36,7 @@ namespace ARDOUR { class Slave; class Region; -class SessionEvent { +class LIBARDOUR_API SessionEvent { public: enum Type { SetTransportSpeed, @@ -108,7 +109,7 @@ public: boost::shared_ptr<Region> region; - SessionEvent (Type t, Action a, framepos_t when, framepos_t where, double spd, bool yn = false, bool yn2 = false, bool yn3 = false) + SessionEvent (Type t, Action a, framepos_t when, framepos_t where, double spd, bool yn = false, bool yn2 = false, bool yn3 = false) : type (t) , action (a) , action_frame (when) diff --git a/libs/ardour/ardour/session_handle.h b/libs/ardour/ardour/session_handle.h index 0331970e5c..330f1805cd 100644 --- a/libs/ardour/ardour/session_handle.h +++ b/libs/ardour/ardour/session_handle.h @@ -22,10 +22,12 @@ #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class Session; -class SessionHandleRef : public PBD::ScopedConnectionList +class LIBARDOUR_API SessionHandleRef : public PBD::ScopedConnectionList { public: SessionHandleRef (ARDOUR::Session& s); @@ -37,7 +39,7 @@ class SessionHandleRef : public PBD::ScopedConnectionList virtual void insanity_check (); }; -class SessionHandlePtr +class LIBARDOUR_API SessionHandlePtr { public: SessionHandlePtr (ARDOUR::Session* s); diff --git a/libs/ardour/ardour/session_metadata.h b/libs/ardour/ardour/session_metadata.h index c4341dbc61..b163e98f65 100644 --- a/libs/ardour/ardour/session_metadata.h +++ b/libs/ardour/ardour/session_metadata.h @@ -28,13 +28,15 @@ #include "pbd/statefuldestructible.h" #include "pbd/xml++.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** Represents metadata associated to a Session * Metadata can be accessed and edited via this class. * Exported files can also be tagged with this data. */ -class SessionMetadata : public PBD::StatefulDestructible +class LIBARDOUR_API SessionMetadata : public PBD::StatefulDestructible { public: //singleton instance: diff --git a/libs/ardour/ardour/session_object.h b/libs/ardour/ardour/session_object.h index eacb0c49e9..ac74f07b77 100644 --- a/libs/ardour/ardour/session_object.h +++ b/libs/ardour/ardour/session_object.h @@ -31,7 +31,7 @@ namespace ARDOUR { namespace Properties { - extern PBD::PropertyDescriptor<std::string> name; + LIBARDOUR_API extern PBD::PropertyDescriptor<std::string> name; } class Session; @@ -40,7 +40,7 @@ class Session; expected to be destroyed before the session calls drop_references(). */ -class SessionObject : public SessionHandleRef, public PBD::StatefulDestructible +class LIBARDOUR_API SessionObject : public SessionHandleRef, public PBD::StatefulDestructible { public: static void make_property_quarks (); diff --git a/libs/ardour/ardour/session_playlists.h b/libs/ardour/ardour/session_playlists.h index 83dc8ee58c..e7ad1624dd 100644 --- a/libs/ardour/ardour/session_playlists.h +++ b/libs/ardour/ardour/session_playlists.h @@ -44,7 +44,7 @@ class Session; class Crossfade; class Track; -class SessionPlaylists : public PBD::ScopedConnectionList +class LIBARDOUR_API SessionPlaylists : public PBD::ScopedConnectionList { public: ~SessionPlaylists (); diff --git a/libs/ardour/ardour/session_state_utils.h b/libs/ardour/ardour/session_state_utils.h index 166b738d05..f35bbd0778 100644 --- a/libs/ardour/ardour/session_state_utils.h +++ b/libs/ardour/ardour/session_state_utils.h @@ -22,6 +22,8 @@ #include <vector> #include <string> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** @@ -32,7 +34,7 @@ namespace ARDOUR { * * @return true if successful, false otherwise. */ -bool create_backup_file (const std::string & file_path); +LIBARDOUR_API bool create_backup_file (const std::string & file_path); /** * Get the absolute paths to all state files in the directory @@ -41,8 +43,8 @@ bool create_backup_file (const std::string & file_path); * @param directory_path The absolute path to a directory. * @param result vector to contain resulting state files. */ -void get_state_files_in_directory (const std::string& directory_path, - std::vector<std::string>& result); +LIBARDOUR_API void get_state_files_in_directory (const std::string& directory_path, + std::vector<std::string>& result); /** * Given a vector of paths to files, return a vector containing @@ -52,7 +54,7 @@ void get_state_files_in_directory (const std::string& directory_path, * @return a vector containing a list of file names without any * filename extension. */ -std::vector<std::string> get_file_names_no_extension (const std::vector<std::string> & file_paths); +LIBARDOUR_API std::vector<std::string> get_file_names_no_extension (const std::vector<std::string> & file_paths); } // namespace ARDOUR diff --git a/libs/ardour/ardour/session_utils.h b/libs/ardour/ardour/session_utils.h index ab24e976b2..bd9cc92267 100644 --- a/libs/ardour/ardour/session_utils.h +++ b/libs/ardour/ardour/session_utils.h @@ -23,9 +23,11 @@ #include <string> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -int find_session (std::string str, std::string& path, std::string& snapshot, bool& isnew); + LIBARDOUR_API extern int find_session (std::string str, std::string& path, std::string& snapshot, bool& isnew); }; diff --git a/libs/ardour/ardour/silentfilesource.h b/libs/ardour/ardour/silentfilesource.h index 5cdade3751..cf6462247a 100644 --- a/libs/ardour/ardour/silentfilesource.h +++ b/libs/ardour/ardour/silentfilesource.h @@ -25,13 +25,14 @@ namespace ARDOUR { -class SilentFileSource : public AudioFileSource { +class LIBARDOUR_API SilentFileSource : public AudioFileSource { public: int update_header (framepos_t /*when*/, struct tm&, time_t) { return 0; } int flush_header () { return 0; } float sample_rate () const { return _sample_rate; } void set_length (framecnt_t len) { _length = len; } + void flush () {} bool destructive() const { return false; } bool can_be_analysed() const { return false; } @@ -59,7 +60,7 @@ protected: void set_header_timeline_position () {} int read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t /*start*/, framecnt_t /*cnt*/, - double /*samples_per_unit*/, framecnt_t /*fpp*/) const { + double /*frames_per_pixel*/, framecnt_t /*fpp*/) const { memset (peaks, 0, sizeof (PeakData) * npeaks); return 0; } diff --git a/libs/ardour/ardour/slave.h b/libs/ardour/ardour/slave.h index 364929eaab..7e80055f94 100644 --- a/libs/ardour/ardour/slave.h +++ b/libs/ardour/ardour/slave.h @@ -31,6 +31,7 @@ #include "timecode/time.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "midi++/parser.h" #include "midi++/types.h" @@ -59,7 +60,7 @@ class MidiPort; * Therefore it is rather that class, that makes ARDOUR a slave by connecting it * to its external time master. */ -class Slave { +class LIBARDOUR_API Slave { public: Slave() { } virtual ~Slave() {} @@ -180,7 +181,7 @@ class Slave { }; /// We need this wrapper for testability, it's just too hard to mock up a session class -class ISlaveSessionProxy { +class LIBARDOUR_API ISlaveSessionProxy { public: virtual ~ISlaveSessionProxy() {} virtual TempoMap& tempo_map() const { return *((TempoMap *) 0); } @@ -200,7 +201,7 @@ class ISlaveSessionProxy { /// The Session Proxy for use in real Ardour -class SlaveSessionProxy : public ISlaveSessionProxy { +class LIBARDOUR_API SlaveSessionProxy : public ISlaveSessionProxy { Session& session; public: @@ -219,7 +220,7 @@ class SlaveSessionProxy : public ISlaveSessionProxy { void request_transport_speed (double speed); }; -struct SafeTime { +struct LIBARDOUR_API SafeTime { volatile int guard1; framepos_t position; framepos_t timestamp; @@ -235,7 +236,7 @@ struct SafeTime { } }; -class TimecodeSlave : public Slave { +class LIBARDOUR_API TimecodeSlave : public Slave { public: TimecodeSlave () {} @@ -252,7 +253,7 @@ class TimecodeSlave : public Slave { bool timecode_negative_offset; }; -class MTC_Slave : public TimecodeSlave { +class LIBARDOUR_API MTC_Slave : public TimecodeSlave { public: MTC_Slave (Session&, MidiPort&); ~MTC_Slave (); @@ -336,7 +337,7 @@ class MTC_Slave : public TimecodeSlave { void parameter_changed(std::string const & p); }; -class LTC_Slave : public TimecodeSlave { +class LIBARDOUR_API LTC_Slave : public TimecodeSlave { public: LTC_Slave (Session&); ~LTC_Slave (); @@ -404,7 +405,7 @@ public: double b, c; ///< DLL filter coefficients }; -class MIDIClock_Slave : public Slave { +class LIBARDOUR_API MIDIClock_Slave : public Slave { public: MIDIClock_Slave (Session&, MidiPort&, int ppqn = 24); @@ -490,7 +491,7 @@ class MIDIClock_Slave : public Slave { bool _starting; }; -class Engine_Slave : public Slave +class LIBARDOUR_API Engine_Slave : public Slave { public: Engine_Slave (AudioEngine&); diff --git a/libs/ardour/ardour/smf_source.h b/libs/ardour/ardour/smf_source.h index ca337a62c2..82e6252b45 100644 --- a/libs/ardour/ardour/smf_source.h +++ b/libs/ardour/ardour/smf_source.h @@ -34,7 +34,7 @@ namespace ARDOUR { template<typename T> class MidiRingBuffer; /** Standard Midi File (Type 0) Source */ -class SMFSource : public MidiSource, public FileSource, public Evoral::SMF { +class LIBARDOUR_API SMFSource : public MidiSource, public FileSource, public Evoral::SMF { public: /** Constructor for existing external-to-session files */ SMFSource (Session& session, const std::string& path, diff --git a/libs/ardour/ardour/sndfileimportable.h b/libs/ardour/ardour/sndfileimportable.h index 8612e264c4..10c429c545 100644 --- a/libs/ardour/ardour/sndfileimportable.h +++ b/libs/ardour/ardour/sndfileimportable.h @@ -22,12 +22,13 @@ #include <boost/shared_ptr.hpp> #include <sndfile.h> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/importable_source.h" namespace ARDOUR { -class SndFileImportableSource : public ImportableSource { +class LIBARDOUR_API SndFileImportableSource : public ImportableSource { public: SndFileImportableSource (const std::string& path); virtual ~SndFileImportableSource(); diff --git a/libs/ardour/ardour/sndfilesource.h b/libs/ardour/ardour/sndfilesource.h index 3f63f1c598..25b8f003b2 100644 --- a/libs/ardour/ardour/sndfilesource.h +++ b/libs/ardour/ardour/sndfilesource.h @@ -28,7 +28,7 @@ namespace ARDOUR { -class SndFileSource : public AudioFileSource { +class LIBARDOUR_API SndFileSource : public AudioFileSource { public: /** Constructor to be called for existing external-to-session files */ SndFileSource (Session&, const std::string& path, int chn, Flag flags); @@ -46,6 +46,7 @@ class SndFileSource : public AudioFileSource { float sample_rate () const; int update_header (framepos_t when, struct tm&, time_t); int flush_header (); + void flush (); framepos_t natural_position () const; diff --git a/libs/ardour/ardour/soundseq.h b/libs/ardour/ardour/soundseq.h index ff8e96ad8f..02425a71cf 100644 --- a/libs/ardour/ardour/soundseq.h +++ b/libs/ardour/ardour/soundseq.h @@ -26,21 +26,21 @@ namespace ARDOUR { typedef gint16 peak_datum; -struct peak_data_t { +struct LIBARDOUR_API peak_data_t { peak_datum min; peak_datum max; }; const uint32_t frames_per_peak = 2048; -class Sound : public EDL::Piece { +class LIBARDOUR_API Sound : public EDL::Piece { public: int peak (peak_data_t& pk, uint32_t start, uint32_t cnt); int read_peaks (peak_data_t *, uint32_t npeaks, uint32_t start, uint32_t cnt); int build_peak (uint32_t first_frame, uint32_t cnt); }; -class SoundPlaylist : public EDL::Playlist { +class LIBARDOUR_API SoundPlaylist : public EDL::Playlist { public: int read_peaks (peak_data_t *, uint32_t npeaks, uint32_t start, uint32_t cnt); }; diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h index 5e851702d4..78b3cfaa21 100644 --- a/libs/ardour/ardour/source.h +++ b/libs/ardour/ardour/source.h @@ -36,7 +36,7 @@ namespace ARDOUR { class Session; -class Source : public SessionObject +class LIBARDOUR_API Source : public SessionObject { public: enum Flag { diff --git a/libs/ardour/ardour/source_factory.h b/libs/ardour/ardour/source_factory.h index c94f783b44..4ef2cd60ee 100644 --- a/libs/ardour/ardour/source_factory.h +++ b/libs/ardour/ardour/source_factory.h @@ -36,7 +36,7 @@ class Session; class AudioSource; class Playlist; -class SourceFactory { +class LIBARDOUR_API SourceFactory { public: static void init (); diff --git a/libs/ardour/ardour/speaker.h b/libs/ardour/ardour/speaker.h index 3deeb8b0d9..c643eb5d02 100644 --- a/libs/ardour/ardour/speaker.h +++ b/libs/ardour/ardour/speaker.h @@ -22,9 +22,11 @@ #include "pbd/cartesian.h" #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class Speaker { +class LIBARDOUR_API Speaker { public: Speaker (int, const PBD::AngularVector& position); Speaker (const Speaker &); diff --git a/libs/ardour/ardour/speakers.h b/libs/ardour/ardour/speakers.h index dbe4ef180e..cde2c40dbb 100644 --- a/libs/ardour/ardour/speakers.h +++ b/libs/ardour/ardour/speakers.h @@ -31,7 +31,7 @@ class XMLNode; namespace ARDOUR { -class Speakers : public PBD::Stateful { +class LIBARDOUR_API Speakers : public PBD::Stateful { public: Speakers (); Speakers (const Speakers&); diff --git a/libs/ardour/ardour/spline.h b/libs/ardour/ardour/spline.h index 6a12e96d52..475441fd44 100644 --- a/libs/ardour/ardour/spline.h +++ b/libs/ardour/ardour/spline.h @@ -28,7 +28,7 @@ extern "C" { typedef struct _spline Spline; typedef struct _spline_point SplinePoint; -struct _spline_point +struct LIBARDOUR_API _spline_point { float x; float y; @@ -45,7 +45,7 @@ void spline_fill (Spline *, float x0, float x1, float *vec, uint32_t veclen); float spline_get_max_x (Spline *); float spline_get_min_x (Spline *); -struct _spline +struct LIBARDOUR_API _spline { float *deriv2; float *x; diff --git a/libs/ardour/ardour/srcfilesource.h b/libs/ardour/ardour/srcfilesource.h index 0b0865acc6..78564c8b88 100644 --- a/libs/ardour/ardour/srcfilesource.h +++ b/libs/ardour/ardour/srcfilesource.h @@ -23,18 +23,21 @@ #include <cstring> #include <samplerate.h> + +#include "ardour/libardour_visibility.h" #include "ardour/audiofilesource.h" #include "ardour/session.h" namespace ARDOUR { -class SrcFileSource : public AudioFileSource { +class LIBARDOUR_API SrcFileSource : public AudioFileSource { public: SrcFileSource (Session&, boost::shared_ptr<AudioFileSource>, SrcQuality srcq = SrcQuality(SrcQuick)); ~SrcFileSource (); - int update_header (framepos_t /*when*/, struct tm&, time_t) { return 0; } - int flush_header () { return 0; } + int update_header (framepos_t /*when*/, struct tm&, time_t) { return 0; } + int flush_header () { return 0; } + void flush () { } void set_header_timeline_position () {}; void set_length (framecnt_t /*len*/) {}; diff --git a/libs/ardour/ardour/stretch.h b/libs/ardour/ardour/stretch.h index 066ed7861a..edca5fc44b 100644 --- a/libs/ardour/ardour/stretch.h +++ b/libs/ardour/ardour/stretch.h @@ -33,7 +33,7 @@ namespace ARDOUR { -class RBStretch : public RBEffect { +class LIBARDOUR_API RBStretch : public RBEffect { public: RBStretch (ARDOUR::Session&, TimeFXRequest&); ~RBStretch() {} @@ -47,7 +47,7 @@ class RBStretch : public RBEffect { namespace ARDOUR { -class STStretch : public Filter { +class LIBARDOUR_API STStretch : public Filter { public: STStretch (ARDOUR::Session&, TimeFXRequest&); ~STStretch (); diff --git a/libs/ardour/ardour/strip_silence.h b/libs/ardour/ardour/strip_silence.h index eed4320173..59f4ea0a57 100644 --- a/libs/ardour/ardour/strip_silence.h +++ b/libs/ardour/ardour/strip_silence.h @@ -22,7 +22,7 @@ namespace ARDOUR { /// A filter to strip silence from regions -class StripSilence : public Filter +class LIBARDOUR_API StripSilence : public Filter { public: StripSilence (Session &, const AudioIntervalMap&, framecnt_t fade_length); diff --git a/libs/ardour/ardour/tape_file_matcher.h b/libs/ardour/ardour/tape_file_matcher.h index 6c8392f46f..623bd406a8 100644 --- a/libs/ardour/ardour/tape_file_matcher.h +++ b/libs/ardour/ardour/tape_file_matcher.h @@ -23,9 +23,11 @@ #include <regex.h> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class TapeFileMatcher +class LIBARDOUR_API TapeFileMatcher { public: diff --git a/libs/ardour/ardour/template_utils.h b/libs/ardour/ardour/template_utils.h index e01a62bbd1..dc56c53c44 100644 --- a/libs/ardour/ardour/template_utils.h +++ b/libs/ardour/ardour/template_utils.h @@ -24,23 +24,25 @@ #include <string> #include <vector> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { - std::string system_template_directory (); - std::string system_route_template_directory (); + LIBARDOUR_API std::string system_template_directory (); + LIBARDOUR_API std::string system_route_template_directory (); - std::string user_template_directory (); - std::string user_route_template_directory (); + LIBARDOUR_API std::string user_template_directory (); + LIBARDOUR_API std::string user_route_template_directory (); - struct TemplateInfo { + struct LIBARDOUR_API TemplateInfo { std::string name; std::string path; }; - void find_route_templates (std::vector<TemplateInfo>& template_names); - void find_session_templates (std::vector<TemplateInfo>& template_names); + LIBARDOUR_API void find_route_templates (std::vector<TemplateInfo>& template_names); + LIBARDOUR_API void find_session_templates (std::vector<TemplateInfo>& template_names); - std::string session_template_dir_to_file (std::string const &); + LIBARDOUR_API std::string session_template_dir_to_file (std::string const &); } // namespace ARDOUR diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h index bedc825288..8fa5ed45a0 100644 --- a/libs/ardour/ardour/tempo.h +++ b/libs/ardour/ardour/tempo.h @@ -45,7 +45,7 @@ class Meter; class TempoMap; /** Tempo, the speed at which musical time progresses (BPM). */ -class Tempo { +class LIBARDOUR_API Tempo { public: Tempo (double bpm, double type=4.0) // defaulting to quarter note : _beats_per_minute (bpm), _note_type(type) {} @@ -62,7 +62,7 @@ class Tempo { }; /** Meter, or time signature (beats per bar, and which note type is a beat). */ -class Meter { +class LIBARDOUR_API Meter { public: Meter (double dpb, double bt) : _divisions_per_bar (dpb), _note_type (bt) {} @@ -87,7 +87,7 @@ class Meter { }; /** A section of timeline with a certain Tempo or Meter. */ -class MetricSection { +class LIBARDOUR_API MetricSection { public: MetricSection (const Timecode::BBT_Time& start) : _start (start), _frame (0), _movable (true) {} @@ -123,7 +123,7 @@ class MetricSection { }; /** A section of timeline with a certain Meter. */ -class MeterSection : public MetricSection, public Meter { +class LIBARDOUR_API MeterSection : public MetricSection, public Meter { public: MeterSection (const Timecode::BBT_Time& start, double bpb, double note_type) : MetricSection (start), Meter (bpb, note_type) {} @@ -137,7 +137,7 @@ class MeterSection : public MetricSection, public Meter { }; /** A section of timeline with a certain Tempo. */ -class TempoSection : public MetricSection, public Tempo { +class LIBARDOUR_API TempoSection : public MetricSection, public Tempo { public: TempoSection (const Timecode::BBT_Time& start, double qpm, double note_type) : MetricSection (start), Tempo (qpm, note_type), _bar_offset (-1.0) {} @@ -170,7 +170,7 @@ typedef std::list<MetricSection*> Metrics; /** Helper class to keep track of the Meter *AND* Tempo in effect at a given point in time. */ -class TempoMetric { +class LIBARDOUR_API TempoMetric { public: TempoMetric (const Meter& m, const Tempo& t) : _meter (&m), _tempo (&t), _frame (0) {} @@ -205,7 +205,7 @@ class TempoMetric { Timecode::BBT_Time _start; }; -class TempoMap : public PBD::StatefulDestructible +class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible { public: TempoMap (framecnt_t frame_rate); diff --git a/libs/ardour/ardour/tempo_map_importer.h b/libs/ardour/ardour/tempo_map_importer.h index 57c7402781..28a65218c7 100644 --- a/libs/ardour/ardour/tempo_map_importer.h +++ b/libs/ardour/ardour/tempo_map_importer.h @@ -32,14 +32,14 @@ namespace ARDOUR { class Session; -class TempoMapImportHandler : public ElementImportHandler +class LIBARDOUR_API TempoMapImportHandler : public ElementImportHandler { public: TempoMapImportHandler (XMLTree const & source, Session & session); std::string get_info () const; }; -class TempoMapImporter : public ElementImporter +class LIBARDOUR_API TempoMapImporter : public ElementImporter { private: typedef boost::shared_ptr<XMLNode> XMLNodePtr; diff --git a/libs/ardour/ardour/thread_buffers.h b/libs/ardour/ardour/thread_buffers.h index 9d92454887..f30476a474 100644 --- a/libs/ardour/ardour/thread_buffers.h +++ b/libs/ardour/ardour/thread_buffers.h @@ -23,13 +23,14 @@ #include <glibmm/threads.h> #include "ardour/chan_count.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { class BufferSet; -class ThreadBuffers { +class LIBARDOUR_API ThreadBuffers { public: ThreadBuffers (); ~ThreadBuffers (); diff --git a/libs/ardour/ardour/ticker.h b/libs/ardour/ardour/ticker.h index 7f0d1987fc..0e5c3c80f4 100644 --- a/libs/ardour/ardour/ticker.h +++ b/libs/ardour/ardour/ticker.h @@ -23,6 +23,7 @@ #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/session_handle.h" @@ -35,7 +36,7 @@ namespace ARDOUR { class Session; class MidiPort; -class MidiClockTicker : public SessionHandlePtr, boost::noncopyable +class LIBARDOUR_API MidiClockTicker : public SessionHandlePtr, boost::noncopyable { public: MidiClockTicker (); diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index bdf420763b..2a6d3f7ad4 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -35,7 +35,7 @@ class Region; class Diskstream; class IO; -class Track : public Route, public PublicDiskstream +class LIBARDOUR_API Track : public Route, public PublicDiskstream { public: Track (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal, DataType default_type = DataType::AUDIO); diff --git a/libs/ardour/ardour/transient_detector.h b/libs/ardour/ardour/transient_detector.h index 322e4cbc75..0e07c5851a 100644 --- a/libs/ardour/ardour/transient_detector.h +++ b/libs/ardour/ardour/transient_detector.h @@ -28,7 +28,7 @@ class AudioSource; class Readable; class Session; -class TransientDetector : public AudioAnalyser +class LIBARDOUR_API TransientDetector : public AudioAnalyser { public: TransientDetector (float sample_rate); diff --git a/libs/ardour/ardour/trimmable.h b/libs/ardour/ardour/trimmable.h index 071e3d151a..07e2c809a3 100644 --- a/libs/ardour/ardour/trimmable.h +++ b/libs/ardour/ardour/trimmable.h @@ -22,7 +22,7 @@ namespace ARDOUR { -class Trimmable { +class LIBARDOUR_API Trimmable { public: Trimmable() {} virtual ~Trimmable() {} diff --git a/libs/ardour/ardour/unknown_processor.h b/libs/ardour/ardour/unknown_processor.h index 61a5734df2..50234e8294 100644 --- a/libs/ardour/ardour/unknown_processor.h +++ b/libs/ardour/ardour/unknown_processor.h @@ -39,7 +39,7 @@ namespace ARDOUR { * session on a machine without a particular plugin will not corrupt * the session. */ -class UnknownProcessor : public Processor +class LIBARDOUR_API UnknownProcessor : public Processor { public: UnknownProcessor (Session &, XMLNode const &); diff --git a/libs/ardour/ardour/uri_map.h b/libs/ardour/ardour/uri_map.h index 18008f0df2..a948ea4002 100644 --- a/libs/ardour/ardour/uri_map.h +++ b/libs/ardour/ardour/uri_map.h @@ -28,6 +28,8 @@ #include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" #include "lv2/lv2plug.in/ns/ext/urid/urid.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** Implementation of the LV2 uri-map and urid extensions. @@ -35,7 +37,7 @@ namespace ARDOUR { * This just uses a pair of std::map and is not so great in the space overhead * department, but it's fast enough and not really performance critical anyway. */ -class URIMap : public boost::noncopyable { +class LIBARDOUR_API URIMap : public boost::noncopyable { public: URIMap(); diff --git a/libs/ardour/ardour/user_bundle.h b/libs/ardour/ardour/user_bundle.h index 5ecfe521f5..4ff435ef35 100644 --- a/libs/ardour/ardour/user_bundle.h +++ b/libs/ardour/ardour/user_bundle.h @@ -29,7 +29,7 @@ namespace ARDOUR { class Session; -class UserBundle : public Bundle, public PBD::Stateful { +class LIBARDOUR_API UserBundle : public Bundle, public PBD::Stateful { public: UserBundle (std::string const &); diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h index 4bf97fd2e5..6dba01c797 100644 --- a/libs/ardour/ardour/utils.h +++ b/libs/ardour/ardour/utils.h @@ -32,18 +32,19 @@ #include <CoreFoundation/CoreFoundation.h> #endif /* __APPLE__ */ +#include "ardour/libardour_visibility.h" #include "ardour/ardour.h" #include "ardour/data_type.h" #include "ardour/dB.h" class XMLNode; -std::string legalize_for_path (const std::string& str); -std::string legalize_for_universal_path (const std::string& str); -std::string legalize_for_uri (const std::string& str); -std::string legalize_for_path_2X (const std::string& str); -XMLNode* find_named_node (const XMLNode& node, std::string name); -std::string bool_as_string (bool); +LIBARDOUR_API std::string legalize_for_path (const std::string& str); +LIBARDOUR_API std::string legalize_for_universal_path (const std::string& str); +LIBARDOUR_API std::string legalize_for_uri (const std::string& str); +LIBARDOUR_API std::string legalize_for_path_2X (const std::string& str); +LIBARDOUR_API XMLNode* find_named_node (const XMLNode& node, std::string name); +LIBARDOUR_API std::string bool_as_string (bool); static inline float f_max(float x, float a) { x -= a; @@ -54,23 +55,23 @@ static inline float f_max(float x, float a) { return (x); } -std::string bump_name_once(const std::string& s, char delimiter); +LIBARDOUR_API std::string bump_name_once(const std::string& s, char delimiter); -int cmp_nocase (const std::string& s, const std::string& s2); -int cmp_nocase_utf8 (const std::string& s1, const std::string& s2); +LIBARDOUR_API int cmp_nocase (const std::string& s, const std::string& s2); +LIBARDOUR_API int cmp_nocase_utf8 (const std::string& s1, const std::string& s2); -int touch_file(std::string path); +LIBARDOUR_API int touch_file(std::string path); -std::string region_name_from_path (std::string path, bool strip_channels, bool add_channel_suffix = false, uint32_t total = 0, uint32_t this_one = 0); -bool path_is_paired (std::string path, std::string& pair_base); +LIBARDOUR_API std::string region_name_from_path (std::string path, bool strip_channels, bool add_channel_suffix = false, uint32_t total = 0, uint32_t this_one = 0); +LIBARDOUR_API bool path_is_paired (std::string path, std::string& pair_base); -void compute_equal_power_fades (ARDOUR::framecnt_t nframes, float* in, float* out); +LIBARDOUR_API void compute_equal_power_fades (ARDOUR::framecnt_t nframes, float* in, float* out); -const char* sync_source_to_string (ARDOUR::SyncSource src, bool sh = false); -ARDOUR::SyncSource string_to_sync_source (std::string str); +LIBARDOUR_API const char* sync_source_to_string (ARDOUR::SyncSource src, bool sh = false); +LIBARDOUR_API ARDOUR::SyncSource string_to_sync_source (std::string str); -const char* edit_mode_to_string (ARDOUR::EditMode); -ARDOUR::EditMode string_to_edit_mode (std::string); +LIBARDOUR_API const char* edit_mode_to_string (ARDOUR::EditMode); +LIBARDOUR_API ARDOUR::EditMode string_to_edit_mode (std::string); #undef OLD_GAIN_MATH #define OLD_GAIN_MATH @@ -142,8 +143,8 @@ slider_position_to_gain (double pos) } #undef OLD_GAIN_MATH -double gain_to_slider_position_with_max (double g, double max_gain = 2.0); -double slider_position_to_gain_with_max (double g, double max_gain = 2.0); +LIBARDOUR_API double gain_to_slider_position_with_max (double g, double max_gain = 2.0); +LIBARDOUR_API double slider_position_to_gain_with_max (double g, double max_gain = 2.0); /* I don't really like hard-coding these falloff rates here * Probably should use a map of some kind that could be configured @@ -160,17 +161,17 @@ double slider_position_to_gain_with_max (double g, double max_gain = 2.0); #define METER_FALLOFF_FASTER 46.0f #define METER_FALLOFF_FASTEST 70.0f -float meter_falloff_to_float (ARDOUR::MeterFalloff); -ARDOUR::MeterFalloff meter_falloff_from_float (float); -float meter_falloff_to_db_per_sec (float); +LIBARDOUR_API float meter_falloff_to_float (ARDOUR::MeterFalloff); +LIBARDOUR_API ARDOUR::MeterFalloff meter_falloff_from_float (float); +LIBARDOUR_API float meter_falloff_to_db_per_sec (float); -const char* native_header_format_extension (ARDOUR::HeaderFormat, const ARDOUR::DataType& type); -bool matching_unsuffixed_filename_exists_in (const std::string& dir, const std::string& name); +LIBARDOUR_API const char* native_header_format_extension (ARDOUR::HeaderFormat, const ARDOUR::DataType& type); +LIBARDOUR_API bool matching_unsuffixed_filename_exists_in (const std::string& dir, const std::string& name); -uint32_t how_many_dsp_threads (); +LIBARDOUR_API uint32_t how_many_dsp_threads (); #if __APPLE__ -std::string CFStringRefToStdString(CFStringRef stringRef); +LIBARDOUR_API std::string CFStringRefToStdString(CFStringRef stringRef); #endif // __APPLE__ #endif /* __ardour_utils_h__ */ diff --git a/libs/ardour/ardour/visibility.h b/libs/ardour/ardour/visibility.h deleted file mode 100644 index 09287b877d..0000000000 --- a/libs/ardour/ardour/visibility.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2013 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - 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. - -*/ - -#ifndef __libardour_visibility_h__ -#define __libardour_visibility_h__ - -/* _WIN32 is defined by most compilers targetting Windows, but within the - * ardour source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending - * on how a Windows build is built. - */ - -#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) - #define LIBARDOUR_HELPER_DLL_IMPORT __declspec(dllimport) - #define LIBARDOUR_HELPER_DLL_EXPORT __declspec(dllexport) - #define LIBARDOUR_HELPER_DLL_LOCAL -#else - #if __GNUC__ >= 4 - #define LIBARDOUR_HELPER_DLL_IMPORT __attribute__ ((visibility ("default"))) - #define LIBARDOUR_HELPER_DLL_EXPORT __attribute__ ((visibility ("default"))) - #define LIBARDOUR_HELPER_DLL_LOCAL __attribute__ ((visibility ("hidden"))) - #else - #define LIBARDOUR_HELPER_DLL_IMPORT - #define LIBARDOUR_HELPER_DLL_EXPORT - #define LIBARDOUR_HELPER_DLL_LOCAL - #endif -#endif - -#endif /* __libardour_visibility_h__ */ diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h index 7ca973cbb7..942f7192db 100644 --- a/libs/ardour/ardour/vst_plugin.h +++ b/libs/ardour/ardour/vst_plugin.h @@ -32,7 +32,7 @@ typedef struct _VSTState VSTState; namespace ARDOUR { /** Parent class for VST plugins of both Windows and Linux varieties */ -class VSTPlugin : public Plugin +class LIBARDOUR_API VSTPlugin : public Plugin { public: VSTPlugin (AudioEngine &, Session &, VSTHandle *); diff --git a/libs/ardour/ardour/vst_types.h b/libs/ardour/ardour/vst_types.h index d185d62606..47308aff73 100644 --- a/libs/ardour/ardour/vst_types.h +++ b/libs/ardour/ardour/vst_types.h @@ -20,9 +20,10 @@ #ifndef __ardour_vst_types_h__ #define __ardour_vst_types_h__ +#include "ardour/libardour_visibility.h" #include "ardour/vestige/aeffectx.h" -struct _VSTKey +struct LIBARDOUR_API _VSTKey { /** virtual-key code, or 0 if this _VSTFXKey is a `character' key */ int special; @@ -32,7 +33,7 @@ struct _VSTKey typedef struct _VSTKey VSTKey; -struct _VSTInfo +struct LIBARDOUR_API _VSTInfo { char *name; char *creator; @@ -56,7 +57,7 @@ typedef struct _VSTInfo VSTInfo; typedef AEffect * (* main_entry_t) (audioMasterCallback); -struct _VSTHandle +struct LIBARDOUR_API _VSTHandle { void* dll; char* name; @@ -69,7 +70,7 @@ struct _VSTHandle typedef struct _VSTHandle VSTHandle; -struct _VSTState +struct LIBARDOUR_API _VSTState { AEffect* plugin; diff --git a/libs/ardour/ardour/vumeterdsp.h b/libs/ardour/ardour/vumeterdsp.h index 3169dca12e..1271276d68 100644 --- a/libs/ardour/ardour/vumeterdsp.h +++ b/libs/ardour/ardour/vumeterdsp.h @@ -20,8 +20,9 @@ #ifndef __VUMETERDSP_H #define __VUMETERDSP_H +#include "ardour/libardour_visibility.h" -class Vumeterdsp +class LIBARDOUR_API Vumeterdsp { public: diff --git a/libs/ardour/ardour/windows_vst_plugin.h b/libs/ardour/ardour/windows_vst_plugin.h index 83bc113a00..ee4850dc05 100644 --- a/libs/ardour/ardour/windows_vst_plugin.h +++ b/libs/ardour/ardour/windows_vst_plugin.h @@ -22,7 +22,7 @@ #include "ardour/vst_plugin.h" -struct _VSTHandle; +struct LIBARDOUR_API _VSTHandle; typedef struct _VSTHandle VSTHandle; namespace ARDOUR { @@ -30,7 +30,7 @@ namespace ARDOUR { class AudioEngine; class Session; -class WindowsVSTPlugin : public VSTPlugin +class LIBARDOUR_API WindowsVSTPlugin : public VSTPlugin { public: WindowsVSTPlugin (AudioEngine &, Session &, VSTHandle *); @@ -40,7 +40,7 @@ public: std::string state_node_name () const { return "windows-vst"; } }; -class WindowsVSTPluginInfo : public PluginInfo +class LIBARDOUR_API WindowsVSTPluginInfo : public PluginInfo { public: WindowsVSTPluginInfo (); diff --git a/libs/ardour/ardour/worker.h b/libs/ardour/ardour/worker.h index 4f3ff54bc1..c9ff2f2d7f 100644 --- a/libs/ardour/ardour/worker.h +++ b/libs/ardour/ardour/worker.h @@ -27,12 +27,14 @@ #include "pbd/ringbuffer.h" #include "pbd/semaphore.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** An object that needs to schedule non-RT work in the audio thread. */ -class Workee { +class LIBARDOUR_API Workee { public: virtual ~Workee() {} @@ -50,7 +52,7 @@ public: /** A worker thread for non-realtime tasks scheduled in the audio thread. */ -class Worker +class LIBARDOUR_API Worker { public: Worker(Workee* workee, uint32_t ring_size); |