mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-21 06:06:25 +01:00
NO-OP: <tab> after <space> fixes in libs
This commit is contained in:
parent
31815b5f26
commit
2f91bdfa53
63 changed files with 1013 additions and 1020 deletions
|
|
@ -264,21 +264,21 @@ class LIBARDOUR_API AudioEngine : public PortManager, public SessionHandlePtr
|
||||||
|
|
||||||
static AudioEngine* _instance;
|
static AudioEngine* _instance;
|
||||||
|
|
||||||
Glib::Threads::Mutex _process_lock;
|
Glib::Threads::Mutex _process_lock;
|
||||||
Glib::Threads::RecMutex _state_lock;
|
Glib::Threads::RecMutex _state_lock;
|
||||||
Glib::Threads::Cond session_removed;
|
Glib::Threads::Cond session_removed;
|
||||||
bool session_remove_pending;
|
bool session_remove_pending;
|
||||||
sampleoffset_t session_removal_countdown;
|
sampleoffset_t session_removal_countdown;
|
||||||
gain_t session_removal_gain;
|
gain_t session_removal_gain;
|
||||||
gain_t session_removal_gain_step;
|
gain_t session_removal_gain_step;
|
||||||
bool _running;
|
bool _running;
|
||||||
bool _freewheeling;
|
bool _freewheeling;
|
||||||
/// number of samples between each check for changes in monitor input
|
/// number of samples between each check for changes in monitor input
|
||||||
samplecnt_t monitor_check_interval;
|
samplecnt_t monitor_check_interval;
|
||||||
/// time of the last monitor check in samples
|
/// time of the last monitor check in samples
|
||||||
samplecnt_t last_monitor_check;
|
samplecnt_t last_monitor_check;
|
||||||
/// the number of samples processed since start() was called
|
/// the number of samples processed since start() was called
|
||||||
samplecnt_t _processed_samples;
|
samplecnt_t _processed_samples;
|
||||||
Glib::Threads::Thread* m_meter_thread;
|
Glib::Threads::Thread* m_meter_thread;
|
||||||
ProcessThread* _main_thread;
|
ProcessThread* _main_thread;
|
||||||
MTDM* _mtdm;
|
MTDM* _mtdm;
|
||||||
|
|
@ -286,28 +286,28 @@ class LIBARDOUR_API AudioEngine : public PortManager, public SessionHandlePtr
|
||||||
LatencyMeasurement _measuring_latency;
|
LatencyMeasurement _measuring_latency;
|
||||||
PortEngine::PortHandle _latency_input_port;
|
PortEngine::PortHandle _latency_input_port;
|
||||||
PortEngine::PortHandle _latency_output_port;
|
PortEngine::PortHandle _latency_output_port;
|
||||||
samplecnt_t _latency_flush_samples;
|
samplecnt_t _latency_flush_samples;
|
||||||
std::string _latency_input_name;
|
std::string _latency_input_name;
|
||||||
std::string _latency_output_name;
|
std::string _latency_output_name;
|
||||||
samplecnt_t _latency_signal_latency;
|
samplecnt_t _latency_signal_latency;
|
||||||
bool _stopped_for_latency;
|
bool _stopped_for_latency;
|
||||||
bool _started_for_latency;
|
bool _started_for_latency;
|
||||||
bool _in_destructor;
|
bool _in_destructor;
|
||||||
|
|
||||||
std::string _last_backend_error_string;
|
std::string _last_backend_error_string;
|
||||||
|
|
||||||
Glib::Threads::Thread* _hw_reset_event_thread;
|
Glib::Threads::Thread* _hw_reset_event_thread;
|
||||||
gint _hw_reset_request_count;
|
gint _hw_reset_request_count;
|
||||||
Glib::Threads::Cond _hw_reset_condition;
|
Glib::Threads::Cond _hw_reset_condition;
|
||||||
Glib::Threads::Mutex _reset_request_lock;
|
Glib::Threads::Mutex _reset_request_lock;
|
||||||
gint _stop_hw_reset_processing;
|
gint _stop_hw_reset_processing;
|
||||||
Glib::Threads::Thread* _hw_devicelist_update_thread;
|
Glib::Threads::Thread* _hw_devicelist_update_thread;
|
||||||
gint _hw_devicelist_update_count;
|
gint _hw_devicelist_update_count;
|
||||||
Glib::Threads::Cond _hw_devicelist_update_condition;
|
Glib::Threads::Cond _hw_devicelist_update_condition;
|
||||||
Glib::Threads::Mutex _devicelist_update_lock;
|
Glib::Threads::Mutex _devicelist_update_lock;
|
||||||
gint _stop_hw_devicelist_processing;
|
gint _stop_hw_devicelist_processing;
|
||||||
uint32_t _start_cnt;
|
uint32_t _start_cnt;
|
||||||
uint32_t _init_countdown;
|
uint32_t _init_countdown;
|
||||||
|
|
||||||
void start_hw_event_processing();
|
void start_hw_event_processing();
|
||||||
void stop_hw_event_processing();
|
void stop_hw_event_processing();
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,4 @@ private:
|
||||||
|
|
||||||
} /* namespace ARDOUR */
|
} /* namespace ARDOUR */
|
||||||
|
|
||||||
#endif /* __ardour_audio_playlist_h__ */
|
#endif /* __ardour_audio_playlist_h__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ extern cycles_t cacheflush_time;
|
||||||
|
|
||||||
#if defined(__x86_64__)
|
#if defined(__x86_64__)
|
||||||
|
|
||||||
#define rdtscll(lo, hi) \
|
#define rdtscll(lo, hi) \
|
||||||
__asm__ __volatile__("rdtsc" : "=a" (lo), "=d" (hi))
|
__asm__ __volatile__("rdtsc" : "=a" (lo), "=d" (hi))
|
||||||
|
|
||||||
static inline cycles_t get_cycles (void)
|
static inline cycles_t get_cycles (void)
|
||||||
|
|
@ -58,7 +58,7 @@ static inline cycles_t get_cycles (void)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define rdtscll(val) \
|
#define rdtscll(val) \
|
||||||
__asm__ __volatile__("rdtsc" : "=A" (val))
|
__asm__ __volatile__("rdtsc" : "=A" (val))
|
||||||
|
|
||||||
static inline cycles_t get_cycles (void)
|
static inline cycles_t get_cycles (void)
|
||||||
|
|
@ -80,7 +80,7 @@ static inline cycles_t get_cycles(void)
|
||||||
|
|
||||||
#elif defined(__powerpc__)
|
#elif defined(__powerpc__)
|
||||||
|
|
||||||
#define CPU_FTR_601 0x00000100
|
#define CPU_FTR_601 0x00000100
|
||||||
|
|
||||||
typedef uint32_t cycles_t;
|
typedef uint32_t cycles_t;
|
||||||
|
|
||||||
|
|
@ -96,13 +96,13 @@ static inline cycles_t get_cycles(void)
|
||||||
cycles_t ret = 0;
|
cycles_t ret = 0;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"98: mftb %0\n"
|
"98: mftb %0\n"
|
||||||
"99:\n"
|
"99:\n"
|
||||||
".section __ftr_fixup,\"a\"\n"
|
".section __ftr_fixup,\"a\"\n"
|
||||||
" .long %1\n"
|
" .long %1\n"
|
||||||
" .long 0\n"
|
" .long 0\n"
|
||||||
" .long 98b\n"
|
" .long 98b\n"
|
||||||
" .long 99b\n"
|
" .long 99b\n"
|
||||||
".previous"
|
".previous"
|
||||||
: "=r" (ret) : "i" (CPU_FTR_601));
|
: "=r" (ret) : "i" (CPU_FTR_601));
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
|
|
@ -183,13 +183,13 @@ class LIBARDOUR_API RouteExportChannel : public ExportChannel
|
||||||
|
|
||||||
// Removes the processor from the track when deleted
|
// Removes the processor from the track when deleted
|
||||||
class ProcessorRemover {
|
class ProcessorRemover {
|
||||||
public:
|
public:
|
||||||
ProcessorRemover (boost::shared_ptr<Route> route, boost::shared_ptr<CapturingProcessor> processor)
|
ProcessorRemover (boost::shared_ptr<Route> route, boost::shared_ptr<CapturingProcessor> processor)
|
||||||
: route (route), processor (processor) {}
|
: route (route), processor (processor) {}
|
||||||
~ProcessorRemover();
|
~ProcessorRemover();
|
||||||
private:
|
private:
|
||||||
boost::shared_ptr<Route> route;
|
boost::shared_ptr<Route> route;
|
||||||
boost::shared_ptr<CapturingProcessor> processor;
|
boost::shared_ptr<CapturingProcessor> processor;
|
||||||
};
|
};
|
||||||
|
|
||||||
boost::shared_ptr<CapturingProcessor> processor;
|
boost::shared_ptr<CapturingProcessor> processor;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IEC1PPMDSP_H
|
#ifndef __IEC1PPMDSP_H
|
||||||
#define __IEC1PPMDSP_H
|
#define __IEC1PPMDSP_H
|
||||||
|
|
||||||
#include "ardour/libardour_visibility.h"
|
#include "ardour/libardour_visibility.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IEC2PPMDSP_H
|
#ifndef __IEC2PPMDSP_H
|
||||||
#define __IEC2PPMDSP_H
|
#define __IEC2PPMDSP_H
|
||||||
|
|
||||||
#include "ardour/libardour_visibility.h"
|
#include "ardour/libardour_visibility.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,12 @@ class LIBARDOUR_API IOProcessor : public Processor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IOProcessor (Session&, bool with_input, bool with_output,
|
IOProcessor (Session&, bool with_input, bool with_output,
|
||||||
const std::string& proc_name, const std::string io_name="",
|
const std::string& proc_name, const std::string io_name="",
|
||||||
ARDOUR::DataType default_type = DataType::AUDIO, bool sendish=false);
|
ARDOUR::DataType default_type = DataType::AUDIO, bool sendish=false);
|
||||||
IOProcessor (Session&, boost::shared_ptr<IO> input, boost::shared_ptr<IO> output,
|
|
||||||
const std::string& proc_name, ARDOUR::DataType default_type = DataType::AUDIO);
|
IOProcessor (Session&, boost::shared_ptr<IO> input, boost::shared_ptr<IO> output,
|
||||||
|
const std::string& proc_name, ARDOUR::DataType default_type = DataType::AUDIO);
|
||||||
|
|
||||||
virtual ~IOProcessor ();
|
virtual ~IOProcessor ();
|
||||||
|
|
||||||
bool set_name (const std::string& str);
|
bool set_name (const std::string& str);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __KMETERDSP_H
|
#ifndef __KMETERDSP_H
|
||||||
#define __KMETERDSP_H
|
#define __KMETERDSP_H
|
||||||
|
|
||||||
#include "ardour/libardour_visibility.h"
|
#include "ardour/libardour_visibility.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,4 @@ private:
|
||||||
|
|
||||||
} /* namespace ARDOUR */
|
} /* namespace ARDOUR */
|
||||||
|
|
||||||
#endif /* __ardour_midi_playlist_h__ */
|
#endif /* __ardour_midi_playlist_h__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,6 @@ LIBARDOUR_API void default_find_peaks (const ARDOUR::Sample * bu
|
||||||
LIBARDOUR_API void default_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain);
|
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_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);
|
LIBARDOUR_API void default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes);
|
||||||
LIBARDOUR_API void default_copy_vector (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes);
|
LIBARDOUR_API void default_copy_vector (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes);
|
||||||
|
|
||||||
#endif /* __ardour_mix_h__ */
|
#endif /* __ardour_mix_h__ */
|
||||||
|
|
|
||||||
|
|
@ -35,13 +35,13 @@ namespace ARDOUR {
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
// LIBARDOUR_API char* LIBARDOUR_APICALLTYPE placeholder_for_non_msvc_specific_function(s);
|
// LIBARDOUR_API char* LIBARDOUR_APICALLTYPE placeholder_for_non_msvc_specific_function(s);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
} // namespace ARDOUR
|
} // namespace ARDOUR
|
||||||
|
|
||||||
|
|
@ -58,16 +58,16 @@ namespace ARDOUR {
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
LIBARDOUR_API int LIBARDOUR_APICALLTYPE symlink(const char *dest, const char *shortcut, const char *working_directory = 0);
|
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);
|
LIBARDOUR_API int LIBARDOUR_APICALLTYPE readlink(const char *__restrict shortcut, char *__restrict buf, size_t bufsize);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
} // namespace ARDOUR
|
} // namespace ARDOUR
|
||||||
|
|
||||||
#endif // COMPILER_MSVC
|
#endif // COMPILER_MSVC
|
||||||
#endif // __mavc_libardour_h__
|
#endif // __mavc_libardour_h__
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,4 @@ private:
|
||||||
|
|
||||||
} /* namespace ARDOUR */
|
} /* namespace ARDOUR */
|
||||||
|
|
||||||
#endif /* __ardour_note_fixer_h__ */
|
#endif /* __ardour_note_fixer_h__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -426,6 +426,4 @@ private:
|
||||||
|
|
||||||
} /* namespace ARDOUR */
|
} /* namespace ARDOUR */
|
||||||
|
|
||||||
#endif /* __ardour_playlist_h__ */
|
#endif /* __ardour_playlist_h__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -172,8 +172,8 @@ private:
|
||||||
|
|
||||||
ARDOUR::PluginInfoList _empty_plugin_info;
|
ARDOUR::PluginInfoList _empty_plugin_info;
|
||||||
ARDOUR::PluginInfoList* _windows_vst_plugin_info;
|
ARDOUR::PluginInfoList* _windows_vst_plugin_info;
|
||||||
ARDOUR::PluginInfoList* _lxvst_plugin_info;
|
ARDOUR::PluginInfoList* _lxvst_plugin_info;
|
||||||
ARDOUR::PluginInfoList* _mac_vst_plugin_info;
|
ARDOUR::PluginInfoList* _mac_vst_plugin_info;
|
||||||
ARDOUR::PluginInfoList* _ladspa_plugin_info;
|
ARDOUR::PluginInfoList* _ladspa_plugin_info;
|
||||||
ARDOUR::PluginInfoList* _lv2_plugin_info;
|
ARDOUR::PluginInfoList* _lv2_plugin_info;
|
||||||
ARDOUR::PluginInfoList* _au_plugin_info;
|
ARDOUR::PluginInfoList* _au_plugin_info;
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ protected:
|
||||||
|
|
||||||
PortEngine::PortHandle _port_handle;
|
PortEngine::PortHandle _port_handle;
|
||||||
|
|
||||||
static bool _connecting_blocked;
|
static bool _connecting_blocked;
|
||||||
static pframes_t _cycle_nframes; /* access only from process() tree */
|
static pframes_t _cycle_nframes; /* access only from process() tree */
|
||||||
|
|
||||||
static pframes_t _global_port_buffer_offset; /* access only from process() tree */
|
static pframes_t _global_port_buffer_offset; /* access only from process() tree */
|
||||||
|
|
|
||||||
|
|
@ -73,13 +73,12 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
|
||||||
* There are several pathways for the order being set:
|
* There are several pathways for the order being set:
|
||||||
*
|
*
|
||||||
* - object created during session loading from XML
|
* - object created during session loading from XML
|
||||||
* - numeric order will be set during ::set_state(), based on
|
* - numeric order will be set during ::set_state(), based on
|
||||||
* - type will be set during ctor call
|
* - type will be set during ctor call
|
||||||
*
|
*
|
||||||
* - object created in response to user request
|
* - object created in response to user request
|
||||||
* - numeric order will be set by Session, before adding
|
* - numeric order will be set by Session, before adding to container.
|
||||||
* to container.
|
* - type set during ctor call
|
||||||
* - type set during ctor call
|
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* OBJECT IDENTITY
|
* OBJECT IDENTITY
|
||||||
|
|
|
||||||
|
|
@ -586,7 +586,7 @@ public:
|
||||||
bool has_external_redirects() const;
|
bool has_external_redirects() const;
|
||||||
|
|
||||||
/* can only be executed by a route for which is_monitor() is true
|
/* can only be executed by a route for which is_monitor() is true
|
||||||
* (i.e. the monitor out)
|
* (i.e. the monitor out)
|
||||||
*/
|
*/
|
||||||
void monitor_run (samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes);
|
void monitor_run (samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,19 +25,19 @@
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
|
|
||||||
typedef float (*compute_peak_t) (const ARDOUR::Sample *, pframes_t, float);
|
typedef float (*compute_peak_t) (const ARDOUR::Sample *, pframes_t, float);
|
||||||
typedef void (*find_peaks_t) (const ARDOUR::Sample *, pframes_t, float *, float*);
|
typedef void (*find_peaks_t) (const ARDOUR::Sample *, pframes_t, float *, float*);
|
||||||
typedef void (*apply_gain_to_buffer_t) (ARDOUR::Sample *, pframes_t, float);
|
typedef void (*apply_gain_to_buffer_t) (ARDOUR::Sample *, pframes_t, float);
|
||||||
typedef void (*mix_buffers_with_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, pframes_t, float);
|
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);
|
typedef void (*mix_buffers_no_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, pframes_t);
|
||||||
typedef void (*copy_vector_t) (ARDOUR::Sample *, const ARDOUR::Sample *, pframes_t);
|
typedef void (*copy_vector_t) (ARDOUR::Sample *, const ARDOUR::Sample *, pframes_t);
|
||||||
|
|
||||||
LIBARDOUR_API extern compute_peak_t compute_peak;
|
LIBARDOUR_API extern compute_peak_t compute_peak;
|
||||||
LIBARDOUR_API extern find_peaks_t find_peaks;
|
LIBARDOUR_API extern find_peaks_t find_peaks;
|
||||||
LIBARDOUR_API extern apply_gain_to_buffer_t apply_gain_to_buffer;
|
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_with_gain_t mix_buffers_with_gain;
|
||||||
LIBARDOUR_API extern mix_buffers_no_gain_t mix_buffers_no_gain;
|
LIBARDOUR_API extern mix_buffers_no_gain_t mix_buffers_no_gain;
|
||||||
LIBARDOUR_API extern copy_vector_t copy_vector;
|
LIBARDOUR_API extern copy_vector_t copy_vector;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __ardour_runtime_functions_h__ */
|
#endif /* __ardour_runtime_functions_h__ */
|
||||||
|
|
|
||||||
|
|
@ -32,18 +32,18 @@ public:
|
||||||
SoundcloudUploader();
|
SoundcloudUploader();
|
||||||
~SoundcloudUploader();
|
~SoundcloudUploader();
|
||||||
|
|
||||||
std::string Get_Auth_Token(std::string username, std::string password);
|
std::string Get_Auth_Token(std::string username, std::string password);
|
||||||
std::string Upload (std::string file_path, std::string title, std::string token, bool ispublic, bool downloadable, ARDOUR::ExportHandler *caller);
|
std::string Upload (std::string file_path, std::string title, std::string token, bool ispublic, bool downloadable, ARDOUR::ExportHandler *caller);
|
||||||
static int progress_callback(void *caller, double dltotal, double dlnow, double ultotal, double ulnow);
|
static int progress_callback(void *caller, double dltotal, double dlnow, double ultotal, double ulnow);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void setcUrlOptions();
|
void setcUrlOptions();
|
||||||
|
|
||||||
CURL *curl_handle;
|
CURL *curl_handle;
|
||||||
CURLM *multi_handle;
|
CURLM *multi_handle;
|
||||||
char errorBuffer[CURL_ERROR_SIZE]; // storage for cUrl error message
|
char errorBuffer[CURL_ERROR_SIZE]; // storage for cUrl error message
|
||||||
|
|
||||||
std::string title;
|
std::string title;
|
||||||
ARDOUR::ExportHandler *caller;
|
ARDOUR::ExportHandler *caller;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ class LIBARDOUR_API SoundPlaylist : public EDL::Playlist {
|
||||||
|
|
||||||
} /* namespace ARDOUR */
|
} /* namespace ARDOUR */
|
||||||
|
|
||||||
#endif /* __soundseq_h__ */
|
#endif /* __soundseq_h__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ class LIBARDOUR_API TransportMaster : public PBD::Stateful {
|
||||||
* ARDOURs transport position to the slaves requested transport position.
|
* ARDOURs transport position to the slaves requested transport position.
|
||||||
* </li>
|
* </li>
|
||||||
* <li>TransportMaster::locked() should return true, otherwise Session::no_roll will be called</li>
|
* <li>TransportMaster::locked() should return true, otherwise Session::no_roll will be called</li>
|
||||||
* <li>TransportMaster::starting() should be false, otherwise the transport will not move until it becomes true</li> *
|
* <li>TransportMaster::starting() should be false, otherwise the transport will not move until it becomes true</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @param speed - The transport speed requested
|
* @param speed - The transport speed requested
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,10 @@
|
||||||
#ifndef _VESTIGE_H
|
#ifndef _VESTIGE_H
|
||||||
#define _VESTIGE_H
|
#define _VESTIGE_H
|
||||||
|
|
||||||
#define CCONST(a, b, c, d)( ( ( (int) a ) << 24 ) | \
|
#define CCONST(a, b, c, d) (( ((int) a) << 24 ) | \
|
||||||
( ( (int) b ) << 16 ) | \
|
( ((int) b) << 16 ) | \
|
||||||
( ( (int) c ) << 8 ) | \
|
( ((int) c) << 8 ) | \
|
||||||
( ( (int) d ) << 0 ) )
|
( ((int) d) << 0 ))
|
||||||
|
|
||||||
#define audioMasterAutomate 0
|
#define audioMasterAutomate 0
|
||||||
#define audioMasterVersion 1
|
#define audioMasterVersion 1
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __VUMETERDSP_H
|
#ifndef __VUMETERDSP_H
|
||||||
#define __VUMETERDSP_H
|
#define __VUMETERDSP_H
|
||||||
|
|
||||||
#include "ardour/libardour_visibility.h"
|
#include "ardour/libardour_visibility.h"
|
||||||
|
|
||||||
|
|
@ -46,5 +46,4 @@ private:
|
||||||
static float _g; // gain factor
|
static float _g; // gain factor
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1381,8 +1381,8 @@ AUPlugin::can_support_io_configuration (const ChanCount& in, ChanCount& out, Cha
|
||||||
float penalty = 9999;
|
float penalty = 9999;
|
||||||
int used_possible_in = 0;
|
int used_possible_in = 0;
|
||||||
#if defined (__clang__)
|
#if defined (__clang__)
|
||||||
# pragma clang diagnostic push
|
# pragma clang diagnostic push
|
||||||
# pragma clang diagnostic ignored "-Wtautological-compare"
|
# pragma clang diagnostic ignored "-Wtautological-compare"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FOUNDCFG(nch) { \
|
#define FOUNDCFG(nch) { \
|
||||||
|
|
@ -1575,7 +1575,7 @@ AUPlugin::can_support_io_configuration (const ChanCount& in, ChanCount& out, Cha
|
||||||
DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("\tCHOSEN: in %1 out %2\n", in, out));
|
DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("\tCHOSEN: in %1 out %2\n", in, out));
|
||||||
|
|
||||||
#if defined (__clang__)
|
#if defined (__clang__)
|
||||||
# pragma clang diagnostic pop
|
# pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -3102,7 +3102,7 @@ AUPluginInfo::cached_io_configuration (const std::string& unique_id,
|
||||||
* bus configs as incremental options.
|
* bus configs as incremental options.
|
||||||
*/
|
*/
|
||||||
Boolean* isWritable = 0;
|
Boolean* isWritable = 0;
|
||||||
UInt32 dataSize = 0;
|
UInt32 dataSize = 0;
|
||||||
OSStatus result = AudioUnitGetPropertyInfo (unit.AU(),
|
OSStatus result = AudioUnitGetPropertyInfo (unit.AU(),
|
||||||
kAudioUnitProperty_SupportedNumChannels,
|
kAudioUnitProperty_SupportedNumChannels,
|
||||||
kAudioUnitScope_Global, 0,
|
kAudioUnitScope_Global, 0,
|
||||||
|
|
|
||||||
|
|
@ -335,7 +335,7 @@ AudioFileSource::safe_audio_file_extension(const string& file)
|
||||||
".mp3", ".MP3",
|
".mp3", ".MP3",
|
||||||
".mp4", ".MP4",
|
".mp4", ".MP4",
|
||||||
".m4a", ".M4A",
|
".m4a", ".M4A",
|
||||||
".sd2", ".SD2", // libsndfile supports sd2 also, but the resource fork is required to open.
|
".sd2", ".SD2", // libsndfile supports sd2 also, but the resource fork is required to open.
|
||||||
#endif // HAVE_COREAUDIO
|
#endif // HAVE_COREAUDIO
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -150,27 +150,27 @@ void
|
||||||
AudioRegion::make_property_quarks ()
|
AudioRegion::make_property_quarks ()
|
||||||
{
|
{
|
||||||
Properties::envelope_active.property_id = g_quark_from_static_string (X_("envelope-active"));
|
Properties::envelope_active.property_id = g_quark_from_static_string (X_("envelope-active"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for envelope-active = %1\n", Properties::envelope_active.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for envelope-active = %1\n", Properties::envelope_active.property_id));
|
||||||
Properties::default_fade_in.property_id = g_quark_from_static_string (X_("default-fade-in"));
|
Properties::default_fade_in.property_id = g_quark_from_static_string (X_("default-fade-in"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for default-fade-in = %1\n", Properties::default_fade_in.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for default-fade-in = %1\n", Properties::default_fade_in.property_id));
|
||||||
Properties::default_fade_out.property_id = g_quark_from_static_string (X_("default-fade-out"));
|
Properties::default_fade_out.property_id = g_quark_from_static_string (X_("default-fade-out"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for default-fade-out = %1\n", Properties::default_fade_out.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for default-fade-out = %1\n", Properties::default_fade_out.property_id));
|
||||||
Properties::fade_in_active.property_id = g_quark_from_static_string (X_("fade-in-active"));
|
Properties::fade_in_active.property_id = g_quark_from_static_string (X_("fade-in-active"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for fade-in-active = %1\n", Properties::fade_in_active.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for fade-in-active = %1\n", Properties::fade_in_active.property_id));
|
||||||
Properties::fade_out_active.property_id = g_quark_from_static_string (X_("fade-out-active"));
|
Properties::fade_out_active.property_id = g_quark_from_static_string (X_("fade-out-active"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for fade-out-active = %1\n", Properties::fade_out_active.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for fade-out-active = %1\n", Properties::fade_out_active.property_id));
|
||||||
Properties::scale_amplitude.property_id = g_quark_from_static_string (X_("scale-amplitude"));
|
Properties::scale_amplitude.property_id = g_quark_from_static_string (X_("scale-amplitude"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for scale-amplitude = %1\n", Properties::scale_amplitude.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for scale-amplitude = %1\n", Properties::scale_amplitude.property_id));
|
||||||
Properties::fade_in.property_id = g_quark_from_static_string (X_("FadeIn"));
|
Properties::fade_in.property_id = g_quark_from_static_string (X_("FadeIn"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for FadeIn = %1\n", Properties::fade_in.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for FadeIn = %1\n", Properties::fade_in.property_id));
|
||||||
Properties::inverse_fade_in.property_id = g_quark_from_static_string (X_("InverseFadeIn"));
|
Properties::inverse_fade_in.property_id = g_quark_from_static_string (X_("InverseFadeIn"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for InverseFadeIn = %1\n", Properties::inverse_fade_in.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for InverseFadeIn = %1\n", Properties::inverse_fade_in.property_id));
|
||||||
Properties::fade_out.property_id = g_quark_from_static_string (X_("FadeOut"));
|
Properties::fade_out.property_id = g_quark_from_static_string (X_("FadeOut"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for FadeOut = %1\n", Properties::fade_out.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for FadeOut = %1\n", Properties::fade_out.property_id));
|
||||||
Properties::inverse_fade_out.property_id = g_quark_from_static_string (X_("InverseFadeOut"));
|
Properties::inverse_fade_out.property_id = g_quark_from_static_string (X_("InverseFadeOut"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for InverseFadeOut = %1\n", Properties::inverse_fade_out.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for InverseFadeOut = %1\n", Properties::inverse_fade_out.property_id));
|
||||||
Properties::envelope.property_id = g_quark_from_static_string (X_("Envelope"));
|
Properties::envelope.property_id = g_quark_from_static_string (X_("Envelope"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for Envelope = %1\n", Properties::envelope.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for Envelope = %1\n", Properties::envelope.property_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -261,8 +261,8 @@ AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other)
|
||||||
: Region (other)
|
: Region (other)
|
||||||
, AUDIOREGION_COPY_STATE (other)
|
, AUDIOREGION_COPY_STATE (other)
|
||||||
/* As far as I can see, the _envelope's times are relative to region position, and have nothing
|
/* As far as I can see, the _envelope's times are relative to region position, and have nothing
|
||||||
to do with sources (and hence _start). So when we copy the envelope, we just use the supplied offset.
|
* to do with sources (and hence _start). So when we copy the envelope, we just use the supplied offset.
|
||||||
*/
|
*/
|
||||||
, _envelope (Properties::envelope, boost::shared_ptr<AutomationList> (new AutomationList (*other->_envelope.val(), 0, other->_length)))
|
, _envelope (Properties::envelope, boost::shared_ptr<AutomationList> (new AutomationList (*other->_envelope.val(), 0, other->_length)))
|
||||||
, _automatable (other->session())
|
, _automatable (other->session())
|
||||||
, _fade_in_suspended (0)
|
, _fade_in_suspended (0)
|
||||||
|
|
@ -1195,7 +1195,7 @@ AudioRegion::set_fade_out_length (samplecnt_t len)
|
||||||
len = 64;
|
len = 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool changed = _fade_out->extend_to (len);
|
bool changed = _fade_out->extend_to (len);
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,7 @@ ExportHandler::finish_timespan ()
|
||||||
if (!fmt->command().empty()) {
|
if (!fmt->command().empty()) {
|
||||||
SessionMetadata const & metadata (*SessionMetadata::Metadata());
|
SessionMetadata const & metadata (*SessionMetadata::Metadata());
|
||||||
|
|
||||||
#if 0 // would be nicer with C++11 initialiser...
|
#if 0 // would be nicer with C++11 initialiser...
|
||||||
std::map<char, std::string> subs {
|
std::map<char, std::string> subs {
|
||||||
{ 'f', filename },
|
{ 'f', filename },
|
||||||
{ 'd', Glib::path_get_dirname(filename) + G_DIR_SEPARATOR },
|
{ 'd', Glib::path_get_dirname(filename) + G_DIR_SEPARATOR },
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,6 @@ ExportProfileManager::prepare_for_export ()
|
||||||
++format_it, ++filename_it) {
|
++format_it, ++filename_it) {
|
||||||
|
|
||||||
ExportFilenamePtr filename = (*filename_it)->filename;
|
ExportFilenamePtr filename = (*filename_it)->filename;
|
||||||
// filename->include_timespan = (ts_list->size() > 1); Disabled for now...
|
|
||||||
|
|
||||||
boost::shared_ptr<BroadcastInfo> b;
|
boost::shared_ptr<BroadcastInfo> b;
|
||||||
if ((*format_it)->format->has_broadcast_info()) {
|
if ((*format_it)->format->has_broadcast_info()) {
|
||||||
|
|
@ -943,8 +942,6 @@ ExportProfileManager::check_config (boost::shared_ptr<Warnings> warnings,
|
||||||
|
|
||||||
/* Check filenames */
|
/* Check filenames */
|
||||||
|
|
||||||
// filename->include_timespan = (timespans->size() > 1); Disabled for now...
|
|
||||||
|
|
||||||
std::list<string> paths;
|
std::list<string> paths;
|
||||||
build_filenames(paths, filename, timespans, channel_config, format);
|
build_filenames(paths, filename, timespans, channel_config, format);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ find_peaks_t ARDOUR::find_peaks = 0;
|
||||||
apply_gain_to_buffer_t ARDOUR::apply_gain_to_buffer = 0;
|
apply_gain_to_buffer_t ARDOUR::apply_gain_to_buffer = 0;
|
||||||
mix_buffers_with_gain_t ARDOUR::mix_buffers_with_gain = 0;
|
mix_buffers_with_gain_t ARDOUR::mix_buffers_with_gain = 0;
|
||||||
mix_buffers_no_gain_t ARDOUR::mix_buffers_no_gain = 0;
|
mix_buffers_no_gain_t ARDOUR::mix_buffers_no_gain = 0;
|
||||||
copy_vector_t ARDOUR::copy_vector = 0;
|
copy_vector_t ARDOUR::copy_vector = 0;
|
||||||
|
|
||||||
PBD::Signal1<void,std::string> ARDOUR::BootMessage;
|
PBD::Signal1<void,std::string> ARDOUR::BootMessage;
|
||||||
PBD::Signal3<void,std::string,std::string,bool> ARDOUR::PluginScanMessage;
|
PBD::Signal3<void,std::string,std::string,bool> ARDOUR::PluginScanMessage;
|
||||||
|
|
|
||||||
|
|
@ -1384,8 +1384,6 @@ IO::enable_connecting ()
|
||||||
void
|
void
|
||||||
IO::bundle_changed (Bundle::Change /*c*/)
|
IO::bundle_changed (Bundle::Change /*c*/)
|
||||||
{
|
{
|
||||||
/* XXX */
|
|
||||||
// connect_input_ports_to_bundle (_input_bundle, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,7 @@ ParameterDescriptor::midi_note_num (const std::string& name)
|
||||||
{
|
{
|
||||||
static NameNumMap name2num = build_midi_name2num();
|
static NameNumMap name2num = build_midi_name2num();
|
||||||
|
|
||||||
uint8_t num = -1; // -1 (or 255) is returned in case of failure
|
uint8_t num = -1; // -1 (or 255) is returned in case of failure
|
||||||
|
|
||||||
NameNumMap::const_iterator it = name2num.find(normalize_note_name(name));
|
NameNumMap::const_iterator it = name2num.find(normalize_note_name(name));
|
||||||
if (it != name2num.end())
|
if (it != name2num.end())
|
||||||
|
|
|
||||||
|
|
@ -637,7 +637,7 @@ PluginManager::ladspa_discover (string path)
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("Checking for LADSPA plugin at %1\n", path));
|
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("Checking for LADSPA plugin at %1\n", path));
|
||||||
|
|
||||||
Glib::Module module(path);
|
Glib::Module module (path);
|
||||||
const LADSPA_Descriptor *descriptor;
|
const LADSPA_Descriptor *descriptor;
|
||||||
LADSPA_Descriptor_Function dfunc;
|
LADSPA_Descriptor_Function dfunc;
|
||||||
void* func = 0;
|
void* func = 0;
|
||||||
|
|
@ -739,9 +739,6 @@ PluginManager::ladspa_discover (string path)
|
||||||
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("Found LADSPA plugin, name: %1, Inputs: %2, Outputs: %3\n", info->name, info->n_inputs, info->n_outputs));
|
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("Found LADSPA plugin, name: %1, Inputs: %2, Outputs: %3\n", info->name, info->n_inputs, info->n_outputs));
|
||||||
}
|
}
|
||||||
|
|
||||||
// GDB WILL NOT LIKE YOU IF YOU DO THIS
|
|
||||||
// dlclose (module);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,12 +123,12 @@ const PresentationInfo::Flag PresentationInfo::MixerStripables = PresentationInf
|
||||||
void
|
void
|
||||||
PresentationInfo::make_property_quarks ()
|
PresentationInfo::make_property_quarks ()
|
||||||
{
|
{
|
||||||
Properties::selected.property_id = g_quark_from_static_string (X_("selected"));
|
Properties::selected.property_id = g_quark_from_static_string (X_("selected"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for selected = %1\n", Properties::selected.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for selected = %1\n", Properties::selected.property_id));
|
||||||
Properties::color.property_id = g_quark_from_static_string (X_("color"));
|
Properties::color.property_id = g_quark_from_static_string (X_("color"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for color = %1\n", Properties::color.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for color = %1\n", Properties::color.property_id));
|
||||||
Properties::order.property_id = g_quark_from_static_string (X_("order"));
|
Properties::order.property_id = g_quark_from_static_string (X_("order"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for order = %1\n", Properties::order.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for order = %1\n", Properties::order.property_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
PresentationInfo::PresentationInfo (Flag f)
|
PresentationInfo::PresentationInfo (Flag f)
|
||||||
|
|
|
||||||
|
|
@ -257,13 +257,14 @@ RCConfiguration::set_variables (const XMLNode& node)
|
||||||
#undef CONFIG_VARIABLE
|
#undef CONFIG_VARIABLE
|
||||||
#undef CONFIG_VARIABLE_SPECIAL
|
#undef CONFIG_VARIABLE_SPECIAL
|
||||||
#define CONFIG_VARIABLE(type,var,name,value) \
|
#define CONFIG_VARIABLE(type,var,name,value) \
|
||||||
if (var.set_from_node (node)) { \
|
if (var.set_from_node (node)) { \
|
||||||
ParameterChanged (name); \
|
ParameterChanged (name); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) \
|
#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) \
|
||||||
if (var.set_from_node (node)) { \
|
if (var.set_from_node (node)) { \
|
||||||
ParameterChanged (name); \
|
ParameterChanged (name); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "ardour/rc_configuration_vars.h"
|
#include "ardour/rc_configuration_vars.h"
|
||||||
#undef CONFIG_VARIABLE
|
#undef CONFIG_VARIABLE
|
||||||
|
|
|
||||||
|
|
@ -84,57 +84,57 @@ void
|
||||||
Region::make_property_quarks ()
|
Region::make_property_quarks ()
|
||||||
{
|
{
|
||||||
Properties::muted.property_id = g_quark_from_static_string (X_("muted"));
|
Properties::muted.property_id = g_quark_from_static_string (X_("muted"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for muted = %1\n", Properties::muted.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for muted = %1\n", Properties::muted.property_id));
|
||||||
Properties::opaque.property_id = g_quark_from_static_string (X_("opaque"));
|
Properties::opaque.property_id = g_quark_from_static_string (X_("opaque"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for opaque = %1\n", Properties::opaque.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for opaque = %1\n", Properties::opaque.property_id));
|
||||||
Properties::locked.property_id = g_quark_from_static_string (X_("locked"));
|
Properties::locked.property_id = g_quark_from_static_string (X_("locked"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for locked = %1\n", Properties::locked.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for locked = %1\n", Properties::locked.property_id));
|
||||||
Properties::video_locked.property_id = g_quark_from_static_string (X_("video-locked"));
|
Properties::video_locked.property_id = g_quark_from_static_string (X_("video-locked"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for video-locked = %1\n", Properties::video_locked.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for video-locked = %1\n", Properties::video_locked.property_id));
|
||||||
Properties::automatic.property_id = g_quark_from_static_string (X_("automatic"));
|
Properties::automatic.property_id = g_quark_from_static_string (X_("automatic"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for automatic = %1\n", Properties::automatic.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for automatic = %1\n", Properties::automatic.property_id));
|
||||||
Properties::whole_file.property_id = g_quark_from_static_string (X_("whole-file"));
|
Properties::whole_file.property_id = g_quark_from_static_string (X_("whole-file"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for whole-file = %1\n", Properties::whole_file.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for whole-file = %1\n", Properties::whole_file.property_id));
|
||||||
Properties::import.property_id = g_quark_from_static_string (X_("import"));
|
Properties::import.property_id = g_quark_from_static_string (X_("import"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for import = %1\n", Properties::import.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for import = %1\n", Properties::import.property_id));
|
||||||
Properties::external.property_id = g_quark_from_static_string (X_("external"));
|
Properties::external.property_id = g_quark_from_static_string (X_("external"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for external = %1\n", Properties::external.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for external = %1\n", Properties::external.property_id));
|
||||||
Properties::sync_marked.property_id = g_quark_from_static_string (X_("sync-marked"));
|
Properties::sync_marked.property_id = g_quark_from_static_string (X_("sync-marked"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for sync-marked = %1\n", Properties::sync_marked.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for sync-marked = %1\n", Properties::sync_marked.property_id));
|
||||||
Properties::left_of_split.property_id = g_quark_from_static_string (X_("left-of-split"));
|
Properties::left_of_split.property_id = g_quark_from_static_string (X_("left-of-split"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for left-of-split = %1\n", Properties::left_of_split.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for left-of-split = %1\n", Properties::left_of_split.property_id));
|
||||||
Properties::right_of_split.property_id = g_quark_from_static_string (X_("right-of-split"));
|
Properties::right_of_split.property_id = g_quark_from_static_string (X_("right-of-split"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for right-of-split = %1\n", Properties::right_of_split.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for right-of-split = %1\n", Properties::right_of_split.property_id));
|
||||||
Properties::hidden.property_id = g_quark_from_static_string (X_("hidden"));
|
Properties::hidden.property_id = g_quark_from_static_string (X_("hidden"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for hidden = %1\n", Properties::hidden.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for hidden = %1\n", Properties::hidden.property_id));
|
||||||
Properties::position_locked.property_id = g_quark_from_static_string (X_("position-locked"));
|
Properties::position_locked.property_id = g_quark_from_static_string (X_("position-locked"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for position-locked = %1\n", Properties::position_locked.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for position-locked = %1\n", Properties::position_locked.property_id));
|
||||||
Properties::valid_transients.property_id = g_quark_from_static_string (X_("valid-transients"));
|
Properties::valid_transients.property_id = g_quark_from_static_string (X_("valid-transients"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for valid-transients = %1\n", Properties::valid_transients.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for valid-transients = %1\n", Properties::valid_transients.property_id));
|
||||||
Properties::start.property_id = g_quark_from_static_string (X_("start"));
|
Properties::start.property_id = g_quark_from_static_string (X_("start"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for start = %1\n", Properties::start.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for start = %1\n", Properties::start.property_id));
|
||||||
Properties::length.property_id = g_quark_from_static_string (X_("length"));
|
Properties::length.property_id = g_quark_from_static_string (X_("length"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for length = %1\n", Properties::length.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for length = %1\n", Properties::length.property_id));
|
||||||
Properties::position.property_id = g_quark_from_static_string (X_("position"));
|
Properties::position.property_id = g_quark_from_static_string (X_("position"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for position = %1\n", Properties::position.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for position = %1\n", Properties::position.property_id));
|
||||||
Properties::beat.property_id = g_quark_from_static_string (X_("beat"));
|
Properties::beat.property_id = g_quark_from_static_string (X_("beat"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for beat = %1\n", Properties::beat.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for beat = %1\n", Properties::beat.property_id));
|
||||||
Properties::sync_position.property_id = g_quark_from_static_string (X_("sync-position"));
|
Properties::sync_position.property_id = g_quark_from_static_string (X_("sync-position"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for sync-position = %1\n", Properties::sync_position.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for sync-position = %1\n", Properties::sync_position.property_id));
|
||||||
Properties::layer.property_id = g_quark_from_static_string (X_("layer"));
|
Properties::layer.property_id = g_quark_from_static_string (X_("layer"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for layer = %1\n", Properties::layer.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for layer = %1\n", Properties::layer.property_id));
|
||||||
Properties::ancestral_start.property_id = g_quark_from_static_string (X_("ancestral-start"));
|
Properties::ancestral_start.property_id = g_quark_from_static_string (X_("ancestral-start"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for ancestral-start = %1\n", Properties::ancestral_start.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for ancestral-start = %1\n", Properties::ancestral_start.property_id));
|
||||||
Properties::ancestral_length.property_id = g_quark_from_static_string (X_("ancestral-length"));
|
Properties::ancestral_length.property_id = g_quark_from_static_string (X_("ancestral-length"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for ancestral-length = %1\n", Properties::ancestral_length.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for ancestral-length = %1\n", Properties::ancestral_length.property_id));
|
||||||
Properties::stretch.property_id = g_quark_from_static_string (X_("stretch"));
|
Properties::stretch.property_id = g_quark_from_static_string (X_("stretch"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for stretch = %1\n", Properties::stretch.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for stretch = %1\n", Properties::stretch.property_id));
|
||||||
Properties::shift.property_id = g_quark_from_static_string (X_("shift"));
|
Properties::shift.property_id = g_quark_from_static_string (X_("shift"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for shift = %1\n", Properties::shift.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for shift = %1\n", Properties::shift.property_id));
|
||||||
Properties::position_lock_style.property_id = g_quark_from_static_string (X_("positional-lock-style"));
|
Properties::position_lock_style.property_id = g_quark_from_static_string (X_("positional-lock-style"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for position_lock_style = %1\n", Properties::position_lock_style.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for position_lock_style = %1\n", Properties::position_lock_style.property_id));
|
||||||
Properties::layering_index.property_id = g_quark_from_static_string (X_("layering-index"));
|
Properties::layering_index.property_id = g_quark_from_static_string (X_("layering-index"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for layering_index = %1\n", Properties::layering_index.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for layering_index = %1\n", Properties::layering_index.property_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -174,8 +174,8 @@ Region::register_properties ()
|
||||||
, _left_of_split (Properties::left_of_split, false) \
|
, _left_of_split (Properties::left_of_split, false) \
|
||||||
, _right_of_split (Properties::right_of_split, false) \
|
, _right_of_split (Properties::right_of_split, false) \
|
||||||
, _valid_transients (Properties::valid_transients, false) \
|
, _valid_transients (Properties::valid_transients, false) \
|
||||||
, _start (Properties::start, (s)) \
|
, _start (Properties::start, (s)) \
|
||||||
, _length (Properties::length, (l)) \
|
, _length (Properties::length, (l)) \
|
||||||
, _position (Properties::position, 0) \
|
, _position (Properties::position, 0) \
|
||||||
, _beat (Properties::beat, 0.0) \
|
, _beat (Properties::beat, 0.0) \
|
||||||
, _sync_position (Properties::sync_position, (s)) \
|
, _sync_position (Properties::sync_position, (s)) \
|
||||||
|
|
@ -206,32 +206,32 @@ Region::register_properties ()
|
||||||
, _left_of_split (Properties::left_of_split, other->_left_of_split) \
|
, _left_of_split (Properties::left_of_split, other->_left_of_split) \
|
||||||
, _right_of_split (Properties::right_of_split, other->_right_of_split) \
|
, _right_of_split (Properties::right_of_split, other->_right_of_split) \
|
||||||
, _valid_transients (Properties::valid_transients, other->_valid_transients) \
|
, _valid_transients (Properties::valid_transients, other->_valid_transients) \
|
||||||
, _start(Properties::start, other->_start) \
|
, _start(Properties::start, other->_start) \
|
||||||
, _length(Properties::length, other->_length) \
|
, _length(Properties::length, other->_length) \
|
||||||
, _position(Properties::position, other->_position) \
|
, _position(Properties::position, other->_position) \
|
||||||
, _beat (Properties::beat, other->_beat) \
|
, _beat (Properties::beat, other->_beat) \
|
||||||
, _sync_position(Properties::sync_position, other->_sync_position) \
|
, _sync_position(Properties::sync_position, other->_sync_position) \
|
||||||
, _quarter_note (other->_quarter_note) \
|
, _quarter_note (other->_quarter_note) \
|
||||||
, _user_transients (other->_user_transients) \
|
, _user_transients (other->_user_transients) \
|
||||||
, _transient_user_start (other->_transient_user_start) \
|
, _transient_user_start (other->_transient_user_start) \
|
||||||
, _transients (other->_transients) \
|
, _transients (other->_transients) \
|
||||||
, _transient_analysis_start (other->_transient_analysis_start) \
|
, _transient_analysis_start (other->_transient_analysis_start) \
|
||||||
, _transient_analysis_end (other->_transient_analysis_end) \
|
, _transient_analysis_end (other->_transient_analysis_end) \
|
||||||
, _soloSelected (false) \
|
, _soloSelected (false) \
|
||||||
, _muted (Properties::muted, other->_muted) \
|
, _muted (Properties::muted, other->_muted) \
|
||||||
, _opaque (Properties::opaque, other->_opaque) \
|
, _opaque (Properties::opaque, other->_opaque) \
|
||||||
, _locked (Properties::locked, other->_locked) \
|
, _locked (Properties::locked, other->_locked) \
|
||||||
, _video_locked (Properties::video_locked, other->_video_locked) \
|
, _video_locked (Properties::video_locked, other->_video_locked) \
|
||||||
, _automatic (Properties::automatic, other->_automatic) \
|
, _automatic (Properties::automatic, other->_automatic) \
|
||||||
, _whole_file (Properties::whole_file, other->_whole_file) \
|
, _whole_file (Properties::whole_file, other->_whole_file) \
|
||||||
, _import (Properties::import, other->_import) \
|
, _import (Properties::import, other->_import) \
|
||||||
, _external (Properties::external, other->_external) \
|
, _external (Properties::external, other->_external) \
|
||||||
, _hidden (Properties::hidden, other->_hidden) \
|
, _hidden (Properties::hidden, other->_hidden) \
|
||||||
, _position_locked (Properties::position_locked, other->_position_locked) \
|
, _position_locked (Properties::position_locked, other->_position_locked) \
|
||||||
, _ancestral_start (Properties::ancestral_start, other->_ancestral_start) \
|
, _ancestral_start (Properties::ancestral_start, other->_ancestral_start) \
|
||||||
, _ancestral_length (Properties::ancestral_length, other->_ancestral_length) \
|
, _ancestral_length (Properties::ancestral_length, other->_ancestral_length) \
|
||||||
, _stretch (Properties::stretch, other->_stretch) \
|
, _stretch (Properties::stretch, other->_stretch) \
|
||||||
, _shift (Properties::shift, other->_shift) \
|
, _shift (Properties::shift, other->_shift) \
|
||||||
, _position_lock_style (Properties::position_lock_style, other->_position_lock_style) \
|
, _position_lock_style (Properties::position_lock_style, other->_position_lock_style) \
|
||||||
, _layering_index (Properties::layering_index, other->_layering_index)
|
, _layering_index (Properties::layering_index, other->_layering_index)
|
||||||
|
|
||||||
|
|
@ -301,15 +301,15 @@ Region::Region (boost::shared_ptr<const Region> other)
|
||||||
_quarter_note = other->_quarter_note;
|
_quarter_note = other->_quarter_note;
|
||||||
|
|
||||||
/* sync pos is relative to start of file. our start-in-file is now zero,
|
/* sync pos is relative to start of file. our start-in-file is now zero,
|
||||||
so set our sync position to whatever the the difference between
|
* so set our sync position to whatever the the difference between
|
||||||
_start and _sync_pos was in the other region.
|
* _start and _sync_pos was in the other region.
|
||||||
|
*
|
||||||
result is that our new sync pos points to the same point in our source(s)
|
* result is that our new sync pos points to the same point in our source(s)
|
||||||
as the sync in the other region did in its source(s).
|
* as the sync in the other region did in its source(s).
|
||||||
|
*
|
||||||
since we start at zero in our source(s), it is not possible to use a sync point that
|
* since we start at zero in our source(s), it is not possible to use a sync point that
|
||||||
is before the start. reset it to _start if that was true in the other region.
|
* is before the start. reset it to _start if that was true in the other region.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (other->sync_marked()) {
|
if (other->sync_marked()) {
|
||||||
if (other->_start < other->_sync_position) {
|
if (other->_start < other->_sync_position) {
|
||||||
|
|
@ -329,10 +329,10 @@ Region::Region (boost::shared_ptr<const Region> other)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create a new Region from part of an existing one.
|
/** Create a new Region from part of an existing one.
|
||||||
|
*
|
||||||
the start within \a other is given by \a offset
|
* the start within \a other is given by \a offset
|
||||||
(i.e. relative to the start of \a other's sources, the start is \a offset + \a other.start()
|
* (i.e. relative to the start of \a other's sources, the start is \a offset + \a other.start()
|
||||||
*/
|
*/
|
||||||
Region::Region (boost::shared_ptr<const Region> other, MusicSample offset)
|
Region::Region (boost::shared_ptr<const Region> other, MusicSample offset)
|
||||||
: SessionObject(other->session(), other->name())
|
: SessionObject(other->session(), other->name())
|
||||||
, _type (other->data_type())
|
, _type (other->data_type())
|
||||||
|
|
@ -369,9 +369,9 @@ Region::Region (boost::shared_ptr<const Region> other, MusicSample offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if the other region had a distinct sync point
|
/* if the other region had a distinct sync point
|
||||||
set, then continue to use it as best we can.
|
* set, then continue to use it as best we can.
|
||||||
otherwise, reset sync point back to start.
|
* otherwise, reset sync point back to start.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (other->sync_marked()) {
|
if (other->sync_marked()) {
|
||||||
if (other->_sync_position < _start) {
|
if (other->_sync_position < _start) {
|
||||||
|
|
@ -418,7 +418,7 @@ Region::Region (boost::shared_ptr<const Region> other, const SourceList& srcs)
|
||||||
Region::~Region ()
|
Region::~Region ()
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::Destruction, string_compose ("Region %1 destructor @ %2\n", _name, this));
|
DEBUG_TRACE (DEBUG::Destruction, string_compose ("Region %1 destructor @ %2\n", _name, this));
|
||||||
drop_sources ();
|
drop_sources ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -470,8 +470,8 @@ Region::set_length (samplecnt_t len, const int32_t sub_num)
|
||||||
if (_length != len && len != 0) {
|
if (_length != len && len != 0) {
|
||||||
|
|
||||||
/* check that the current _position wouldn't make the new
|
/* check that the current _position wouldn't make the new
|
||||||
length impossible.
|
* length impossible.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (max_samplepos - len < _position) {
|
if (max_samplepos - len < _position) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -565,8 +565,8 @@ void
|
||||||
Region::special_set_position (samplepos_t pos)
|
Region::special_set_position (samplepos_t pos)
|
||||||
{
|
{
|
||||||
/* this is used when creating a whole file region as
|
/* this is used when creating a whole file region as
|
||||||
a way to store its "natural" or "captured" position.
|
* a way to store its "natural" or "captured" position.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_position = _position;
|
_position = _position;
|
||||||
_position = pos;
|
_position = pos;
|
||||||
|
|
@ -606,8 +606,8 @@ Region::update_after_tempo_map_change (bool send)
|
||||||
set_position_internal (pos, false, 0);
|
set_position_internal (pos, false, 0);
|
||||||
|
|
||||||
/* do this even if the position is the same. this helps out
|
/* do this even if the position is the same. this helps out
|
||||||
a GUI that has moved its representation already.
|
* a GUI that has moved its representation already.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (send) {
|
if (send) {
|
||||||
send_change (Properties::position);
|
send_change (Properties::position);
|
||||||
|
|
@ -622,8 +622,8 @@ Region::set_position (samplepos_t pos, int32_t sub_num)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do this even if the position is the same. this helps out
|
/* do this even if the position is the same. this helps out
|
||||||
a GUI that has moved its representation already.
|
* a GUI that has moved its representation already.
|
||||||
*/
|
*/
|
||||||
PropertyChange p_and_l;
|
PropertyChange p_and_l;
|
||||||
|
|
||||||
p_and_l.add (Properties::position);
|
p_and_l.add (Properties::position);
|
||||||
|
|
@ -651,9 +651,9 @@ void
|
||||||
Region::set_position_internal (samplepos_t pos, bool allow_bbt_recompute, const int32_t sub_num)
|
Region::set_position_internal (samplepos_t pos, bool allow_bbt_recompute, const int32_t sub_num)
|
||||||
{
|
{
|
||||||
/* We emit a change of Properties::position even if the position hasn't changed
|
/* We emit a change of Properties::position even if the position hasn't changed
|
||||||
(see Region::set_position), so we must always set this up so that
|
* (see Region::set_position), so we must always set this up so that
|
||||||
e.g. Playlist::notify_region_moved doesn't use an out-of-date last_position.
|
* e.g. Playlist::notify_region_moved doesn't use an out-of-date last_position.
|
||||||
*/
|
*/
|
||||||
_last_position = _position;
|
_last_position = _position;
|
||||||
|
|
||||||
if (_position != pos) {
|
if (_position != pos) {
|
||||||
|
|
@ -667,10 +667,10 @@ Region::set_position_internal (samplepos_t pos, bool allow_bbt_recompute, const
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check that the new _position wouldn't make the current
|
/* check that the new _position wouldn't make the current
|
||||||
length impossible - if so, change the length.
|
* length impossible - if so, change the length.
|
||||||
|
*
|
||||||
XXX is this the right thing to do?
|
* XXX is this the right thing to do?
|
||||||
*/
|
*/
|
||||||
if (max_samplepos - _length < _position) {
|
if (max_samplepos - _length < _position) {
|
||||||
_last_length = _length;
|
_last_length = _length;
|
||||||
_length = max_samplepos - _position;
|
_length = max_samplepos - _position;
|
||||||
|
|
@ -686,8 +686,8 @@ Region::set_position_music (double qn)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do this even if the position is the same. this helps out
|
/* do this even if the position is the same. this helps out
|
||||||
a GUI that has moved its representation already.
|
* a GUI that has moved its representation already.
|
||||||
*/
|
*/
|
||||||
PropertyChange p_and_l;
|
PropertyChange p_and_l;
|
||||||
|
|
||||||
p_and_l.add (Properties::position);
|
p_and_l.add (Properties::position);
|
||||||
|
|
@ -710,9 +710,9 @@ void
|
||||||
Region::set_position_music_internal (double qn)
|
Region::set_position_music_internal (double qn)
|
||||||
{
|
{
|
||||||
/* We emit a change of Properties::position even if the position hasn't changed
|
/* We emit a change of Properties::position even if the position hasn't changed
|
||||||
(see Region::set_position), so we must always set this up so that
|
* (see Region::set_position), so we must always set this up so that
|
||||||
e.g. Playlist::notify_region_moved doesn't use an out-of-date last_position.
|
* e.g. Playlist::notify_region_moved doesn't use an out-of-date last_position.
|
||||||
*/
|
*/
|
||||||
_last_position = _position;
|
_last_position = _position;
|
||||||
|
|
||||||
if (_quarter_note != qn) {
|
if (_quarter_note != qn) {
|
||||||
|
|
@ -720,10 +720,10 @@ Region::set_position_music_internal (double qn)
|
||||||
_quarter_note = qn;
|
_quarter_note = qn;
|
||||||
|
|
||||||
/* check that the new _position wouldn't make the current
|
/* check that the new _position wouldn't make the current
|
||||||
length impossible - if so, change the length.
|
* length impossible - if so, change the length.
|
||||||
|
*
|
||||||
XXX is this the right thing to do?
|
* XXX is this the right thing to do?
|
||||||
*/
|
*/
|
||||||
if (max_samplepos - _length < _position) {
|
if (max_samplepos - _length < _position) {
|
||||||
_last_length = _length;
|
_last_length = _length;
|
||||||
_length = max_samplepos - _position;
|
_length = max_samplepos - _position;
|
||||||
|
|
@ -732,9 +732,9 @@ Region::set_position_music_internal (double qn)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A gui may need to create a region, then place it in an initial
|
/** A gui may need to create a region, then place it in an initial
|
||||||
* position determined by the user.
|
* position determined by the user.
|
||||||
* When this takes place within one gui operation, we have to reset
|
* When this takes place within one gui operation, we have to reset
|
||||||
* _last_position to prevent an implied move.
|
* _last_position to prevent an implied move.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Region::set_initial_position (samplepos_t pos)
|
Region::set_initial_position (samplepos_t pos)
|
||||||
|
|
@ -747,10 +747,10 @@ Region::set_initial_position (samplepos_t pos)
|
||||||
_position = pos;
|
_position = pos;
|
||||||
|
|
||||||
/* check that the new _position wouldn't make the current
|
/* check that the new _position wouldn't make the current
|
||||||
length impossible - if so, change the length.
|
* length impossible - if so, change the length.
|
||||||
|
*
|
||||||
XXX is this the right thing to do?
|
* XXX is this the right thing to do?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (max_samplepos - _length < _position) {
|
if (max_samplepos - _length < _position) {
|
||||||
_last_length = _length;
|
_last_length = _length;
|
||||||
|
|
@ -764,8 +764,8 @@ Region::set_initial_position (samplepos_t pos)
|
||||||
|
|
||||||
|
|
||||||
/* do this even if the position is the same. this helps out
|
/* do this even if the position is the same. this helps out
|
||||||
a GUI that has moved its representation already.
|
* a GUI that has moved its representation already.
|
||||||
*/
|
*/
|
||||||
send_change (Properties::position);
|
send_change (Properties::position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -824,9 +824,9 @@ Region::set_start (samplepos_t pos)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* This just sets the start, nothing else. It effectively shifts
|
/* This just sets the start, nothing else. It effectively shifts
|
||||||
the contents of the Region within the overall extent of the Source,
|
* the contents of the Region within the overall extent of the Source,
|
||||||
without changing the Region's position or length
|
* without changing the Region's position or length
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (_start != pos) {
|
if (_start != pos) {
|
||||||
|
|
||||||
|
|
@ -970,9 +970,8 @@ Region::modify_end (samplepos_t new_endpoint, bool reset_fade, const int32_t sub
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @param new_endpoint New region end point, such that, for example,
|
/** @param new_endpoint New region end point, such that, for example,
|
||||||
* a region at 0 of length 10 has an endpoint of 9.
|
* a region at 0 of length 10 has an endpoint of 9.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
Region::trim_end (samplepos_t new_endpoint, const int32_t sub_num)
|
Region::trim_end (samplepos_t new_endpoint, const int32_t sub_num)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -63,28 +63,28 @@ void
|
||||||
RouteGroup::make_property_quarks ()
|
RouteGroup::make_property_quarks ()
|
||||||
{
|
{
|
||||||
Properties::active.property_id = g_quark_from_static_string (X_("active"));
|
Properties::active.property_id = g_quark_from_static_string (X_("active"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for active = %1\n", Properties::active.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for active = %1\n", Properties::active.property_id));
|
||||||
|
|
||||||
Properties::group_relative.property_id = g_quark_from_static_string (X_("relative"));
|
Properties::group_relative.property_id = g_quark_from_static_string (X_("relative"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for relative = %1\n", Properties::group_relative.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for relative = %1\n", Properties::group_relative.property_id));
|
||||||
Properties::group_gain.property_id = g_quark_from_static_string (X_("gain"));
|
Properties::group_gain.property_id = g_quark_from_static_string (X_("gain"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for gain = %1\n", Properties::group_gain.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for gain = %1\n", Properties::group_gain.property_id));
|
||||||
Properties::group_mute.property_id = g_quark_from_static_string (X_("mute"));
|
Properties::group_mute.property_id = g_quark_from_static_string (X_("mute"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for mute = %1\n", Properties::group_mute.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for mute = %1\n", Properties::group_mute.property_id));
|
||||||
Properties::group_solo.property_id = g_quark_from_static_string (X_("solo"));
|
Properties::group_solo.property_id = g_quark_from_static_string (X_("solo"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for solo = %1\n", Properties::group_solo.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for solo = %1\n", Properties::group_solo.property_id));
|
||||||
Properties::group_recenable.property_id = g_quark_from_static_string (X_("recenable"));
|
Properties::group_recenable.property_id = g_quark_from_static_string (X_("recenable"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for recenable = %1\n", Properties::group_recenable.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for recenable = %1\n", Properties::group_recenable.property_id));
|
||||||
Properties::group_select.property_id = g_quark_from_static_string (X_("select"));
|
Properties::group_select.property_id = g_quark_from_static_string (X_("select"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for select = %1\n", Properties::group_select.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for select = %1\n", Properties::group_select.property_id));
|
||||||
Properties::group_route_active.property_id = g_quark_from_static_string (X_("route-active"));
|
Properties::group_route_active.property_id = g_quark_from_static_string (X_("route-active"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for route-active = %1\n", Properties::group_route_active.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for route-active = %1\n", Properties::group_route_active.property_id));
|
||||||
Properties::group_color.property_id = g_quark_from_static_string (X_("color"));
|
Properties::group_color.property_id = g_quark_from_static_string (X_("color"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for color = %1\n", Properties::group_color.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for color = %1\n", Properties::group_color.property_id));
|
||||||
Properties::group_monitoring.property_id = g_quark_from_static_string (X_("monitoring"));
|
Properties::group_monitoring.property_id = g_quark_from_static_string (X_("monitoring"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for monitoring = %1\n", Properties::group_monitoring.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for monitoring = %1\n", Properties::group_monitoring.property_id));
|
||||||
Properties::group_master_number.property_id = g_quark_from_static_string (X_("group-master-number"));
|
Properties::group_master_number.property_id = g_quark_from_static_string (X_("group-master-number"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for group-master-number = %1\n", Properties::group_master_number.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for group-master-number = %1\n", Properties::group_master_number.property_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ROUTE_GROUP_DEFAULT_PROPERTIES _relative (Properties::group_relative, true) \
|
#define ROUTE_GROUP_DEFAULT_PROPERTIES _relative (Properties::group_relative, true) \
|
||||||
|
|
|
||||||
|
|
@ -1042,7 +1042,7 @@ Session::setup_bundles ()
|
||||||
if (np + 1 < outputs[DataType::AUDIO].size()) {
|
if (np + 1 < outputs[DataType::AUDIO].size()) {
|
||||||
char buf[32];
|
char buf[32];
|
||||||
snprintf (buf, sizeof(buf), _("out %" PRIu32 "+%" PRIu32), np + 1, np + 2);
|
snprintf (buf, sizeof(buf), _("out %" PRIu32 "+%" PRIu32), np + 1, np + 2);
|
||||||
boost::shared_ptr<Bundle> c (new Bundle (buf, true));
|
boost::shared_ptr<Bundle> c (new Bundle (buf, true));
|
||||||
c->add_channel (_("L"), DataType::AUDIO);
|
c->add_channel (_("L"), DataType::AUDIO);
|
||||||
c->set_port (0, outputs[DataType::AUDIO][np]);
|
c->set_port (0, outputs[DataType::AUDIO][np]);
|
||||||
c->add_channel (_("R"), DataType::AUDIO);
|
c->add_channel (_("R"), DataType::AUDIO);
|
||||||
|
|
@ -1616,11 +1616,6 @@ Session::track_playlist_changed (boost::weak_ptr<Track> wp)
|
||||||
bool
|
bool
|
||||||
Session::record_enabling_legal () const
|
Session::record_enabling_legal () const
|
||||||
{
|
{
|
||||||
/* this used to be in here, but survey says.... we don't need to restrict it */
|
|
||||||
// if (record_status() == Recording) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (Config->get_all_safe()) {
|
if (Config->get_all_safe()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1841,10 +1836,10 @@ Session::update_skips (Location* loc, bool consolidate)
|
||||||
|
|
||||||
Locations::LocationList skips;
|
Locations::LocationList skips;
|
||||||
|
|
||||||
if (consolidate) {
|
if (consolidate) {
|
||||||
PBD::Unwinder<bool> uw (_ignore_skips_updates, true);
|
PBD::Unwinder<bool> uw (_ignore_skips_updates, true);
|
||||||
consolidate_skips (loc);
|
consolidate_skips (loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
sync_locations_to_skips ();
|
sync_locations_to_skips ();
|
||||||
|
|
||||||
|
|
@ -1854,41 +1849,41 @@ Session::update_skips (Location* loc, bool consolidate)
|
||||||
void
|
void
|
||||||
Session::consolidate_skips (Location* loc)
|
Session::consolidate_skips (Location* loc)
|
||||||
{
|
{
|
||||||
Locations::LocationList all_locations = _locations->list ();
|
Locations::LocationList all_locations = _locations->list ();
|
||||||
|
|
||||||
for (Locations::LocationList::iterator l = all_locations.begin(); l != all_locations.end(); ) {
|
for (Locations::LocationList::iterator l = all_locations.begin(); l != all_locations.end(); ) {
|
||||||
|
|
||||||
if (!(*l)->is_skip ()) {
|
if (!(*l)->is_skip ()) {
|
||||||
++l;
|
++l;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* don't test against self */
|
/* don't test against self */
|
||||||
|
|
||||||
if (*l == loc) {
|
if (*l == loc) {
|
||||||
++l;
|
++l;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (Evoral::coverage ((*l)->start(), (*l)->end(), loc->start(), loc->end())) {
|
switch (Evoral::coverage ((*l)->start(), (*l)->end(), loc->start(), loc->end())) {
|
||||||
case Evoral::OverlapInternal:
|
case Evoral::OverlapInternal:
|
||||||
case Evoral::OverlapExternal:
|
case Evoral::OverlapExternal:
|
||||||
case Evoral::OverlapStart:
|
case Evoral::OverlapStart:
|
||||||
case Evoral::OverlapEnd:
|
case Evoral::OverlapEnd:
|
||||||
/* adjust new location to cover existing one */
|
/* adjust new location to cover existing one */
|
||||||
loc->set_start (min (loc->start(), (*l)->start()));
|
loc->set_start (min (loc->start(), (*l)->start()));
|
||||||
loc->set_end (max (loc->end(), (*l)->end()));
|
loc->set_end (max (loc->end(), (*l)->end()));
|
||||||
/* we don't need this one any more */
|
/* we don't need this one any more */
|
||||||
_locations->remove (*l);
|
_locations->remove (*l);
|
||||||
/* the location has been deleted, so remove reference to it in our local list */
|
/* the location has been deleted, so remove reference to it in our local list */
|
||||||
l = all_locations.erase (l);
|
l = all_locations.erase (l);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Evoral::OverlapNone:
|
case Evoral::OverlapNone:
|
||||||
++l;
|
++l;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1922,52 +1917,52 @@ Session::_sync_locations_to_skips ()
|
||||||
void
|
void
|
||||||
Session::location_added (Location *location)
|
Session::location_added (Location *location)
|
||||||
{
|
{
|
||||||
if (location->is_auto_punch()) {
|
if (location->is_auto_punch()) {
|
||||||
set_auto_punch_location (location);
|
set_auto_punch_location (location);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (location->is_auto_loop()) {
|
if (location->is_auto_loop()) {
|
||||||
set_auto_loop_location (location);
|
set_auto_loop_location (location);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (location->is_session_range()) {
|
if (location->is_session_range()) {
|
||||||
/* no need for any signal handling or event setting with the session range,
|
/* no need for any signal handling or event setting with the session range,
|
||||||
because we keep a direct reference to it and use its start/end directly.
|
because we keep a direct reference to it and use its start/end directly.
|
||||||
*/
|
*/
|
||||||
_session_range_location = location;
|
_session_range_location = location;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (location->is_mark()) {
|
if (location->is_mark()) {
|
||||||
/* listen for per-location signals that require us to do any * global updates for marks */
|
/* listen for per-location signals that require us to do any * global updates for marks */
|
||||||
|
|
||||||
location->StartChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
location->StartChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
||||||
location->EndChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
location->EndChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
||||||
location->Changed.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
location->Changed.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
||||||
location->FlagsChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
location->FlagsChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
||||||
location->PositionLockStyleChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
location->PositionLockStyleChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (location->is_range_marker()) {
|
if (location->is_range_marker()) {
|
||||||
/* listen for per-location signals that require us to do any * global updates for marks */
|
/* listen for per-location signals that require us to do any * global updates for marks */
|
||||||
|
|
||||||
location->StartChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
location->StartChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
||||||
location->EndChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
location->EndChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
||||||
location->Changed.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
location->Changed.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
||||||
location->FlagsChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
location->FlagsChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
||||||
location->PositionLockStyleChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
location->PositionLockStyleChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (location->is_skip()) {
|
if (location->is_skip()) {
|
||||||
/* listen for per-location signals that require us to update skip-locate events */
|
/* listen for per-location signals that require us to update skip-locate events */
|
||||||
|
|
||||||
location->StartChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, true));
|
location->StartChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, true));
|
||||||
location->EndChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, true));
|
location->EndChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, true));
|
||||||
location->Changed.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, true));
|
location->Changed.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, true));
|
||||||
location->FlagsChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, false));
|
location->FlagsChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, false));
|
||||||
location->PositionLockStyleChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
location->PositionLockStyleChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location));
|
||||||
|
|
||||||
update_skips (location, true);
|
update_skips (location, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_dirty ();
|
set_dirty ();
|
||||||
}
|
}
|
||||||
|
|
@ -2003,17 +1998,17 @@ Session::location_removed (Location *location)
|
||||||
void
|
void
|
||||||
Session::locations_changed ()
|
Session::locations_changed ()
|
||||||
{
|
{
|
||||||
_locations->apply (*this, &Session::_locations_changed);
|
_locations->apply (*this, &Session::_locations_changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Session::_locations_changed (const Locations::LocationList& locations)
|
Session::_locations_changed (const Locations::LocationList& locations)
|
||||||
{
|
{
|
||||||
/* There was some mass-change in the Locations object.
|
/* There was some mass-change in the Locations object.
|
||||||
|
*
|
||||||
We might be re-adding a location here but it doesn't actually matter
|
* We might be re-adding a location here but it doesn't actually matter
|
||||||
for all the locations that the Session takes an interest in.
|
* for all the locations that the Session takes an interest in.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
PBD::Unwinder<bool> protect_ignore_skip_updates (_ignore_skips_updates, true);
|
PBD::Unwinder<bool> protect_ignore_skip_updates (_ignore_skips_updates, true);
|
||||||
|
|
@ -2622,7 +2617,7 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool s
|
||||||
--how_many;
|
--how_many;
|
||||||
}
|
}
|
||||||
|
|
||||||
failed:
|
failed:
|
||||||
if (!new_routes.empty()) {
|
if (!new_routes.empty()) {
|
||||||
StateProtector sp (this);
|
StateProtector sp (this);
|
||||||
if (Profile->get_trx()) {
|
if (Profile->get_trx()) {
|
||||||
|
|
@ -2726,7 +2721,7 @@ Session::new_midi_route (RouteGroup* route_group, uint32_t how_many, string name
|
||||||
--how_many;
|
--how_many;
|
||||||
}
|
}
|
||||||
|
|
||||||
failure:
|
failure:
|
||||||
if (!ret.empty()) {
|
if (!ret.empty()) {
|
||||||
StateProtector sp (this);
|
StateProtector sp (this);
|
||||||
add_routes (ret, false, false, false, order);
|
add_routes (ret, false, false, false, order);
|
||||||
|
|
@ -2958,43 +2953,43 @@ Session::reconnect_existing_routes (bool withLock, bool reconnect_master, bool r
|
||||||
void
|
void
|
||||||
Session::reconnect_midi_scene_ports(bool inputs)
|
Session::reconnect_midi_scene_ports(bool inputs)
|
||||||
{
|
{
|
||||||
if (inputs ) {
|
if (inputs ) {
|
||||||
|
|
||||||
boost::shared_ptr<MidiPort> scene_in_ptr = scene_in();
|
boost::shared_ptr<MidiPort> scene_in_ptr = scene_in();
|
||||||
if (scene_in_ptr) {
|
if (scene_in_ptr) {
|
||||||
scene_in_ptr->disconnect_all ();
|
scene_in_ptr->disconnect_all ();
|
||||||
|
|
||||||
std::vector<EngineStateController::MidiPortState> midi_port_states;
|
std::vector<EngineStateController::MidiPortState> midi_port_states;
|
||||||
EngineStateController::instance()->get_physical_midi_input_states (midi_port_states);
|
EngineStateController::instance()->get_physical_midi_input_states (midi_port_states);
|
||||||
|
|
||||||
std::vector<EngineStateController::MidiPortState>::iterator state_iter = midi_port_states.begin();
|
std::vector<EngineStateController::MidiPortState>::iterator state_iter = midi_port_states.begin();
|
||||||
|
|
||||||
for (; state_iter != midi_port_states.end(); ++state_iter) {
|
for (; state_iter != midi_port_states.end(); ++state_iter) {
|
||||||
if (state_iter->active && state_iter->available && state_iter->scene_connected) {
|
if (state_iter->active && state_iter->available && state_iter->scene_connected) {
|
||||||
scene_in_ptr->connect (state_iter->name);
|
scene_in_ptr->connect (state_iter->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
boost::shared_ptr<MidiPort> scene_out_ptr = scene_out();
|
boost::shared_ptr<MidiPort> scene_out_ptr = scene_out();
|
||||||
|
|
||||||
if (scene_out_ptr ) {
|
if (scene_out_ptr ) {
|
||||||
scene_out_ptr->disconnect_all ();
|
scene_out_ptr->disconnect_all ();
|
||||||
|
|
||||||
std::vector<EngineStateController::MidiPortState> midi_port_states;
|
std::vector<EngineStateController::MidiPortState> midi_port_states;
|
||||||
EngineStateController::instance()->get_physical_midi_output_states (midi_port_states);
|
EngineStateController::instance()->get_physical_midi_output_states (midi_port_states);
|
||||||
|
|
||||||
std::vector<EngineStateController::MidiPortState>::iterator state_iter = midi_port_states.begin();
|
std::vector<EngineStateController::MidiPortState>::iterator state_iter = midi_port_states.begin();
|
||||||
|
|
||||||
for (; state_iter != midi_port_states.end(); ++state_iter) {
|
for (; state_iter != midi_port_states.end(); ++state_iter) {
|
||||||
if (state_iter->active && state_iter->available && state_iter->scene_connected) {
|
if (state_iter->active && state_iter->available && state_iter->scene_connected) {
|
||||||
scene_out_ptr->connect (state_iter->name);
|
scene_out_ptr->connect (state_iter->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -3187,7 +3182,7 @@ Session::new_audio_track (int input_channels, int output_channels, RouteGroup* r
|
||||||
--how_many;
|
--how_many;
|
||||||
}
|
}
|
||||||
|
|
||||||
failed:
|
failed:
|
||||||
if (!new_routes.empty()) {
|
if (!new_routes.empty()) {
|
||||||
StateProtector sp (this);
|
StateProtector sp (this);
|
||||||
if (Profile->get_trx()) {
|
if (Profile->get_trx()) {
|
||||||
|
|
@ -3274,7 +3269,7 @@ Session::new_audio_route (int input_channels, int output_channels, RouteGroup* r
|
||||||
--how_many;
|
--how_many;
|
||||||
}
|
}
|
||||||
|
|
||||||
failure:
|
failure:
|
||||||
if (!ret.empty()) {
|
if (!ret.empty()) {
|
||||||
StateProtector sp (this);
|
StateProtector sp (this);
|
||||||
if (Profile->get_trx()) {
|
if (Profile->get_trx()) {
|
||||||
|
|
@ -3516,7 +3511,7 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i
|
||||||
--how_many;
|
--how_many;
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (!ret.empty()) {
|
if (!ret.empty()) {
|
||||||
StateProtector sp (this);
|
StateProtector sp (this);
|
||||||
if (Profile->get_trx()) {
|
if (Profile->get_trx()) {
|
||||||
|
|
@ -6306,7 +6301,7 @@ Session::write_one_track (Track& track, samplepos_t start, samplepos_t end,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (!result) {
|
if (!result) {
|
||||||
for (vector<boost::shared_ptr<Source> >::iterator src = srcs.begin(); src != srcs.end(); ++src) {
|
for (vector<boost::shared_ptr<Source> >::iterator src = srcs.begin(); src != srcs.end(); ++src) {
|
||||||
(*src)->mark_for_remove ();
|
(*src)->mark_for_remove ();
|
||||||
|
|
@ -6458,7 +6453,7 @@ Session::have_rec_enabled_track () const
|
||||||
bool
|
bool
|
||||||
Session::have_rec_disabled_track () const
|
Session::have_rec_disabled_track () const
|
||||||
{
|
{
|
||||||
return g_atomic_int_get (const_cast<gint*>(&_have_rec_disabled_track)) == 1;
|
return g_atomic_int_get (const_cast<gint*>(&_have_rec_disabled_track)) == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Update the state of our rec-enabled tracks flag */
|
/** Update the state of our rec-enabled tracks flag */
|
||||||
|
|
|
||||||
|
|
@ -105,13 +105,14 @@ SessionConfiguration::set_variables (const XMLNode& node)
|
||||||
#undef CONFIG_VARIABLE
|
#undef CONFIG_VARIABLE
|
||||||
#undef CONFIG_VARIABLE_SPECIAL
|
#undef CONFIG_VARIABLE_SPECIAL
|
||||||
#define CONFIG_VARIABLE(type,var,name,value) \
|
#define CONFIG_VARIABLE(type,var,name,value) \
|
||||||
if (var.set_from_node (node)) { \
|
if (var.set_from_node (node)) { \
|
||||||
ParameterChanged (name); \
|
ParameterChanged (name); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) \
|
#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) \
|
||||||
if (var.set_from_node (node)) { \
|
if (var.set_from_node (node)) { \
|
||||||
ParameterChanged (name); \
|
ParameterChanged (name); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "ardour/session_configuration_vars.h"
|
#include "ardour/session_configuration_vars.h"
|
||||||
#undef CONFIG_VARIABLE
|
#undef CONFIG_VARIABLE
|
||||||
|
|
|
||||||
|
|
@ -134,9 +134,9 @@ SessionDirectory::sources_root () const
|
||||||
* SessionDirectory is also used directly by the AudioRegionImporter,
|
* SessionDirectory is also used directly by the AudioRegionImporter,
|
||||||
* and the peak-file background thread (session.cc).
|
* and the peak-file background thread (session.cc).
|
||||||
*
|
*
|
||||||
* There is no actual benefit to use the session-name instead of
|
* There is no actual benefit to use the session-name instead of
|
||||||
* the folder-name. Under normal circumstances they are always
|
* the folder-name. Under normal circumstances they are always
|
||||||
* identical. But it would be consistent to prefer the name.
|
* identical. But it would be consistent to prefer the name.
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
Glib::Dir dir(sources_root_path);
|
Glib::Dir dir(sources_root_path);
|
||||||
|
|
|
||||||
|
|
@ -554,7 +554,7 @@ Session::send_midi_time_code_for_cycle (samplepos_t start_sample, samplepos_t en
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const samplepos_t msg_time = rint(outbound_mtc_timecode_frame + (quarter_frame_duration * next_quarter_frame_to_send));
|
const samplepos_t msg_time = rint (outbound_mtc_timecode_frame + (quarter_frame_duration * next_quarter_frame_to_send));
|
||||||
|
|
||||||
// This message must fall within this block or something is broken
|
// This message must fall within this block or something is broken
|
||||||
assert (msg_time >= start_sample);
|
assert (msg_time >= start_sample);
|
||||||
|
|
@ -642,10 +642,9 @@ Session::mmc_step_timeout ()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/* *********************************************************************
|
||||||
OUTBOUND SYSTEM COMMON STUFF
|
* OUTBOUND SYSTEM COMMON STUFF
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Session::send_song_position_pointer (samplepos_t)
|
Session::send_song_position_pointer (samplepos_t)
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,6 @@ void
|
||||||
SessionObject::make_property_quarks ()
|
SessionObject::make_property_quarks ()
|
||||||
{
|
{
|
||||||
Properties::name.property_id = g_quark_from_static_string (X_("name"));
|
Properties::name.property_id = g_quark_from_static_string (X_("name"));
|
||||||
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for name = %1\n", Properties::name.property_id));
|
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for name = %1\n", Properties::name.property_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -704,15 +704,15 @@ MeterSection::get_state() const
|
||||||
|
|
||||||
*/
|
*/
|
||||||
struct MetricSectionSorter {
|
struct MetricSectionSorter {
|
||||||
bool operator() (const MetricSection* a, const MetricSection* b) {
|
bool operator() (const MetricSection* a, const MetricSection* b) {
|
||||||
return a->pulse() < b->pulse();
|
return a->pulse() < b->pulse();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MetricSectionFrameSorter {
|
struct MetricSectionFrameSorter {
|
||||||
bool operator() (const MetricSection* a, const MetricSection* b) {
|
bool operator() (const MetricSection* a, const MetricSection* b) {
|
||||||
return a->sample() < b->sample();
|
return a->sample() < b->sample();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
TempoMap::TempoMap (samplecnt_t fr)
|
TempoMap::TempoMap (samplecnt_t fr)
|
||||||
|
|
@ -1426,10 +1426,10 @@ TempoMap::recompute_tempi (Metrics& metrics)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tempos must be positioned correctly.
|
/* tempos must be positioned correctly.
|
||||||
the current approach is to use a meter's bbt time as its base position unit.
|
* the current approach is to use a meter's bbt time as its base position unit.
|
||||||
an audio-locked meter requires a recomputation of pulse and beat (but not bbt),
|
* an audio-locked meter requires a recomputation of pulse and beat (but not bbt),
|
||||||
while a music-locked meter requires recomputations of sample pulse and beat (but not bbt)
|
* while a music-locked meter requires recomputations of sample pulse and beat (but not bbt)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TempoMap::recompute_meters (Metrics& metrics)
|
TempoMap::recompute_meters (Metrics& metrics)
|
||||||
{
|
{
|
||||||
|
|
@ -3382,9 +3382,10 @@ TempoMap::gui_stretch_tempo (TempoSection* ts, const samplepos_t sample, const s
|
||||||
if (ts_copy->clamped()) {
|
if (ts_copy->clamped()) {
|
||||||
TempoSection* next_t = next_tempo_section_locked (future_map, ts_copy);
|
TempoSection* next_t = next_tempo_section_locked (future_map, ts_copy);
|
||||||
TempoSection* prev_to_ts_copy = previous_tempo_section_locked (future_map, ts_copy);
|
TempoSection* prev_to_ts_copy = previous_tempo_section_locked (future_map, ts_copy);
|
||||||
/* the change in samples is the result of changing the slope of at most 2 previous tempo sections.
|
/* the change in samples is the result of changing the slope of at most 2 previous tempo sections.
|
||||||
constant to constant is straightforward, as the tempo prev to ts_copy has constant slope.
|
* constant to constant is straightforward, as the tempo prev to ts_copy has constant slope.
|
||||||
*/ double contribution = 0.0;
|
*/
|
||||||
|
double contribution = 0.0;
|
||||||
if (next_t && prev_to_ts_copy && prev_to_ts_copy->type() == TempoSection::Ramp) {
|
if (next_t && prev_to_ts_copy && prev_to_ts_copy->type() == TempoSection::Ramp) {
|
||||||
contribution = (ts_copy->pulse() - prev_to_ts_copy->pulse()) / (double) (next_t->pulse() - prev_to_ts_copy->pulse());
|
contribution = (ts_copy->pulse() - prev_to_ts_copy->pulse()) / (double) (next_t->pulse() - prev_to_ts_copy->pulse());
|
||||||
}
|
}
|
||||||
|
|
@ -3951,13 +3952,16 @@ TempoMap::round_to_quarter_note_subdivision (samplepos_t fr, int sub_num, RoundM
|
||||||
ticks += ticks_one_subdivisions_worth - mod;
|
ticks += ticks_one_subdivisions_worth - mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
//NOTE: this code intentionally limits the rounding so we don't advance to the next beat.
|
/* NOTE: this code intentionally limits the rounding so we don't advance to the next beat.
|
||||||
// For the purposes of "jump-to-next-subdivision", we DO want to advance to the next beat.
|
* For the purposes of "jump-to-next-subdivision", we DO want to advance to the next beat.
|
||||||
// And since the "prev" direction DOES move beats, I assume this code is unintended.
|
* And since the "prev" direction DOES move beats, I assume this code is unintended.
|
||||||
// But I'm keeping it around, until we determine there are no terrible consequences.
|
* But I'm keeping it around, commened out, until we determine there are no terrible consequences.
|
||||||
// if (ticks >= BBT_Time::ticks_per_beat) {
|
*/
|
||||||
// ticks -= BBT_Time::ticks_per_beat;
|
#if 0
|
||||||
// }
|
if (ticks >= BBT_Time::ticks_per_beat) {
|
||||||
|
ticks -= BBT_Time::ticks_per_beat;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} else if (dir < 0) {
|
} else if (dir < 0) {
|
||||||
|
|
||||||
|
|
@ -4337,8 +4341,8 @@ TempoMap::next_tempo_section_locked (const Metrics& metrics, TempoSection* ts) c
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* don't use this to calculate length (the tempo is only correct for this sample).
|
/* don't use this to calculate length (the tempo is only correct for this sample).
|
||||||
do that stuff based on the beat_at_sample and sample_at_beat api
|
* do that stuff based on the beat_at_sample and sample_at_beat api
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
TempoMap::samples_per_quarter_note_at (const samplepos_t sample, const samplecnt_t sr) const
|
TempoMap::samples_per_quarter_note_at (const samplepos_t sample, const samplecnt_t sr) const
|
||||||
{
|
{
|
||||||
|
|
@ -4856,8 +4860,8 @@ TempoMap::samplepos_plus_bbt (samplepos_t pos, BBT_Time op) const
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Count the number of beats that are equivalent to distance when going forward,
|
/** Count the number of beats that are equivalent to distance when going forward,
|
||||||
starting at pos.
|
* starting at pos.
|
||||||
*/
|
*/
|
||||||
Temporal::Beats
|
Temporal::Beats
|
||||||
TempoMap::framewalk_to_qn (samplepos_t pos, samplecnt_t distance) const
|
TempoMap::framewalk_to_qn (samplepos_t pos, samplecnt_t distance) const
|
||||||
{
|
{
|
||||||
|
|
@ -4867,9 +4871,9 @@ TempoMap::framewalk_to_qn (samplepos_t pos, samplecnt_t distance) const
|
||||||
}
|
}
|
||||||
|
|
||||||
struct bbtcmp {
|
struct bbtcmp {
|
||||||
bool operator() (const BBT_Time& a, const BBT_Time& b) {
|
bool operator() (const BBT_Time& a, const BBT_Time& b) {
|
||||||
return a < b;
|
return a < b;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
std::ostream&
|
std::ostream&
|
||||||
|
|
|
||||||
|
|
@ -305,7 +305,7 @@ CoreAudioPCM::create_aggregate_device (
|
||||||
fprintf(stderr, "AggregateDevice: kAudioObjectPropertyOwnedObjects error\n");
|
fprintf(stderr, "AggregateDevice: kAudioObjectPropertyOwnedObjects error\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate the number of object IDs
|
// Calculate the number of object IDs
|
||||||
subDevicesNum = size / sizeof(AudioObjectID);
|
subDevicesNum = size / sizeof(AudioObjectID);
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
printf("AggregateDevice: clock drift compensation, number of sub-devices = %u\n", (unsigned int)subDevicesNum);
|
printf("AggregateDevice: clock drift compensation, number of sub-devices = %u\n", (unsigned int)subDevicesNum);
|
||||||
|
|
|
||||||
|
|
@ -1098,7 +1098,7 @@ smf_get_length_seconds(const smf_t *smf)
|
||||||
smf_track_t *track;
|
smf_track_t *track;
|
||||||
smf_event_t *event;
|
smf_event_t *event;
|
||||||
|
|
||||||
track = smf_get_track_by_number(smf, i);
|
track = smf_get_track_by_number(smf, i);
|
||||||
assert(track);
|
assert(track);
|
||||||
|
|
||||||
event = smf_track_get_last_event(track);
|
event = smf_track_get_last_event(track);
|
||||||
|
|
|
||||||
|
|
@ -50,16 +50,16 @@
|
||||||
|
|
||||||
/** SMF chunk header, used only by smf_load.c and smf_save.c. */
|
/** SMF chunk header, used only by smf_load.c and smf_save.c. */
|
||||||
struct chunk_header_struct {
|
struct chunk_header_struct {
|
||||||
char id[4];
|
char id[4];
|
||||||
uint32_t length;
|
uint32_t length;
|
||||||
} ATTRIBUTE_PACKED;
|
} ATTRIBUTE_PACKED;
|
||||||
|
|
||||||
/** SMF chunk, used only by smf_load.c and smf_save.c. */
|
/** SMF chunk, used only by smf_load.c and smf_save.c. */
|
||||||
struct mthd_chunk_struct {
|
struct mthd_chunk_struct {
|
||||||
struct chunk_header_struct mthd_header;
|
struct chunk_header_struct mthd_header;
|
||||||
uint16_t format;
|
uint16_t format;
|
||||||
uint16_t number_of_tracks;
|
uint16_t number_of_tracks;
|
||||||
uint16_t division;
|
uint16_t division;
|
||||||
} ATTRIBUTE_PACKED;
|
} ATTRIBUTE_PACKED;
|
||||||
|
|
||||||
#if (!defined __GNUC__)
|
#if (!defined __GNUC__)
|
||||||
|
|
|
||||||
|
|
@ -37,17 +37,16 @@
|
||||||
|
|
||||||
class Backtrace {
|
class Backtrace {
|
||||||
public:
|
public:
|
||||||
Backtrace ();
|
Backtrace ();
|
||||||
std::ostream& print (std::ostream& str) const;
|
std::ostream& print (std::ostream& str) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void* trace[200];
|
void* trace[200];
|
||||||
size_t size;
|
size_t size;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::ostream& operator<< (std::ostream& str, const Backtrace& bt) { return bt.print (str); }
|
std::ostream& operator<< (std::ostream& str, const Backtrace& bt) { return bt.print (str); }
|
||||||
|
|
||||||
|
|
||||||
Backtrace::Backtrace()
|
Backtrace::Backtrace()
|
||||||
{
|
{
|
||||||
#ifdef HAVE_EXECINFO
|
#ifdef HAVE_EXECINFO
|
||||||
|
|
@ -78,12 +77,11 @@ Backtrace::print (std::ostream& str) const
|
||||||
|
|
||||||
struct BTPair {
|
struct BTPair {
|
||||||
|
|
||||||
Backtrace* ref;
|
Backtrace* ref;
|
||||||
Backtrace* rel;
|
Backtrace* rel;
|
||||||
|
|
||||||
BTPair (Backtrace* bt) : ref (bt), rel (0) {}
|
|
||||||
~BTPair () { }
|
|
||||||
|
|
||||||
|
BTPair (Backtrace* bt) : ref (bt), rel (0) {}
|
||||||
|
~BTPair () { }
|
||||||
};
|
};
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream& str, const BTPair& btp) {
|
std::ostream& operator<<(std::ostream& str, const BTPair& btp) {
|
||||||
|
|
@ -95,14 +93,14 @@ std::ostream& operator<<(std::ostream& str, const BTPair& btp) {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SPDebug {
|
struct SPDebug {
|
||||||
Backtrace* constructor;
|
Backtrace* constructor;
|
||||||
Backtrace* destructor;
|
Backtrace* destructor;
|
||||||
|
|
||||||
SPDebug (Backtrace* c) : constructor (c), destructor (0) {}
|
SPDebug (Backtrace* c) : constructor (c), destructor (0) {}
|
||||||
~SPDebug () {
|
~SPDebug () {
|
||||||
delete constructor;
|
delete constructor;
|
||||||
delete destructor;
|
delete destructor;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
std::ostream& operator<< (std::ostream& str, const SPDebug& spd)
|
std::ostream& operator<< (std::ostream& str, const SPDebug& spd)
|
||||||
|
|
@ -121,27 +119,30 @@ typedef std::map<volatile void const*,const char*> IPointerMap;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
static PointerMap* _sptrs;
|
static PointerMap* _sptrs;
|
||||||
PointerMap& sptrs() {
|
PointerMap& sptrs()
|
||||||
if (_sptrs == 0) {
|
{
|
||||||
_sptrs = new PointerMap;
|
if (_sptrs == 0) {
|
||||||
}
|
_sptrs = new PointerMap;
|
||||||
return *_sptrs;
|
}
|
||||||
|
return *_sptrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
static IPointerMap* _interesting_pointers;
|
static IPointerMap* _interesting_pointers;
|
||||||
IPointerMap& interesting_pointers() {
|
IPointerMap& interesting_pointers()
|
||||||
if (_interesting_pointers == 0) {
|
{
|
||||||
_interesting_pointers = new IPointerMap;
|
if (_interesting_pointers == 0) {
|
||||||
}
|
_interesting_pointers = new IPointerMap;
|
||||||
return *_interesting_pointers;
|
}
|
||||||
|
return *_interesting_pointers;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Glib::Threads::Mutex* _the_lock;
|
static Glib::Threads::Mutex* _the_lock;
|
||||||
static Glib::Threads::Mutex& the_lock() {
|
static Glib::Threads::Mutex& the_lock()
|
||||||
if (_the_lock == 0) {
|
{
|
||||||
_the_lock = new Glib::Threads::Mutex;
|
if (_the_lock == 0) {
|
||||||
}
|
_the_lock = new Glib::Threads::Mutex;
|
||||||
return *_the_lock;
|
}
|
||||||
|
return *_the_lock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -169,7 +170,7 @@ void
|
||||||
boost_debug_shared_ptr_mark_interesting (void* ptr, const char* type)
|
boost_debug_shared_ptr_mark_interesting (void* ptr, const char* type)
|
||||||
{
|
{
|
||||||
Glib::Threads::Mutex::Lock guard (the_lock());
|
Glib::Threads::Mutex::Lock guard (the_lock());
|
||||||
pair<void*,const char*> newpair (ptr, type);
|
pair<void*,const char*> newpair (ptr, type);
|
||||||
interesting_pointers().insert (newpair);
|
interesting_pointers().insert (newpair);
|
||||||
if (debug_out) {
|
if (debug_out) {
|
||||||
cerr << "Interesting object @ " << ptr << " of type " << type << endl;
|
cerr << "Interesting object @ " << ptr << " of type " << type << endl;
|
||||||
|
|
|
||||||
|
|
@ -46,12 +46,12 @@ namespace PBD {
|
||||||
string
|
string
|
||||||
capitalize (const string& str)
|
capitalize (const string& str)
|
||||||
{
|
{
|
||||||
string ret = str;
|
string ret = str;
|
||||||
if (!str.empty()) {
|
if (!str.empty()) {
|
||||||
/* XXX not unicode safe */
|
/* XXX not unicode safe */
|
||||||
ret[0] = toupper (str[0]);
|
ret[0] = toupper (str[0]);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
|
|
@ -175,8 +175,8 @@ internationalize (const char *package_name, const char **array)
|
||||||
static int32_t
|
static int32_t
|
||||||
int_from_hex (char hic, char loc)
|
int_from_hex (char hic, char loc)
|
||||||
{
|
{
|
||||||
int hi; /* hi byte */
|
int hi; /* hi byte */
|
||||||
int lo; /* low byte */
|
int lo; /* low byte */
|
||||||
|
|
||||||
hi = (int) hic;
|
hi = (int) hic;
|
||||||
|
|
||||||
|
|
@ -224,20 +224,20 @@ url_decode (string const & url)
|
||||||
string
|
string
|
||||||
length2string (const int32_t samples, const float sample_rate)
|
length2string (const int32_t samples, const float sample_rate)
|
||||||
{
|
{
|
||||||
int32_t secs = (int32_t) (samples / sample_rate);
|
int32_t secs = (int32_t) (samples / sample_rate);
|
||||||
int32_t hrs = secs / 3600;
|
int32_t hrs = secs / 3600;
|
||||||
secs -= (hrs * 3600);
|
secs -= (hrs * 3600);
|
||||||
int32_t mins = secs / 60;
|
int32_t mins = secs / 60;
|
||||||
secs -= (mins * 60);
|
secs -= (mins * 60);
|
||||||
|
|
||||||
int32_t total_secs = (hrs * 3600) + (mins * 60) + secs;
|
int32_t total_secs = (hrs * 3600) + (mins * 60) + secs;
|
||||||
int32_t samples_remaining = (int) floor (samples - (total_secs * sample_rate));
|
int32_t samples_remaining = (int) floor (samples - (total_secs * sample_rate));
|
||||||
float fractional_secs = (float) samples_remaining / sample_rate;
|
float fractional_secs = (float) samples_remaining / sample_rate;
|
||||||
|
|
||||||
char duration_str[32];
|
char duration_str[32];
|
||||||
sprintf (duration_str, "%02" PRIi32 ":%02" PRIi32 ":%05.2f", hrs, mins, (float) secs + fractional_secs);
|
sprintf (duration_str, "%02" PRIi32 ":%02" PRIi32 ":%05.2f", hrs, mins, (float) secs + fractional_secs);
|
||||||
|
|
||||||
return duration_str;
|
return duration_str;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,25 +48,25 @@ FPU* FPU::_instance (0);
|
||||||
static void
|
static void
|
||||||
__cpuid(int regs[4], int cpuid_leaf)
|
__cpuid(int regs[4], int cpuid_leaf)
|
||||||
{
|
{
|
||||||
asm volatile (
|
asm volatile (
|
||||||
#if defined(__i386__)
|
#if defined(__i386__)
|
||||||
"pushl %%ebx;\n\t"
|
"pushl %%ebx;\n\t"
|
||||||
#endif
|
#endif
|
||||||
"cpuid;\n\t"
|
"cpuid;\n\t"
|
||||||
"movl %%eax, (%1);\n\t"
|
"movl %%eax, (%1);\n\t"
|
||||||
"movl %%ebx, 4(%1);\n\t"
|
"movl %%ebx, 4(%1);\n\t"
|
||||||
"movl %%ecx, 8(%1);\n\t"
|
"movl %%ecx, 8(%1);\n\t"
|
||||||
"movl %%edx, 12(%1);\n\t"
|
"movl %%edx, 12(%1);\n\t"
|
||||||
#if defined(__i386__)
|
#if defined(__i386__)
|
||||||
"popl %%ebx;\n\t"
|
"popl %%ebx;\n\t"
|
||||||
#endif
|
#endif
|
||||||
:"=a" (cpuid_leaf) /* %eax clobbered by CPUID */
|
:"=a" (cpuid_leaf) /* %eax clobbered by CPUID */
|
||||||
:"S" (regs), "a" (cpuid_leaf)
|
:"S" (regs), "a" (cpuid_leaf)
|
||||||
:
|
:
|
||||||
#if !defined(__i386__)
|
#if !defined(__i386__)
|
||||||
"%ebx",
|
"%ebx",
|
||||||
#endif
|
#endif
|
||||||
"%ecx", "%edx", "memory");
|
"%ecx", "%edx", "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !PLATFORM_WINDOWS */
|
#endif /* !PLATFORM_WINDOWS */
|
||||||
|
|
@ -158,15 +158,16 @@ FPU::FPU ()
|
||||||
return;
|
return;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* Get the CPU vendor just for kicks */
|
/* Get the CPU vendor just for kicks
|
||||||
|
*
|
||||||
// __cpuid with an InfoType argument of 0 returns the number of
|
* __cpuid with an InfoType argument of 0 returns the number of
|
||||||
// valid Ids in CPUInfo[0] and the CPU identification string in
|
* valid Ids in CPUInfo[0] and the CPU identification string in
|
||||||
// the other three array elements. The CPU identification string is
|
* the other three array elements. The CPU identification string is
|
||||||
// not in linear order. The code below arranges the information
|
* not in linear order. The code below arranges the information
|
||||||
// in a human readable form. The human readable order is CPUInfo[1] |
|
* in a human readable form. The human readable order is CPUInfo[1] |
|
||||||
// CPUInfo[3] | CPUInfo[2]. CPUInfo[2] and CPUInfo[3] are swapped
|
* CPUInfo[3] | CPUInfo[2]. CPUInfo[2] and CPUInfo[3] are swapped
|
||||||
// before using memcpy to copy these three array elements to cpu_string.
|
* before using memcpy to copy these three array elements to cpu_string.
|
||||||
|
*/
|
||||||
|
|
||||||
int cpu_info[4];
|
int cpu_info[4];
|
||||||
char cpu_string[48];
|
char cpu_string[48];
|
||||||
|
|
@ -175,9 +176,9 @@ FPU::FPU ()
|
||||||
__cpuid (cpu_info, 0);
|
__cpuid (cpu_info, 0);
|
||||||
|
|
||||||
int num_ids = cpu_info[0];
|
int num_ids = cpu_info[0];
|
||||||
std::swap(cpu_info[2], cpu_info[3]);
|
std::swap(cpu_info[2], cpu_info[3]);
|
||||||
memcpy(cpu_string, &cpu_info[1], 3 * sizeof(cpu_info[1]));
|
memcpy(cpu_string, &cpu_info[1], 3 * sizeof(cpu_info[1]));
|
||||||
cpu_vendor.assign(cpu_string, 3 * sizeof(cpu_info[1]));
|
cpu_vendor.assign(cpu_string, 3 * sizeof(cpu_info[1]));
|
||||||
|
|
||||||
info << string_compose (_("CPU vendor: %1"), cpu_vendor) << endmsg;
|
info << string_compose (_("CPU vendor: %1"), cpu_vendor) << endmsg;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ PBD::init ()
|
||||||
// will be created or opened in BINARY mode!
|
// will be created or opened in BINARY mode!
|
||||||
_fmode = O_BINARY;
|
_fmode = O_BINARY;
|
||||||
|
|
||||||
WSADATA wsaData;
|
WSADATA wsaData;
|
||||||
|
|
||||||
/* Initialize windows socket DLL for PBD::CrossThreadChannel
|
/* Initialize windows socket DLL for PBD::CrossThreadChannel
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -36,400 +36,397 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <map> // for multimap
|
#include <map> // for multimap
|
||||||
|
|
||||||
#include "pbd/libpbd_visibility.h"
|
#include "pbd/libpbd_visibility.h"
|
||||||
|
|
||||||
namespace StringPrivate
|
namespace StringPrivate
|
||||||
{
|
{
|
||||||
// the actual composition class - using string::compose is cleaner, so we
|
// the actual composition class - using string::compose is cleaner, so we
|
||||||
// hide it here
|
// hide it here
|
||||||
class LIBPBD_API Composition
|
class LIBPBD_API Composition
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// initialize and prepare format string on the form "text %1 text %2 etc."
|
// initialize and prepare format string on the form "text %1 text %2 etc."
|
||||||
explicit Composition(std::string fmt);
|
explicit Composition(std::string fmt);
|
||||||
|
|
||||||
// supply an replacement argument starting from %1
|
// supply an replacement argument starting from %1
|
||||||
template <typename T>
|
template <typename T>
|
||||||
Composition &arg(const T &obj);
|
Composition &arg(const T &obj);
|
||||||
|
|
||||||
// specialization to catch strings (C++ and C)
|
// specialization to catch strings (C++ and C)
|
||||||
Composition &arg(const std::string &str);
|
Composition &arg(const std::string &str);
|
||||||
Composition &arg(char const * const cstr);
|
Composition &arg(char const * const cstr);
|
||||||
|
|
||||||
// compose and return string
|
// compose and return string
|
||||||
std::string str() const;
|
std::string str() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
int arg_no;
|
int arg_no;
|
||||||
|
|
||||||
// we store the output as a list - when the output string is requested, the
|
// we store the output as a list - when the output string is requested, the
|
||||||
// list is concatenated to a string; this way we can keep iterators into
|
// list is concatenated to a string; this way we can keep iterators into
|
||||||
// the list instead of into a string where they're possibly invalidated on
|
// the list instead of into a string where they're possibly invalidated on
|
||||||
// inserting a specification string
|
// inserting a specification string
|
||||||
typedef std::list<std::string> output_list;
|
typedef std::list<std::string> output_list;
|
||||||
output_list output;
|
output_list output;
|
||||||
|
|
||||||
// the initial parse of the format string fills in the specification map
|
// the initial parse of the format string fills in the specification map
|
||||||
// with positions for each of the various %?s
|
// with positions for each of the various %?s
|
||||||
typedef std::multimap<int, output_list::iterator> specification_map;
|
typedef std::multimap<int, output_list::iterator> specification_map;
|
||||||
specification_map specs;
|
specification_map specs;
|
||||||
};
|
};
|
||||||
|
|
||||||
// helper for converting spec string numbers
|
// helper for converting spec string numbers
|
||||||
inline int char_to_int(char c)
|
inline int char_to_int(char c)
|
||||||
{
|
{
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case '0': return 0;
|
case '0': return 0;
|
||||||
case '1': return 1;
|
case '1': return 1;
|
||||||
case '2': return 2;
|
case '2': return 2;
|
||||||
case '3': return 3;
|
case '3': return 3;
|
||||||
case '4': return 4;
|
case '4': return 4;
|
||||||
case '5': return 5;
|
case '5': return 5;
|
||||||
case '6': return 6;
|
case '6': return 6;
|
||||||
case '7': return 7;
|
case '7': return 7;
|
||||||
case '8': return 8;
|
case '8': return 8;
|
||||||
case '9': return 9;
|
case '9': return 9;
|
||||||
default: return -1000;
|
default: return -1000;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool is_number(int n)
|
|
||||||
{
|
|
||||||
switch (n) {
|
|
||||||
case '0':
|
|
||||||
case '1':
|
|
||||||
case '2':
|
|
||||||
case '3':
|
|
||||||
case '4':
|
|
||||||
case '5':
|
|
||||||
case '6':
|
|
||||||
case '7':
|
|
||||||
case '8':
|
|
||||||
case '9':
|
|
||||||
return true;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// implementation of class Composition
|
|
||||||
template <typename T>
|
|
||||||
inline Composition &Composition::arg(const T &obj)
|
|
||||||
{
|
|
||||||
os << obj;
|
|
||||||
|
|
||||||
std::string rep = os.str();
|
|
||||||
|
|
||||||
if (!rep.empty()) { // manipulators don't produce output
|
|
||||||
for (specification_map::const_iterator i = specs.lower_bound(arg_no),
|
|
||||||
end = specs.upper_bound(arg_no); i != end; ++i) {
|
|
||||||
output_list::iterator pos = i->second;
|
|
||||||
++pos;
|
|
||||||
|
|
||||||
output.insert(pos, rep);
|
|
||||||
}
|
|
||||||
|
|
||||||
os.str(std::string());
|
|
||||||
//os.clear();
|
|
||||||
++arg_no;
|
|
||||||
}
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline Composition &Composition::arg(const std::string &str)
|
|
||||||
{
|
|
||||||
/* specialization to ensure that empty strings show up
|
|
||||||
* in the output
|
|
||||||
*/
|
|
||||||
for (specification_map::const_iterator i = specs.lower_bound(arg_no),
|
|
||||||
end = specs.upper_bound(arg_no); i != end; ++i) {
|
|
||||||
output_list::iterator pos = i->second;
|
|
||||||
++pos;
|
|
||||||
|
|
||||||
output.insert(pos, str);
|
|
||||||
}
|
|
||||||
|
|
||||||
++arg_no;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline Composition &Composition::arg(char const * const cstr)
|
|
||||||
{
|
|
||||||
/* specialization to ensure that empty C strings show up
|
|
||||||
* in the output
|
|
||||||
*/
|
|
||||||
for (specification_map::const_iterator i = specs.lower_bound(arg_no),
|
|
||||||
end = specs.upper_bound(arg_no); i != end; ++i) {
|
|
||||||
output_list::iterator pos = i->second;
|
|
||||||
++pos;
|
|
||||||
|
|
||||||
output.insert(pos, std::string (cstr));
|
|
||||||
}
|
|
||||||
|
|
||||||
++arg_no;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline Composition::Composition(std::string fmt)
|
|
||||||
: arg_no(1)
|
|
||||||
{
|
|
||||||
std::string::size_type b = 0, i = 0;
|
|
||||||
|
|
||||||
// fill in output with the strings between the %1 %2 %3 etc. and
|
|
||||||
// fill in specs with the positions
|
|
||||||
while (i < fmt.length()) {
|
|
||||||
if (fmt[i] == '%' && i + 1 < fmt.length()) {
|
|
||||||
if (fmt[i + 1] == '%') { // catch %%
|
|
||||||
fmt.replace(i, 2, "%");
|
|
||||||
++i;
|
|
||||||
}
|
}
|
||||||
else if (is_number(fmt[i + 1])) { // aha! a spec!
|
}
|
||||||
// save string
|
|
||||||
output.push_back(fmt.substr(b, i - b));
|
|
||||||
|
|
||||||
int n = 1; // number of digits
|
inline bool is_number(int n)
|
||||||
int spec_no = 0;
|
{
|
||||||
|
switch (n) {
|
||||||
|
case '0':
|
||||||
|
case '1':
|
||||||
|
case '2':
|
||||||
|
case '3':
|
||||||
|
case '4':
|
||||||
|
case '5':
|
||||||
|
case '6':
|
||||||
|
case '7':
|
||||||
|
case '8':
|
||||||
|
case '9':
|
||||||
|
return true;
|
||||||
|
|
||||||
do {
|
default:
|
||||||
spec_no += char_to_int(fmt[i + n]);
|
return false;
|
||||||
spec_no *= 10;
|
|
||||||
++n;
|
|
||||||
} while (i + n < fmt.length() && is_number(fmt[i + n]));
|
|
||||||
|
|
||||||
spec_no /= 10;
|
|
||||||
output_list::iterator pos = output.end();
|
|
||||||
--pos; // safe since we have just inserted a string>
|
|
||||||
|
|
||||||
specs.insert(specification_map::value_type(spec_no, pos));
|
|
||||||
|
|
||||||
// jump over spec string
|
|
||||||
i += n;
|
|
||||||
b = i;
|
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
++i;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i - b > 0) // add the rest of the string
|
// implementation of class Composition
|
||||||
output.push_back(fmt.substr(b, i - b));
|
template <typename T>
|
||||||
}
|
inline Composition &Composition::arg(const T &obj)
|
||||||
|
{
|
||||||
|
os << obj;
|
||||||
|
|
||||||
inline std::string Composition::str() const
|
std::string rep = os.str();
|
||||||
{
|
|
||||||
// assemble string
|
|
||||||
std::string str;
|
|
||||||
|
|
||||||
for (output_list::const_iterator i = output.begin(), end = output.end();
|
if (!rep.empty()) { // manipulators don't produce output
|
||||||
i != end; ++i)
|
for (specification_map::const_iterator i = specs.lower_bound(arg_no),
|
||||||
str += *i;
|
end = specs.upper_bound(arg_no); i != end; ++i) {
|
||||||
|
output_list::iterator pos = i->second;
|
||||||
|
++pos;
|
||||||
|
|
||||||
return str;
|
output.insert(pos, rep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
os.str(std::string());
|
||||||
|
//os.clear();
|
||||||
|
++arg_no;
|
||||||
|
}
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Composition &Composition::arg(const std::string &str)
|
||||||
|
{
|
||||||
|
/* specialization to ensure that empty strings show up
|
||||||
|
* in the output
|
||||||
|
*/
|
||||||
|
for (specification_map::const_iterator i = specs.lower_bound(arg_no),
|
||||||
|
end = specs.upper_bound(arg_no); i != end; ++i) {
|
||||||
|
output_list::iterator pos = i->second;
|
||||||
|
++pos;
|
||||||
|
|
||||||
|
output.insert(pos, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
++arg_no;
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Composition &Composition::arg(char const * const cstr)
|
||||||
|
{
|
||||||
|
/* specialization to ensure that empty C strings show up
|
||||||
|
* in the output
|
||||||
|
*/
|
||||||
|
for (specification_map::const_iterator i = specs.lower_bound(arg_no),
|
||||||
|
end = specs.upper_bound(arg_no); i != end; ++i) {
|
||||||
|
output_list::iterator pos = i->second;
|
||||||
|
++pos;
|
||||||
|
|
||||||
|
output.insert(pos, std::string (cstr));
|
||||||
|
}
|
||||||
|
|
||||||
|
++arg_no;
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Composition::Composition(std::string fmt)
|
||||||
|
: arg_no(1)
|
||||||
|
{
|
||||||
|
std::string::size_type b = 0, i = 0;
|
||||||
|
|
||||||
|
// fill in output with the strings between the %1 %2 %3 etc. and
|
||||||
|
// fill in specs with the positions
|
||||||
|
while (i < fmt.length()) {
|
||||||
|
if (fmt[i] == '%' && i + 1 < fmt.length()) {
|
||||||
|
if (fmt[i + 1] == '%') { // catch %%
|
||||||
|
fmt.replace(i, 2, "%");
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
else if (is_number(fmt[i + 1])) { // aha! a spec!
|
||||||
|
// save string
|
||||||
|
output.push_back(fmt.substr(b, i - b));
|
||||||
|
|
||||||
|
int n = 1; // number of digits
|
||||||
|
int spec_no = 0;
|
||||||
|
|
||||||
|
do {
|
||||||
|
spec_no += char_to_int(fmt[i + n]);
|
||||||
|
spec_no *= 10;
|
||||||
|
++n;
|
||||||
|
} while (i + n < fmt.length() && is_number(fmt[i + n]));
|
||||||
|
|
||||||
|
spec_no /= 10;
|
||||||
|
output_list::iterator pos = output.end();
|
||||||
|
--pos; // safe since we have just inserted a string>
|
||||||
|
|
||||||
|
specs.insert(specification_map::value_type(spec_no, pos));
|
||||||
|
|
||||||
|
// jump over spec string
|
||||||
|
i += n;
|
||||||
|
b = i;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i - b > 0) { // add the rest of the string
|
||||||
|
output.push_back(fmt.substr(b, i - b));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline std::string Composition::str() const
|
||||||
|
{
|
||||||
|
// assemble string
|
||||||
|
std::string str;
|
||||||
|
|
||||||
|
for (output_list::const_iterator i = output.begin(), end = output.end();
|
||||||
|
i != end; ++i)
|
||||||
|
str += *i;
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// now for the real thing(s)
|
// now for the real thing(s)
|
||||||
//namespace PBD
|
|
||||||
//{
|
|
||||||
// a series of functions which accept a format string on the form "text %1
|
|
||||||
// more %2 less %3" and a number of templated parameters and spits out the
|
|
||||||
// composited string
|
|
||||||
template <typename T1>
|
|
||||||
inline std::string string_compose(const std::string &fmt, const T1 &o1)
|
|
||||||
{
|
|
||||||
StringPrivate::Composition c(fmt);
|
|
||||||
c.arg(o1);
|
|
||||||
return c.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T1, typename T2>
|
// a series of functions which accept a format string on the form "text %1
|
||||||
inline std::string string_compose(const std::string &fmt,
|
// more %2 less %3" and a number of templated parameters and spits out the
|
||||||
const T1 &o1, const T2 &o2)
|
// composited string
|
||||||
{
|
template <typename T1>
|
||||||
StringPrivate::Composition c(fmt);
|
inline std::string string_compose(const std::string &fmt, const T1 &o1)
|
||||||
c.arg(o1).arg(o2);
|
{
|
||||||
return c.str();
|
StringPrivate::Composition c(fmt);
|
||||||
}
|
c.arg(o1);
|
||||||
|
return c.str();
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3>
|
template <typename T1, typename T2>
|
||||||
inline std::string string_compose(const std::string &fmt,
|
inline std::string string_compose(const std::string &fmt,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3)
|
const T1 &o1, const T2 &o2)
|
||||||
{
|
{
|
||||||
StringPrivate::Composition c(fmt);
|
StringPrivate::Composition c(fmt);
|
||||||
c.arg(o1).arg(o2).arg(o3);
|
c.arg(o1).arg(o2);
|
||||||
return c.str();
|
return c.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3, typename T4>
|
template <typename T1, typename T2, typename T3>
|
||||||
inline std::string string_compose(const std::string &fmt,
|
inline std::string string_compose(const std::string &fmt,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3,
|
const T1 &o1, const T2 &o2, const T3 &o3)
|
||||||
const T4 &o4)
|
{
|
||||||
{
|
StringPrivate::Composition c(fmt);
|
||||||
StringPrivate::Composition c(fmt);
|
c.arg(o1).arg(o2).arg(o3);
|
||||||
c.arg(o1).arg(o2).arg(o3).arg(o4);
|
return c.str();
|
||||||
return c.str();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3, typename T4, typename T5>
|
template <typename T1, typename T2, typename T3, typename T4>
|
||||||
inline std::string string_compose(const std::string &fmt,
|
inline std::string string_compose(const std::string &fmt,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3,
|
const T1 &o1, const T2 &o2, const T3 &o3,
|
||||||
const T4 &o4, const T5 &o5)
|
const T4 &o4)
|
||||||
{
|
{
|
||||||
StringPrivate::Composition c(fmt);
|
StringPrivate::Composition c(fmt);
|
||||||
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5);
|
c.arg(o1).arg(o2).arg(o3).arg(o4);
|
||||||
return c.str();
|
return c.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
template <typename T1, typename T2, typename T3, typename T4, typename T5>
|
||||||
typename T6>
|
inline std::string string_compose(const std::string &fmt,
|
||||||
inline std::string string_compose(const std::string &fmt,
|
const T1 &o1, const T2 &o2, const T3 &o3,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3,
|
const T4 &o4, const T5 &o5)
|
||||||
const T4 &o4, const T5 &o5, const T6 &o6)
|
{
|
||||||
{
|
StringPrivate::Composition c(fmt);
|
||||||
StringPrivate::Composition c(fmt);
|
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5);
|
||||||
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6);
|
return c.str();
|
||||||
return c.str();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||||
typename T6, typename T7>
|
typename T6>
|
||||||
inline std::string string_compose(const std::string &fmt,
|
inline std::string string_compose(const std::string &fmt,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3,
|
const T1 &o1, const T2 &o2, const T3 &o3,
|
||||||
const T4 &o4, const T5 &o5, const T6 &o6,
|
const T4 &o4, const T5 &o5, const T6 &o6)
|
||||||
const T7 &o7)
|
{
|
||||||
{
|
StringPrivate::Composition c(fmt);
|
||||||
StringPrivate::Composition c(fmt);
|
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6);
|
||||||
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7);
|
return c.str();
|
||||||
return c.str();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||||
typename T6, typename T7, typename T8>
|
typename T6, typename T7>
|
||||||
inline std::string string_compose(const std::string &fmt,
|
inline std::string string_compose(const std::string &fmt,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3,
|
const T1 &o1, const T2 &o2, const T3 &o3,
|
||||||
const T4 &o4, const T5 &o5, const T6 &o6,
|
const T4 &o4, const T5 &o5, const T6 &o6,
|
||||||
const T7 &o7, const T8 &o8)
|
const T7 &o7)
|
||||||
{
|
{
|
||||||
StringPrivate::Composition c(fmt);
|
StringPrivate::Composition c(fmt);
|
||||||
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8);
|
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7);
|
||||||
return c.str();
|
return c.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||||
typename T6, typename T7, typename T8, typename T9>
|
typename T6, typename T7, typename T8>
|
||||||
inline std::string string_compose(const std::string &fmt,
|
inline std::string string_compose(const std::string &fmt,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3,
|
const T1 &o1, const T2 &o2, const T3 &o3,
|
||||||
const T4 &o4, const T5 &o5, const T6 &o6,
|
const T4 &o4, const T5 &o5, const T6 &o6,
|
||||||
const T7 &o7, const T8 &o8, const T9 &o9)
|
const T7 &o7, const T8 &o8)
|
||||||
{
|
{
|
||||||
StringPrivate::Composition c(fmt);
|
StringPrivate::Composition c(fmt);
|
||||||
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9);
|
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8);
|
||||||
return c.str();
|
return c.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||||
typename T6, typename T7, typename T8, typename T9, typename T10>
|
typename T6, typename T7, typename T8, typename T9>
|
||||||
inline std::string string_compose(const std::string &fmt,
|
inline std::string string_compose(const std::string &fmt,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3,
|
const T1 &o1, const T2 &o2, const T3 &o3,
|
||||||
const T4 &o4, const T5 &o5, const T6 &o6,
|
const T4 &o4, const T5 &o5, const T6 &o6,
|
||||||
const T7 &o7, const T8 &o8, const T9 &o9,
|
const T7 &o7, const T8 &o8, const T9 &o9)
|
||||||
const T10 &o10)
|
{
|
||||||
{
|
StringPrivate::Composition c(fmt);
|
||||||
StringPrivate::Composition c(fmt);
|
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9);
|
||||||
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
|
return c.str();
|
||||||
.arg(o10);
|
}
|
||||||
return c.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||||
typename T6, typename T7, typename T8, typename T9, typename T10,
|
typename T6, typename T7, typename T8, typename T9, typename T10>
|
||||||
typename T11>
|
inline std::string string_compose(const std::string &fmt,
|
||||||
inline std::string string_compose(const std::string &fmt,
|
const T1 &o1, const T2 &o2, const T3 &o3,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3,
|
const T4 &o4, const T5 &o5, const T6 &o6,
|
||||||
const T4 &o4, const T5 &o5, const T6 &o6,
|
const T7 &o7, const T8 &o8, const T9 &o9,
|
||||||
const T7 &o7, const T8 &o8, const T9 &o9,
|
const T10 &o10)
|
||||||
const T10 &o10, const T11 &o11)
|
{
|
||||||
{
|
StringPrivate::Composition c(fmt);
|
||||||
StringPrivate::Composition c(fmt);
|
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
|
||||||
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
|
.arg(o10);
|
||||||
.arg(o10).arg(o11);
|
return c.str();
|
||||||
return c.str();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||||
typename T6, typename T7, typename T8, typename T9, typename T10,
|
typename T6, typename T7, typename T8, typename T9, typename T10,
|
||||||
typename T11, typename T12>
|
typename T11>
|
||||||
inline std::string string_compose(const std::string &fmt,
|
inline std::string string_compose(const std::string &fmt,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3,
|
const T1 &o1, const T2 &o2, const T3 &o3,
|
||||||
const T4 &o4, const T5 &o5, const T6 &o6,
|
const T4 &o4, const T5 &o5, const T6 &o6,
|
||||||
const T7 &o7, const T8 &o8, const T9 &o9,
|
const T7 &o7, const T8 &o8, const T9 &o9,
|
||||||
const T10 &o10, const T11 &o11, const T12 &o12)
|
const T10 &o10, const T11 &o11)
|
||||||
{
|
{
|
||||||
StringPrivate::Composition c(fmt);
|
StringPrivate::Composition c(fmt);
|
||||||
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
|
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
|
||||||
.arg(o10).arg(o11).arg(o12);
|
.arg(o10).arg(o11);
|
||||||
return c.str();
|
return c.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||||
typename T6, typename T7, typename T8, typename T9, typename T10,
|
typename T6, typename T7, typename T8, typename T9, typename T10,
|
||||||
typename T11, typename T12, typename T13>
|
typename T11, typename T12>
|
||||||
inline std::string string_compose(const std::string &fmt,
|
inline std::string string_compose(const std::string &fmt,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3,
|
const T1 &o1, const T2 &o2, const T3 &o3,
|
||||||
const T4 &o4, const T5 &o5, const T6 &o6,
|
const T4 &o4, const T5 &o5, const T6 &o6,
|
||||||
const T7 &o7, const T8 &o8, const T9 &o9,
|
const T7 &o7, const T8 &o8, const T9 &o9,
|
||||||
const T10 &o10, const T11 &o11, const T12 &o12,
|
const T10 &o10, const T11 &o11, const T12 &o12)
|
||||||
const T13 &o13)
|
{
|
||||||
{
|
StringPrivate::Composition c(fmt);
|
||||||
StringPrivate::Composition c(fmt);
|
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
|
||||||
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
|
.arg(o10).arg(o11).arg(o12);
|
||||||
.arg(o10).arg(o11).arg(o12).arg(o13);
|
return c.str();
|
||||||
return c.str();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||||
typename T6, typename T7, typename T8, typename T9, typename T10,
|
typename T6, typename T7, typename T8, typename T9, typename T10,
|
||||||
typename T11, typename T12, typename T13, typename T14>
|
typename T11, typename T12, typename T13>
|
||||||
inline std::string string_compose(const std::string &fmt,
|
inline std::string string_compose(const std::string &fmt,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3,
|
const T1 &o1, const T2 &o2, const T3 &o3,
|
||||||
const T4 &o4, const T5 &o5, const T6 &o6,
|
const T4 &o4, const T5 &o5, const T6 &o6,
|
||||||
const T7 &o7, const T8 &o8, const T9 &o9,
|
const T7 &o7, const T8 &o8, const T9 &o9,
|
||||||
const T10 &o10, const T11 &o11, const T12 &o12,
|
const T10 &o10, const T11 &o11, const T12 &o12,
|
||||||
const T13 &o13, const T14 &o14)
|
const T13 &o13)
|
||||||
{
|
{
|
||||||
StringPrivate::Composition c(fmt);
|
StringPrivate::Composition c(fmt);
|
||||||
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
|
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
|
||||||
.arg(o10).arg(o11).arg(o12).arg(o13).arg(o14);
|
.arg(o10).arg(o11).arg(o12).arg(o13);
|
||||||
return c.str();
|
return c.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||||
typename T6, typename T7, typename T8, typename T9, typename T10,
|
typename T6, typename T7, typename T8, typename T9, typename T10,
|
||||||
typename T11, typename T12, typename T13, typename T14,
|
typename T11, typename T12, typename T13, typename T14>
|
||||||
typename T15>
|
inline std::string string_compose(const std::string &fmt,
|
||||||
inline std::string string_compose(const std::string &fmt,
|
const T1 &o1, const T2 &o2, const T3 &o3,
|
||||||
const T1 &o1, const T2 &o2, const T3 &o3,
|
const T4 &o4, const T5 &o5, const T6 &o6,
|
||||||
const T4 &o4, const T5 &o5, const T6 &o6,
|
const T7 &o7, const T8 &o8, const T9 &o9,
|
||||||
const T7 &o7, const T8 &o8, const T9 &o9,
|
const T10 &o10, const T11 &o11, const T12 &o12,
|
||||||
const T10 &o10, const T11 &o11, const T12 &o12,
|
const T13 &o13, const T14 &o14)
|
||||||
const T13 &o13, const T14 &o14, const T15 &o15)
|
{
|
||||||
{
|
StringPrivate::Composition c(fmt);
|
||||||
StringPrivate::Composition c(fmt);
|
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
|
||||||
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
|
.arg(o10).arg(o11).arg(o12).arg(o13).arg(o14);
|
||||||
.arg(o10).arg(o11).arg(o12).arg(o13).arg(o14).arg(o15);
|
return c.str();
|
||||||
return c.str();
|
}
|
||||||
}
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||||
|
typename T6, typename T7, typename T8, typename T9, typename T10,
|
||||||
|
typename T11, typename T12, typename T13, typename T14,
|
||||||
|
typename T15>
|
||||||
|
inline std::string string_compose(const std::string &fmt,
|
||||||
|
const T1 &o1, const T2 &o2, const T3 &o3,
|
||||||
|
const T4 &o4, const T5 &o5, const T6 &o6,
|
||||||
|
const T7 &o7, const T8 &o8, const T9 &o9,
|
||||||
|
const T10 &o10, const T11 &o11, const T12 &o12,
|
||||||
|
const T13 &o13, const T14 &o14, const T15 &o15)
|
||||||
|
{
|
||||||
|
StringPrivate::Composition c(fmt);
|
||||||
|
c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
|
||||||
|
.arg(o10).arg(o11).arg(o12).arg(o13).arg(o14).arg(o15);
|
||||||
|
return c.str();
|
||||||
|
}
|
||||||
|
|
||||||
#endif // STRING_COMPOSE_H
|
#endif // STRING_COMPOSE_H
|
||||||
|
|
|
||||||
|
|
@ -80,11 +80,11 @@
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
|
|
||||||
|
|
@ -121,22 +121,22 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef OPEN_MAX
|
#ifndef OPEN_MAX
|
||||||
#define OPEN_MAX 32
|
#define OPEN_MAX (32)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
PBDEXTN_API int PBDEXTN_APICALLTYPE cyginit (unsigned int result);
|
PBDEXTN_API int PBDEXTN_APICALLTYPE cyginit (unsigned int result);
|
||||||
LIBPBD_API int PBD_APICALLTYPE dlclose (void *handle) __THROW;
|
LIBPBD_API int PBD_APICALLTYPE dlclose (void *handle) __THROW;
|
||||||
LIBPBD_API void* PBD_APICALLTYPE dlopen (const char *file_name, int mode) __THROW;
|
LIBPBD_API void* PBD_APICALLTYPE dlopen (const char *file_name, int mode) __THROW;
|
||||||
LIBPBD_API void* PBD_APICALLTYPE dlsym (void *handle, const char *symbol_name) __THROW;
|
LIBPBD_API void* PBD_APICALLTYPE dlsym (void *handle, const char *symbol_name) __THROW;
|
||||||
LIBPBD_API char* PBD_APICALLTYPE dlerror () __THROW;
|
LIBPBD_API char* PBD_APICALLTYPE dlerror () __THROW;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#ifndef __CYGWIN__
|
#ifndef __CYGWIN__
|
||||||
/* For whatever reason, Ardour's 'libevoral' refuses to build as a DLL if we include both 'rpc.h' */
|
/* For whatever reason, Ardour's 'libevoral' refuses to build as a DLL if we include both 'rpc.h' */
|
||||||
|
|
@ -157,17 +157,17 @@ typedef int (FAR PBDEXTN_APICALLTYPE *CYGINIT_API)(unsigned int);
|
||||||
#define _SSIZE_T_
|
#define _SSIZE_T_
|
||||||
typedef long _ssize_t;
|
typedef long _ssize_t;
|
||||||
|
|
||||||
#ifndef _NO_OLDNAMES
|
#ifndef _NO_OLDNAMES
|
||||||
typedef _ssize_t ssize_t;
|
typedef _ssize_t ssize_t;
|
||||||
#endif
|
#endif
|
||||||
#endif /* ! _SSIZE_T_ */
|
#endif /* ! _SSIZE_T_ */
|
||||||
|
|
||||||
struct dirent
|
struct dirent
|
||||||
{
|
{
|
||||||
long d_ino; // Always zero
|
long d_ino; // Always zero
|
||||||
unsigned short d_reclen; // Always zero
|
unsigned short d_reclen; // Always zero
|
||||||
unsigned short d_namlen; // Length of name in d_name
|
unsigned shor d_namlen; // Length of name in d_name
|
||||||
char d_name[FILENAME_MAX]; // File name
|
char d_name[FILENAME_MAX]; // File name
|
||||||
};
|
};
|
||||||
|
|
||||||
// This is an internal data structure. Do not use it
|
// This is an internal data structure. Do not use it
|
||||||
|
|
@ -175,65 +175,65 @@ struct dirent
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
// Disk transfer area for this dir
|
// Disk transfer area for this dir
|
||||||
struct _finddata_t dd_dta;
|
struct _finddata_t dd_dta;
|
||||||
|
|
||||||
// 'dirent' struct to return from dir (NOTE: this
|
// 'dirent' struct to return from dir (NOTE: this
|
||||||
// is not thread safe).
|
// is not thread safe).
|
||||||
struct dirent dd_dir;
|
struct dirent dd_dir;
|
||||||
|
|
||||||
// '_findnext()' handle
|
// '_findnext()' handle
|
||||||
long dd_handle;
|
long dd_handle;
|
||||||
|
|
||||||
// Current status of search:
|
// Current status of search:
|
||||||
// 0 = not started yet (next entry to read is first entry)
|
// 0 = not started yet (next entry to read is first entry)
|
||||||
// -1 = off the end
|
// -1 = off the end
|
||||||
// Otherwise - positive (0 based) index of next entry
|
// Otherwise - positive (0 based) index of next entry
|
||||||
int dd_stat;
|
int dd_stat;
|
||||||
|
|
||||||
// Full path for dir with search pattern (struct will be extended)
|
// Full path for dir with search pattern (struct will be extended)
|
||||||
char dd_name[1];
|
char dd_name[1];
|
||||||
} DIR;
|
} DIR;
|
||||||
|
|
||||||
typedef unsigned int nfds_t;
|
typedef unsigned int nfds_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
LIBPBD_API int __cdecl gettimeofday(struct timeval *__restrict tv, __timezone_ptr_t tz);
|
LIBPBD_API int __cdecl gettimeofday(struct timeval *__restrict tv, __timezone_ptr_t tz);
|
||||||
LIBPBD_API ssize_t PBD_APICALLTYPE pread(int handle, void *buf, size_t nbytes, off_t offset);
|
LIBPBD_API ssize_t PBD_APICALLTYPE pread(int handle, void *buf, size_t nbytes, off_t offset);
|
||||||
LIBPBD_API ssize_t PBD_APICALLTYPE pwrite(int handle, const void *buf, size_t nbytes, off_t offset);
|
LIBPBD_API ssize_t PBD_APICALLTYPE pwrite(int handle, const void *buf, size_t nbytes, off_t offset);
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER < 1800)
|
#if defined(_MSC_VER) && (_MSC_VER < 1800)
|
||||||
LIBPBD_API double PBD_APICALLTYPE expm1(double x);
|
LIBPBD_API double PBD_APICALLTYPE expm1(double x);
|
||||||
LIBPBD_API double PBD_APICALLTYPE log1p(double x);
|
LIBPBD_API double PBD_APICALLTYPE log1p(double x);
|
||||||
LIBPBD_API double PBD_APICALLTYPE round(double x);
|
LIBPBD_API double PBD_APICALLTYPE round(double x);
|
||||||
LIBPBD_API float PBD_APICALLTYPE roundf(float x);
|
LIBPBD_API float PBD_APICALLTYPE roundf(float x);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
||||||
LIBPBD_API double PBD_APICALLTYPE log2 (double x);
|
LIBPBD_API double PBD_APICALLTYPE log2 (double x);
|
||||||
LIBPBD_API double PBD_APICALLTYPE trunc(double x);
|
LIBPBD_API double PBD_APICALLTYPE trunc(double x);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace PBD {
|
namespace PBD {
|
||||||
|
|
||||||
LIBPBD_API bool PBD_APICALLTYPE TestForMinimumSpecOS(char *revision="currently ignored");
|
LIBPBD_API bool PBD_APICALLTYPE TestForMinimumSpecOS(char *revision="currently ignored");
|
||||||
LIBPBD_API char* PBD_APICALLTYPE realpath (const char *original_path, char resolved_path[_MAX_PATH+1]);
|
LIBPBD_API char* PBD_APICALLTYPE realpath (const char *original_path, char resolved_path[_MAX_PATH+1]);
|
||||||
LIBPBD_API int PBD_APICALLTYPE mkstemp (char *template_name);
|
LIBPBD_API int PBD_APICALLTYPE mkstemp (char *template_name);
|
||||||
LIBPBD_API int PBD_APICALLTYPE ntfs_link (const char *existing_filepath, const char *link_filepath);
|
LIBPBD_API int PBD_APICALLTYPE ntfs_link (const char *existing_filepath, const char *link_filepath);
|
||||||
LIBPBD_API int PBD_APICALLTYPE ntfs_unlink (const char *link_filepath);
|
LIBPBD_API int PBD_APICALLTYPE ntfs_unlink (const char *link_filepath);
|
||||||
|
|
||||||
// These are used to replicate 'dirent.h' functionality
|
// These are used to replicate 'dirent.h' functionality
|
||||||
LIBPBD_API DIR* PBD_APICALLTYPE opendir (const char *szPath);
|
LIBPBD_API DIR* PBD_APICALLTYPE opendir (const char *szPath);
|
||||||
LIBPBD_API struct dirent* PBD_APICALLTYPE readdir (DIR *pDir);
|
LIBPBD_API struct dirent* PBD_APICALLTYPE readdir (DIR *pDir);
|
||||||
LIBPBD_API int PBD_APICALLTYPE closedir (DIR *pDir);
|
LIBPBD_API int PBD_APICALLTYPE closedir (DIR *pDir);
|
||||||
|
|
||||||
} // namespace PBD
|
} // namespace PBD
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#endif // !__CYGWIN__
|
#endif // !__CYGWIN__
|
||||||
#endif // PLATFORM_WINDOWS
|
#endif // PLATFORM_WINDOWS
|
||||||
|
|
|
||||||
|
|
@ -30,16 +30,18 @@ namespace PBD {
|
||||||
template<class T>
|
template<class T>
|
||||||
class /*LIBPBD_API*/ RingBuffer
|
class /*LIBPBD_API*/ RingBuffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RingBuffer (guint sz) {
|
RingBuffer (guint sz) {
|
||||||
// size = ffs(sz); /* find first [bit] set is a single inlined assembly instruction. But it looks like the API rounds up so... */
|
#if 0
|
||||||
guint power_of_two;
|
size = ffs(sz); /* find first [bit] set is a single inlined assembly instruction. But it looks like the API rounds up so... */
|
||||||
for (power_of_two = 1; 1U<<power_of_two < sz; power_of_two++) {}
|
#endif
|
||||||
size = 1<<power_of_two;
|
guint power_of_two;
|
||||||
size_mask = size;
|
for (power_of_two = 1; 1U<<power_of_two < sz; power_of_two++) {}
|
||||||
size_mask -= 1;
|
size = 1<<power_of_two;
|
||||||
buf = new T[size];
|
size_mask = size;
|
||||||
reset ();
|
size_mask -= 1;
|
||||||
|
buf = new T[size];
|
||||||
|
reset ();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~RingBuffer() {
|
virtual ~RingBuffer() {
|
||||||
|
|
@ -62,8 +64,8 @@ class /*LIBPBD_API*/ RingBuffer
|
||||||
guint write (T const * src, guint cnt);
|
guint write (T const * src, guint cnt);
|
||||||
|
|
||||||
struct rw_vector {
|
struct rw_vector {
|
||||||
T *buf[2];
|
T *buf[2];
|
||||||
guint len[2];
|
guint len[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
void get_read_vector (rw_vector *);
|
void get_read_vector (rw_vector *);
|
||||||
|
|
@ -114,7 +116,7 @@ class /*LIBPBD_API*/ RingBuffer
|
||||||
guint get_read_idx () const { return g_atomic_int_get (&read_idx); }
|
guint get_read_idx () const { return g_atomic_int_get (&read_idx); }
|
||||||
guint bufsize () const { return size; }
|
guint bufsize () const { return size; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
T *buf;
|
T *buf;
|
||||||
guint size;
|
guint size;
|
||||||
mutable gint write_idx;
|
mutable gint write_idx;
|
||||||
|
|
@ -125,80 +127,80 @@ class /*LIBPBD_API*/ RingBuffer
|
||||||
template<class T> /*LIBPBD_API*/ guint
|
template<class T> /*LIBPBD_API*/ guint
|
||||||
RingBuffer<T>::read (T *dest, guint cnt)
|
RingBuffer<T>::read (T *dest, guint cnt)
|
||||||
{
|
{
|
||||||
guint free_cnt;
|
guint free_cnt;
|
||||||
guint cnt2;
|
guint cnt2;
|
||||||
guint to_read;
|
guint to_read;
|
||||||
guint n1, n2;
|
guint n1, n2;
|
||||||
guint priv_read_idx;
|
guint priv_read_idx;
|
||||||
|
|
||||||
priv_read_idx=g_atomic_int_get(&read_idx);
|
priv_read_idx=g_atomic_int_get(&read_idx);
|
||||||
|
|
||||||
if ((free_cnt = read_space ()) == 0) {
|
if ((free_cnt = read_space ()) == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
to_read = cnt > free_cnt ? free_cnt : cnt;
|
to_read = cnt > free_cnt ? free_cnt : cnt;
|
||||||
|
|
||||||
cnt2 = priv_read_idx + to_read;
|
cnt2 = priv_read_idx + to_read;
|
||||||
|
|
||||||
if (cnt2 > size) {
|
if (cnt2 > size) {
|
||||||
n1 = size - priv_read_idx;
|
n1 = size - priv_read_idx;
|
||||||
n2 = cnt2 & size_mask;
|
n2 = cnt2 & size_mask;
|
||||||
} else {
|
} else {
|
||||||
n1 = to_read;
|
n1 = to_read;
|
||||||
n2 = 0;
|
n2 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy (dest, &buf[priv_read_idx], n1 * sizeof (T));
|
memcpy (dest, &buf[priv_read_idx], n1 * sizeof (T));
|
||||||
priv_read_idx = (priv_read_idx + n1) & size_mask;
|
priv_read_idx = (priv_read_idx + n1) & size_mask;
|
||||||
|
|
||||||
if (n2) {
|
if (n2) {
|
||||||
memcpy (dest+n1, buf, n2 * sizeof (T));
|
memcpy (dest+n1, buf, n2 * sizeof (T));
|
||||||
priv_read_idx = n2;
|
priv_read_idx = n2;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_atomic_int_set(&read_idx, priv_read_idx);
|
g_atomic_int_set(&read_idx, priv_read_idx);
|
||||||
return to_read;
|
return to_read;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T> /*LIBPBD_API*/ guint
|
template<class T> /*LIBPBD_API*/ guint
|
||||||
RingBuffer<T>::write (T const *src, guint cnt)
|
RingBuffer<T>::write (T const *src, guint cnt)
|
||||||
|
|
||||||
{
|
{
|
||||||
guint free_cnt;
|
guint free_cnt;
|
||||||
guint cnt2;
|
guint cnt2;
|
||||||
guint to_write;
|
guint to_write;
|
||||||
guint n1, n2;
|
guint n1, n2;
|
||||||
guint priv_write_idx;
|
guint priv_write_idx;
|
||||||
|
|
||||||
priv_write_idx=g_atomic_int_get(&write_idx);
|
priv_write_idx=g_atomic_int_get(&write_idx);
|
||||||
|
|
||||||
if ((free_cnt = write_space ()) == 0) {
|
if ((free_cnt = write_space ()) == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
to_write = cnt > free_cnt ? free_cnt : cnt;
|
to_write = cnt > free_cnt ? free_cnt : cnt;
|
||||||
|
|
||||||
cnt2 = priv_write_idx + to_write;
|
cnt2 = priv_write_idx + to_write;
|
||||||
|
|
||||||
if (cnt2 > size) {
|
if (cnt2 > size) {
|
||||||
n1 = size - priv_write_idx;
|
n1 = size - priv_write_idx;
|
||||||
n2 = cnt2 & size_mask;
|
n2 = cnt2 & size_mask;
|
||||||
} else {
|
} else {
|
||||||
n1 = to_write;
|
n1 = to_write;
|
||||||
n2 = 0;
|
n2 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy (&buf[priv_write_idx], src, n1 * sizeof (T));
|
memcpy (&buf[priv_write_idx], src, n1 * sizeof (T));
|
||||||
priv_write_idx = (priv_write_idx + n1) & size_mask;
|
priv_write_idx = (priv_write_idx + n1) & size_mask;
|
||||||
|
|
||||||
if (n2) {
|
if (n2) {
|
||||||
memcpy (buf, src+n1, n2 * sizeof (T));
|
memcpy (buf, src+n1, n2 * sizeof (T));
|
||||||
priv_write_idx = n2;
|
priv_write_idx = n2;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_atomic_int_set(&write_idx, priv_write_idx);
|
g_atomic_int_set(&write_idx, priv_write_idx);
|
||||||
return to_write;
|
return to_write;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T> /*LIBPBD_API*/ void
|
template<class T> /*LIBPBD_API*/ void
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* Copyright (C) 1991-1994,1996-2003,2005,2006,2009
|
/* Copyright (C) 1991-1994,1996-2003,2005,2006,2009
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Lesser General Public
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
|
@ -19,14 +19,13 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#ifndef timersub
|
#ifndef timersub
|
||||||
# define timersub(a, b, result) \
|
# define timersub(a, b, result) \
|
||||||
do { \
|
do { \
|
||||||
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
|
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
|
||||||
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
|
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
|
||||||
if ((result)->tv_usec < 0) { \
|
if ((result)->tv_usec < 0) { \
|
||||||
--(result)->tv_sec; \
|
--(result)->tv_sec; \
|
||||||
(result)->tv_usec += 1000000; \
|
(result)->tv_usec += 1000000; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,49 +43,47 @@ tokenize(const StringType& str,
|
||||||
Iter it,
|
Iter it,
|
||||||
bool strip_whitespace=false)
|
bool strip_whitespace=false)
|
||||||
{
|
{
|
||||||
typename StringType::size_type start_pos = 0;
|
typename StringType::size_type start_pos = 0;
|
||||||
typename StringType::size_type end_pos = 0;
|
typename StringType::size_type end_pos = 0;
|
||||||
unsigned int token_count = 0;
|
unsigned int token_count = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
start_pos = str.find_first_not_of(delims, start_pos);
|
start_pos = str.find_first_not_of(delims, start_pos);
|
||||||
end_pos = str.find_first_of(delims, start_pos);
|
end_pos = str.find_first_of(delims, start_pos);
|
||||||
if (start_pos != end_pos) {
|
if (start_pos != end_pos) {
|
||||||
if (end_pos == str.npos) {
|
if (end_pos == str.npos) {
|
||||||
end_pos = str.length();
|
end_pos = str.length();
|
||||||
}
|
}
|
||||||
if (strip_whitespace) {
|
if (strip_whitespace) {
|
||||||
StringType stripped = str.substr(start_pos, end_pos - start_pos);
|
StringType stripped = str.substr(start_pos, end_pos - start_pos);
|
||||||
strip_whitespace_edges (stripped);
|
strip_whitespace_edges (stripped);
|
||||||
if (stripped.length()) {
|
if (stripped.length()) {
|
||||||
*it++ = stripped;
|
*it++ = stripped;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
*it++ = str.substr(start_pos, end_pos - start_pos);
|
*it++ = str.substr(start_pos, end_pos - start_pos);
|
||||||
}
|
}
|
||||||
++token_count;
|
++token_count;
|
||||||
start_pos = str.find_first_not_of(delims, end_pos + 1);
|
start_pos = str.find_first_not_of(delims, end_pos + 1);
|
||||||
}
|
}
|
||||||
} while (start_pos != str.npos);
|
} while (start_pos != str.npos);
|
||||||
|
|
||||||
if (start_pos != str.npos) {
|
if (start_pos != str.npos) {
|
||||||
if (strip_whitespace) {
|
if (strip_whitespace) {
|
||||||
StringType stripped = str.substr(start_pos, str.length() - start_pos);
|
StringType stripped = str.substr(start_pos, str.length() - start_pos);
|
||||||
strip_whitespace_edges (stripped);
|
strip_whitespace_edges (stripped);
|
||||||
if (stripped.length()) {
|
if (stripped.length()) {
|
||||||
*it++ = stripped;
|
*it++ = stripped;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
*it++ = str.substr(start_pos, str.length() - start_pos);
|
*it++ = str.substr(start_pos, str.length() - start_pos);
|
||||||
}
|
}
|
||||||
++token_count;
|
++token_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
return token_count;
|
return token_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace PBD
|
} // namespace PBD
|
||||||
|
|
||||||
#endif // PBD_TOKENIZER
|
#endif // PBD_TOKENIZER
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ XMLNode::clear_lists ()
|
||||||
|
|
||||||
_selected_children.clear ();
|
_selected_children.clear ();
|
||||||
|
|
||||||
for (curchild = _children.begin(); curchild != _children.end(); ++curchild) {
|
for (curchild = _children.begin(); curchild != _children.end(); ++curchild) {
|
||||||
delete *curchild;
|
delete *curchild;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -665,8 +665,7 @@ XMLNode::remove_nodes_and_delete(const string& propname, const string& val)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
XMLNode::remove_node_and_delete(const string& n, const string& propname,
|
XMLNode::remove_node_and_delete(const string& n, const string& propname, const string& val)
|
||||||
const string& val)
|
|
||||||
{
|
{
|
||||||
for (XMLNodeIterator i = _children.begin(); i != _children.end(); ++i) {
|
for (XMLNodeIterator i = _children.begin(); i != _children.end(); ++i) {
|
||||||
if ((*i)->name() == n) {
|
if ((*i)->name() == n) {
|
||||||
|
|
|
||||||
|
|
@ -531,8 +531,10 @@ FPGUI::build_proj_action_combo (Gtk::ComboBox& cb, FaderPort::ButtonState bs)
|
||||||
actions.push_back (make_pair (string("Toggle Meterbridge"), string(X_("Common/toggle-meterbridge"))));
|
actions.push_back (make_pair (string("Toggle Meterbridge"), string(X_("Common/toggle-meterbridge"))));
|
||||||
actions.push_back (make_pair (string (_("Zoom to Session")), string (X_("Editor/zoom-to-session"))));
|
actions.push_back (make_pair (string (_("Zoom to Session")), string (X_("Editor/zoom-to-session"))));
|
||||||
|
|
||||||
// actions.push_back (make_pair (string (_("Zoom In")), string (X_("Editor/temporal-zoom-in"))));
|
#if 0
|
||||||
// actions.push_back (make_pair (string (_("Zoom Out")), string (X_("Editor/temporal-zoom-out"))));
|
actions.push_back (make_pair (string (_("Zoom In")), string (X_("Editor/temporal-zoom-in"))));
|
||||||
|
actions.push_back (make_pair (string (_("Zoom Out")), string (X_("Editor/temporal-zoom-out"))));
|
||||||
|
#endif
|
||||||
|
|
||||||
build_action_combo (cb, actions, FaderPort::Proj, bs);
|
build_action_combo (cb, actions, FaderPort::Proj, bs);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -109,10 +109,11 @@ DeviceInfo::logic_control_buttons ()
|
||||||
void
|
void
|
||||||
DeviceInfo::shared_buttons ()
|
DeviceInfo::shared_buttons ()
|
||||||
{
|
{
|
||||||
// US-2499 button notes:
|
/* US-2499 button notes:
|
||||||
// CHAN button sends nothing. it inititates a dumb 0..127 knob mode for the 24 knobs
|
* CHAN button sends nothing. it inititates a dumb 0..127 knob mode for the 24 knobs
|
||||||
// PAN sends the regular pan/surround message. this tells our strips to send the pan knob position
|
* PAN sends the regular pan/surround message. this tells our strips to send the pan knob position
|
||||||
// AUX1-6 all send the same 0x29 + 0x21 message, I believe the surface uses this to captures knob info, somehow
|
* AUX1-6 all send the same 0x29 + 0x21 message, I believe the surface uses this to captures knob info, somehow
|
||||||
|
*/
|
||||||
|
|
||||||
_global_buttons[Button::Pan] = GlobalButtonInfo ("Pan/Surround", "assignment", 0x2a); // US-2400: this is sent (on&off in one msg) from the Pan button
|
_global_buttons[Button::Pan] = GlobalButtonInfo ("Pan/Surround", "assignment", 0x2a); // US-2400: this is sent (on&off in one msg) from the Pan button
|
||||||
|
|
||||||
|
|
@ -300,7 +301,7 @@ static Searchpath
|
||||||
devinfo_search_path ()
|
devinfo_search_path ()
|
||||||
{
|
{
|
||||||
bool devinfo_path_defined = false;
|
bool devinfo_path_defined = false;
|
||||||
std::string spath_env (Glib::getenv (devinfo_env_variable_name, devinfo_path_defined));
|
std::string spath_env (Glib::getenv (devinfo_env_variable_name, devinfo_path_defined));
|
||||||
|
|
||||||
if (devinfo_path_defined) {
|
if (devinfo_path_defined) {
|
||||||
return spath_env;
|
return spath_env;
|
||||||
|
|
|
||||||
|
|
@ -263,14 +263,18 @@ Strip::reset_stripable ()
|
||||||
void
|
void
|
||||||
Strip::notify_all()
|
Strip::notify_all()
|
||||||
{
|
{
|
||||||
// if (!_stripable) {
|
#if 0
|
||||||
// zero ();
|
if (!_stripable) {
|
||||||
// return;
|
zero ();
|
||||||
// }
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
// The active V-pot control may not be active for this strip
|
// The active V-pot control may not be active for this strip
|
||||||
// But if we zero it in the controls function it may erase
|
// But if we zero it in the controls function it may erase
|
||||||
// the one we do want
|
// the one we do want
|
||||||
// _surface->write (_vpot->zero());
|
#if 0
|
||||||
|
_surface->write (_vpot->zero());
|
||||||
|
#endif
|
||||||
|
|
||||||
notify_solo_changed ();
|
notify_solo_changed ();
|
||||||
notify_mute_changed ();
|
notify_mute_changed ();
|
||||||
|
|
@ -281,15 +285,19 @@ Strip::notify_all()
|
||||||
notify_vpot_change ();
|
notify_vpot_change ();
|
||||||
notify_panner_width_changed ();
|
notify_panner_width_changed ();
|
||||||
notify_record_enable_changed ();
|
notify_record_enable_changed ();
|
||||||
// notify_processor_changed ();
|
#if 0
|
||||||
|
notify_processor_changed ();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Strip::notify_solo_changed ()
|
Strip::notify_solo_changed ()
|
||||||
{
|
{
|
||||||
// if (_stripable && _solo) {
|
#if 0
|
||||||
// _surface->write (_solo->set_state (_stripable->solo_control()->soloed() ? on : off));
|
if (_stripable && _solo) {
|
||||||
// }
|
_surface->write (_solo->set_state (_stripable->solo_control()->soloed() ? on : off));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_solo->mark_dirty ();
|
_solo->mark_dirty ();
|
||||||
_trickle_counter = 0;
|
_trickle_counter = 0;
|
||||||
|
|
@ -299,14 +307,16 @@ void
|
||||||
Strip::notify_mute_changed ()
|
Strip::notify_mute_changed ()
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::US2400, string_compose ("Strip %1 mute changed\n", _index));
|
DEBUG_TRACE (DEBUG::US2400, string_compose ("Strip %1 mute changed\n", _index));
|
||||||
// if (_stripable && _mute) {
|
#if 0
|
||||||
// DEBUG_TRACE (DEBUG::US2400, string_compose ("\tstripable muted ? %1\n", _stripable->mute_control()->muted()));
|
if (_stripable && _mute) {
|
||||||
// DEBUG_TRACE (DEBUG::US2400, string_compose ("mute message: %1\n", _mute->set_state (_stripable->mute_control()->muted() ? on : off)));
|
DEBUG_TRACE (DEBUG::US2400, string_compose ("\tstripable muted ? %1\n", _stripable->mute_control()->muted()));
|
||||||
//
|
DEBUG_TRACE (DEBUG::US2400, string_compose ("mute message: %1\n", _mute->set_state (_stripable->mute_control()->muted() ? on : off)));
|
||||||
// _surface->write (_mute->set_state (_stripable->mute_control()->muted() ? on : off));
|
|
||||||
// } else {
|
_surface->write (_mute->set_state (_stripable->mute_control()->muted() ? on : off));
|
||||||
// _surface->write (_mute->zero());
|
} else {
|
||||||
// }
|
_surface->write (_mute->zero());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_mute->mark_dirty ();
|
_mute->mark_dirty ();
|
||||||
_trickle_counter = 0;
|
_trickle_counter = 0;
|
||||||
|
|
@ -346,10 +356,11 @@ Strip::update_selection_state ()
|
||||||
{
|
{
|
||||||
_select->mark_dirty ();
|
_select->mark_dirty ();
|
||||||
_trickle_counter = 0;
|
_trickle_counter = 0;
|
||||||
|
#if 0
|
||||||
// if(_stripable) {
|
if(_stripable) {
|
||||||
// _surface->write (_select->set_state (_stripable->is_selected()));
|
_surface->write (_select->set_state (_stripable->is_selected()));
|
||||||
// }
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ private:
|
||||||
PBD::ScopedConnectionList send_connections;
|
PBD::ScopedConnectionList send_connections;
|
||||||
int eq_band;
|
int eq_band;
|
||||||
|
|
||||||
int _trickle_counter;
|
int _trickle_counter;
|
||||||
|
|
||||||
ARDOUR::AutomationType _pan_mode;
|
ARDOUR::AutomationType _pan_mode;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ using namespace std;
|
||||||
ArdourDropdown::ArdourDropdown (Element e)
|
ArdourDropdown::ArdourDropdown (Element e)
|
||||||
: _scrolling_disabled(false)
|
: _scrolling_disabled(false)
|
||||||
{
|
{
|
||||||
// signal_button_press_event().connect (sigc::mem_fun(*this, &ArdourDropdown::on_mouse_pressed));
|
|
||||||
_menu.signal_size_request().connect (sigc::mem_fun(*this, &ArdourDropdown::menu_size_request));
|
_menu.signal_size_request().connect (sigc::mem_fun(*this, &ArdourDropdown::menu_size_request));
|
||||||
|
|
||||||
_menu.set_reserve_toggle_size(false);
|
_menu.set_reserve_toggle_size(false);
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ public:
|
||||||
void set_tooltip_prefix (std::string pfx) { _tooltip_prefix = pfx; controllable_changed (true); }
|
void set_tooltip_prefix (std::string pfx) { _tooltip_prefix = pfx; controllable_changed (true); }
|
||||||
|
|
||||||
boost::shared_ptr<PBD::Controllable> get_controllable() { return binding_proxy.get_controllable(); }
|
boost::shared_ptr<PBD::Controllable> get_controllable() { return binding_proxy.get_controllable(); }
|
||||||
void set_controllable (boost::shared_ptr<PBD::Controllable> c);
|
void set_controllable (boost::shared_ptr<PBD::Controllable> c);
|
||||||
|
|
||||||
bool on_button_press_event (GdkEventButton*);
|
bool on_button_press_event (GdkEventButton*);
|
||||||
bool on_button_release_event (GdkEventButton*);
|
bool on_button_release_event (GdkEventButton*);
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ public:
|
||||||
bool button_press_handler (GdkEventButton *);
|
bool button_press_handler (GdkEventButton *);
|
||||||
|
|
||||||
boost::shared_ptr<PBD::Controllable> get_controllable() const { return controllable; }
|
boost::shared_ptr<PBD::Controllable> get_controllable() const { return controllable; }
|
||||||
void set_controllable (boost::shared_ptr<PBD::Controllable>);
|
void set_controllable (boost::shared_ptr<PBD::Controllable>);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ArdourWidgets::PopUp* prompter;
|
ArdourWidgets::PopUp* prompter;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue