summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/async_midi_port.h28
-rw-r--r--libs/ardour/ardour/audiofile_tagger.h4
-rw-r--r--libs/ardour/ardour/audiofilesource.h1
-rw-r--r--libs/ardour/ardour/audioplaylist.h1
-rw-r--r--libs/ardour/ardour/backend_search_path.h2
-rw-r--r--libs/ardour/ardour/butler.h38
-rw-r--r--libs/ardour/ardour/chan_count.h4
-rw-r--r--libs/ardour/ardour/control_protocol_search_path.h6
-rw-r--r--libs/ardour/ardour/coreaudiosource.h2
-rw-r--r--libs/ardour/ardour/cycles.h3
-rw-r--r--libs/ardour/ardour/debug.h1
-rw-r--r--libs/ardour/ardour/directory_names.h1
-rw-r--r--libs/ardour/ardour/export_formats_search_path.h4
-rw-r--r--libs/ardour/ardour/export_profile_manager.h2
-rw-r--r--libs/ardour/ardour/file_source.h2
-rw-r--r--libs/ardour/ardour/filesystem_paths.h4
-rw-r--r--libs/ardour/ardour/interthread_info.h2
-rw-r--r--libs/ardour/ardour/jack_utils.h253
-rw-r--r--libs/ardour/ardour/ladspa_plugin.h9
-rw-r--r--libs/ardour/ardour/ladspa_search_path.h39
-rw-r--r--libs/ardour/ardour/lv2_bundled_search_path.h4
-rw-r--r--libs/ardour/ardour/lv2_plugin.h2
-rw-r--r--libs/ardour/ardour/midi_patch_search_path.h6
-rw-r--r--libs/ardour/ardour/midi_playlist.h1
-rw-r--r--libs/ardour/ardour/midi_track.h4
-rw-r--r--libs/ardour/ardour/msvc_libardour.h99
-rw-r--r--libs/ardour/ardour/panner.h8
-rw-r--r--libs/ardour/ardour/panner_manager.h11
-rw-r--r--libs/ardour/ardour/panner_search_path.h6
-rw-r--r--libs/ardour/ardour/playlist.h2
-rw-r--r--libs/ardour/ardour/plugin_manager.h3
-rw-r--r--libs/ardour/ardour/session.h2
-rw-r--r--libs/ardour/ardour/silentfilesource.h1
-rw-r--r--libs/ardour/ardour/sndfilesource.h1
34 files changed, 513 insertions, 43 deletions
diff --git a/libs/ardour/ardour/async_midi_port.h b/libs/ardour/ardour/async_midi_port.h
index 76bdac0409..896301b398 100644
--- a/libs/ardour/ardour/async_midi_port.h
+++ b/libs/ardour/ardour/async_midi_port.h
@@ -52,10 +52,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 +72,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/audiofile_tagger.h b/libs/ardour/ardour/audiofile_tagger.h
index 0519e2233c..9a46e235d8 100644
--- a/libs/ardour/ardour/audiofile_tagger.h
+++ b/libs/ardour/ardour/audiofile_tagger.h
@@ -24,8 +24,8 @@
#include <string>
#include "taglib/tag.h"
-#include "taglib/taglib.h"
-#include "taglib/xiphcomment.h"
+#include "taglib/toolkit/taglib.h"
+#include "taglib/ogg/xiphcomment.h"
namespace ARDOUR
{
diff --git a/libs/ardour/ardour/audiofilesource.h b/libs/ardour/ardour/audiofilesource.h
index c5fd7b3af2..af5dabe388 100644
--- a/libs/ardour/ardour/audiofilesource.h
+++ b/libs/ardour/ardour/audiofilesource.h
@@ -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..3c987c0aa0 100644
--- a/libs/ardour/ardour/audioplaylist.h
+++ b/libs/ardour/ardour/audioplaylist.h
@@ -29,7 +29,6 @@
namespace ARDOUR {
class Session;
-class Region;
class AudioRegion;
class Source;
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/butler.h b/libs/ardour/ardour/butler.h
index cdd48c3e3a..226aacbbad 100644
--- a/libs/ardour/ardour/butler.h
+++ b/libs/ardour/ardour/butler.h
@@ -20,13 +20,21 @@
#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/types.h"
#include "ardour/session_handle.h"
+
+
namespace ARDOUR {
/**
@@ -71,15 +79,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/chan_count.h b/libs/ardour/ardour/chan_count.h
index c4f3caef6b..03e2fcd8ff 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 {
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..30c66069f6 100644
--- a/libs/ardour/ardour/coreaudiosource.h
+++ b/libs/ardour/ardour/coreaudiosource.h
@@ -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/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/debug.h b/libs/ardour/ardour/debug.h
index 5811f7a484..47eee69df5 100644
--- a/libs/ardour/ardour/debug.h
+++ b/libs/ardour/ardour/debug.h
@@ -34,6 +34,7 @@ namespace PBD {
extern uint64_t SnapBBT;
extern uint64_t Configuration;
extern uint64_t Latency;
+ extern uint64_t Peaks;
extern uint64_t Processors;
extern uint64_t ProcessThreads;
extern uint64_t Graph;
diff --git a/libs/ardour/ardour/directory_names.h b/libs/ardour/ardour/directory_names.h
index 935cdd977b..72a456efe6 100644
--- a/libs/ardour/ardour/directory_names.h
+++ b/libs/ardour/ardour/directory_names.h
@@ -36,6 +36,7 @@ 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 ladspa_dir_name;
extern const char* const user_config_dir_name;
extern const char* const panner_dir_name;
extern const char* const backend_dir_name;
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_profile_manager.h b/libs/ardour/ardour/export_profile_manager.h
index 424e0fe163..77ace497c2 100644
--- a/libs/ardour/ardour/export_profile_manager.h
+++ b/libs/ardour/ardour/export_profile_manager.h
@@ -102,7 +102,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/file_source.h b/libs/ardour/ardour/file_source.h
index 5898d04f0a..52dca18feb 100644
--- a/libs/ardour/ardour/file_source.h
+++ b/libs/ardour/ardour/file_source.h
@@ -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/filesystem_paths.h b/libs/ardour/ardour/filesystem_paths.h
index cfeb633597..e77de1c00f 100644
--- a/libs/ardour/ardour/filesystem_paths.h
+++ b/libs/ardour/ardour/filesystem_paths.h
@@ -41,14 +41,14 @@ namespace ARDOUR {
* @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 ();
+ 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 ();
+ PBD::Searchpath ardour_data_search_path ();
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/interthread_info.h b/libs/ardour/ardour/interthread_info.h
index 01cacf437c..a06fc649ca 100644
--- a/libs/ardour/ardour/interthread_info.h
+++ b/libs/ardour/ardour/interthread_info.h
@@ -29,7 +29,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/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/ladspa_plugin.h b/libs/ardour/ardour/ladspa_plugin.h
index 6853a1dc36..62cad017fc 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"
@@ -39,7 +39,7 @@ class Session;
class 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);
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/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..6b4b1a1c67 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
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..99d0b98321 100644
--- a/libs/ardour/ardour/midi_playlist.h
+++ b/libs/ardour/ardour/midi_playlist.h
@@ -32,7 +32,6 @@ namespace ARDOUR
{
class Session;
-class Region;
class MidiRegion;
class Source;
template<typename T> class MidiRingBuffer;
diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h
index 3b75c0a51b..9c1d21a3e4 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"
@@ -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/msvc_libardour.h b/libs/ardour/ardour/msvc_libardour.h
new file mode 100644
index 0000000000..75c932905e
--- /dev/null
+++ b/libs/ardour/ardour/msvc_libardour.h
@@ -0,0 +1,99 @@
+/*
+ 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 <limits.h>
+
+#ifdef LIBARDOUR_IS_IN_WIN_STATIC_LIB // #define if your project uses libardour (under Windows) as a static library
+#define LIBARDOUR_IS_IN_WINDLL 0
+#endif
+
+#if !defined(LIBARDOUR_IS_IN_WINDLL)
+ #if defined(COMPILER_MSVC) || defined(COMPILER_MINGW)
+ // If you need '__declspec' compatibility, add extra compilers to the above as necessary
+ #define LIBARDOUR_IS_IN_WINDLL 1
+ #else
+ #define LIBARDOUR_IS_IN_WINDLL 0
+ #endif
+#endif
+
+#if LIBARDOUR_IS_IN_WINDLL && !defined(LIBARDOUR_API)
+ #if defined(BUILDING_LIBARDOUR)
+ #define LIBARDOUR_API __declspec(dllexport)
+ #define LIBARDOUR_APICALLTYPE __stdcall
+ #elif defined(COMPILER_MSVC) || defined(COMPILER_MINGW) // Probably needs Cygwin too, at some point
+ #define LIBARDOUR_API __declspec(dllimport)
+ #define LIBARDOUR_APICALLTYPE __stdcall
+ #else
+ #error "Attempting to define __declspec with an incompatible compiler !"
+ #endif
+#elif !defined(LIBARDOUR_API)
+ // Other compilers / platforms could be accommodated here
+ #define LIBARDOUR_API
+ #define LIBARDOUR_APICALLTYPE
+#endif
+
+#ifndef _MAX_PATH
+#define _MAX_PATH 260
+#endif
+#ifndef PATH_MAX
+#define PATH_MAX _MAX_PATH
+#endif
+
+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/panner.h b/libs/ardour/ardour/panner.h
index b30b1859a3..024dcd150c 100644
--- a/libs/ardour/ardour/panner.h
+++ b/libs/ardour/ardour/panner.h
@@ -33,6 +33,14 @@
#include "ardour/types.h"
#include "ardour/automation_control.h"
#include "ardour/automatable.h"
+#include "ardour/visibility.h"
+
+#ifdef ARDOURPANNER_DLL_EXPORTS // defined if we are building the ARDOUR Panners DLLs (instead of using them)
+ #define ARDOURPANNER_API LIBARDOUR_HELPER_DLL_EXPORT
+#else
+ #define ARDOURPANNER_API LIBARDOUR_HELPER_DLL_IMPORT
+#endif
+#define ARDOURPANNER_LOCAL LIBARDOUR_HELPER_DLL_LOCAL
namespace ARDOUR {
diff --git a/libs/ardour/ardour/panner_manager.h b/libs/ardour/ardour/panner_manager.h
index 016ba56ce3..c34d22285d 100644
--- a/libs/ardour/ardour/panner_manager.h
+++ b/libs/ardour/ardour/panner_manager.h
@@ -20,7 +20,8 @@
#ifndef __ardour_panner_manager_h__
#define __ardour_panner_manager_h__
-#include <dlfcn.h>
+#include <glibmm/module.h>
+
#include "ardour/panner.h"
#include "ardour/session_handle.h"
@@ -28,15 +29,15 @@ namespace ARDOUR {
struct 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;
}
};
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/playlist.h b/libs/ardour/ardour/playlist.h
index 754e48cc25..fbe747b297 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;
diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h
index a7a5703690..2464368ae7 100644
--- a/libs/ardour/ardour/plugin_manager.h
+++ b/libs/ardour/ardour/plugin_manager.h
@@ -51,7 +51,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 +102,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 +125,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/session.h b/libs/ardour/ardour/session.h
index 7337e2d1ea..3fa9fbcb28 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -826,7 +826,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/silentfilesource.h b/libs/ardour/ardour/silentfilesource.h
index 25e94d6134..1ff251e71a 100644
--- a/libs/ardour/ardour/silentfilesource.h
+++ b/libs/ardour/ardour/silentfilesource.h
@@ -32,6 +32,7 @@ public:
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; }
diff --git a/libs/ardour/ardour/sndfilesource.h b/libs/ardour/ardour/sndfilesource.h
index 3f63f1c598..bed431c490 100644
--- a/libs/ardour/ardour/sndfilesource.h
+++ b/libs/ardour/ardour/sndfilesource.h
@@ -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;