summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-07-14 03:43:32 +0000
committerDavid Robillard <d@drobilla.net>2006-07-14 03:43:32 +0000
commit50a3102b9b533d7f8786d220f8df67421b9227c8 (patch)
tree669f84631ba1d9a1d312e3f76b226ca938c75c0f /libs
parentedd841895b873b14c4aa814a80de5dc20ff30618 (diff)
Merge big changes (mostly Controllable) from trunk
git-svn-id: svn://localhost/ardour2/branches/midi@682 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/SConscript1
-rw-r--r--libs/ardour/ardour/ardour.h2
-rw-r--r--libs/ardour/ardour/audio_diskstream.h17
-rw-r--r--libs/ardour/ardour/audio_library.h7
-rw-r--r--libs/ardour/ardour/audio_track.h32
-rw-r--r--libs/ardour/ardour/audiofilesource.h5
-rw-r--r--libs/ardour/ardour/audiosource.h9
-rw-r--r--libs/ardour/ardour/configuration.h3
-rw-r--r--libs/ardour/ardour/connection.h2
-rw-r--r--libs/ardour/ardour/control_protocol_manager.h3
-rw-r--r--libs/ardour/ardour/destructive_filesource.h2
-rw-r--r--libs/ardour/ardour/diskstream.h22
-rw-r--r--libs/ardour/ardour/insert.h3
-rw-r--r--libs/ardour/ardour/io.h51
-rw-r--r--libs/ardour/ardour/ladspa_plugin.h4
-rw-r--r--libs/ardour/ardour/location.h6
-rw-r--r--libs/ardour/ardour/midi_source.h2
-rw-r--r--libs/ardour/ardour/midi_track.h31
-rw-r--r--libs/ardour/ardour/named_selection.h2
-rw-r--r--libs/ardour/ardour/panner.h44
-rw-r--r--libs/ardour/ardour/playlist.h11
-rw-r--r--libs/ardour/ardour/plugin.h29
-rw-r--r--libs/ardour/ardour/region.h4
-rw-r--r--libs/ardour/ardour/route.h48
-rw-r--r--libs/ardour/ardour/route_group.h2
-rw-r--r--libs/ardour/ardour/send.h8
-rw-r--r--libs/ardour/ardour/session.h30
-rw-r--r--libs/ardour/ardour/session_region.h2
-rw-r--r--libs/ardour/ardour/sndfilesource.h2
-rw-r--r--libs/ardour/ardour/source.h7
-rw-r--r--libs/ardour/ardour/tempo.h2
-rw-r--r--libs/ardour/ardour/types.h4
-rw-r--r--libs/ardour/ardour/utils.h2
-rw-r--r--libs/ardour/ardour/vst_plugin.h4
-rw-r--r--libs/ardour/audio_diskstream.cc113
-rw-r--r--libs/ardour/audio_library.cc50
-rw-r--r--libs/ardour/audio_track.cc168
-rw-r--r--libs/ardour/audiofilesource.cc8
-rw-r--r--libs/ardour/audioregion.cc4
-rw-r--r--libs/ardour/control_protocol_manager.cc5
-rw-r--r--libs/ardour/crossfade.cc13
-rw-r--r--libs/ardour/destructive_filesource.cc48
-rw-r--r--libs/ardour/diskstream.cc32
-rw-r--r--libs/ardour/globals.cc16
-rw-r--r--libs/ardour/insert.cc14
-rw-r--r--libs/ardour/io.cc226
-rw-r--r--libs/ardour/ladspa_plugin.cc94
-rw-r--r--libs/ardour/location.cc8
-rw-r--r--libs/ardour/midi_diskstream.cc8
-rw-r--r--libs/ardour/midi_track.cc233
-rw-r--r--libs/ardour/panner.cc241
-rw-r--r--libs/ardour/playlist.cc8
-rw-r--r--libs/ardour/plugin.cc168
-rw-r--r--libs/ardour/po/el_GR.po626
-rw-r--r--libs/ardour/po/it_IT.po626
-rw-r--r--libs/ardour/po/ru_RU.po626
-rw-r--r--libs/ardour/redirect.cc2
-rw-r--r--libs/ardour/region.cc8
-rw-r--r--libs/ardour/route.cc259
-rw-r--r--libs/ardour/session.cc44
-rw-r--r--libs/ardour/session_midi.cc7
-rw-r--r--libs/ardour/session_process.cc6
-rw-r--r--libs/ardour/session_state.cc87
-rw-r--r--libs/ardour/session_time.cc5
-rw-r--r--libs/ardour/sndfilesource.cc48
-rw-r--r--libs/ardour/source.cc5
-rw-r--r--libs/ardour/utils.cc9
-rw-r--r--libs/ardour/vst_plugin.cc13
-rw-r--r--libs/gtkmm2ext/SConscript5
-rw-r--r--libs/gtkmm2ext/barcontroller.cc103
-rw-r--r--libs/gtkmm2ext/binding_proxy.cc89
-rw-r--r--libs/gtkmm2ext/controller.cc92
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/barcontroller.h23
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/bindable_button.h50
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/binding_proxy.h (renamed from libs/pbd3/pbd/textreceiver.h)38
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/controller.h59
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/slider_controller.h42
-rw-r--r--libs/gtkmm2ext/po/el_GR.po4
-rw-r--r--libs/gtkmm2ext/po/es_ES.po4
-rw-r--r--libs/gtkmm2ext/po/pt_BR.po4
-rw-r--r--libs/gtkmm2ext/po/ru_RU.po4
-rw-r--r--libs/gtkmm2ext/popup.cc14
-rw-r--r--libs/gtkmm2ext/slider_controller.cc116
-rw-r--r--libs/libgnomecanvasmm/SConscript9
-rw-r--r--libs/libsndfile/src/sndfile.c15
-rw-r--r--libs/pbd/SConscript8
-rw-r--r--libs/pbd/controllable.cc26
-rw-r--r--libs/pbd/id.cc63
-rw-r--r--libs/pbd/pbd/controllable.h46
-rw-r--r--libs/pbd/pbd/id.h47
-rw-r--r--libs/pbd/pbd/stateful.h (renamed from libs/ardour/ardour/stateful.h)8
-rw-r--r--libs/pbd/stateful.cc (renamed from libs/ardour/stateful.cc)12
-rw-r--r--libs/pbd3/.cvsignore5
-rw-r--r--libs/pbd3/AUTHORS0
-rw-r--r--libs/pbd3/COPYING340
-rw-r--r--libs/pbd3/ChangeLog10
-rw-r--r--libs/pbd3/NEWS0
-rw-r--r--libs/pbd3/README0
-rw-r--r--libs/pbd3/SConscript65
-rw-r--r--libs/pbd3/base_ui.cc88
-rw-r--r--libs/pbd3/basename.cc20
-rw-r--r--libs/pbd3/convert.cc212
-rw-r--r--libs/pbd3/dirname.cc51
-rw-r--r--libs/pbd3/dmalloc.cc102
-rw-r--r--libs/pbd3/error.cc7
-rw-r--r--libs/pbd3/gettext.h82
-rw-r--r--libs/pbd3/i18n.h11
-rw-r--r--libs/pbd3/libpbd.pc.in11
-rw-r--r--libs/pbd3/libpbd.spec.in70
-rw-r--r--libs/pbd3/mountpoint.cc113
-rw-r--r--libs/pbd3/pathscanner.cc203
-rw-r--r--libs/pbd3/pbd/.DS_Storebin6148 -> 0 bytes
-rw-r--r--libs/pbd3/pbd/.cvsignore1
-rw-r--r--libs/pbd3/pbd/abstract_ui.cc149
-rw-r--r--libs/pbd3/pbd/abstract_ui.h79
-rw-r--r--libs/pbd3/pbd/atomic.h1232
-rw-r--r--libs/pbd3/pbd/base_ui.h46
-rw-r--r--libs/pbd3/pbd/basename.h13
-rw-r--r--libs/pbd3/pbd/compose.h393
-rw-r--r--libs/pbd3/pbd/convert.h40
-rw-r--r--libs/pbd3/pbd/datum.h57
-rw-r--r--libs/pbd3/pbd/dirname.h11
-rw-r--r--libs/pbd3/pbd/ellipsoid.h74
-rw-r--r--libs/pbd3/pbd/error.h32
-rw-r--r--libs/pbd3/pbd/failed_constructor.h11
-rw-r--r--libs/pbd3/pbd/fastlog.h40
-rw-r--r--libs/pbd3/pbd/foreach.h42
-rw-r--r--libs/pbd3/pbd/forkexec.h9
-rw-r--r--libs/pbd3/pbd/lock_free_fifo.h86
-rw-r--r--libs/pbd3/pbd/lockmonitor.h325
-rw-r--r--libs/pbd3/pbd/mathfix.h34
-rw-r--r--libs/pbd3/pbd/mountpoint.h28
-rw-r--r--libs/pbd3/pbd/pathscanner.h66
-rw-r--r--libs/pbd3/pbd/pool.h75
-rw-r--r--libs/pbd3/pbd/position.h38
-rw-r--r--libs/pbd3/pbd/precision_timer.h61
-rw-r--r--libs/pbd3/pbd/pthread_spinlock.h29
-rw-r--r--libs/pbd3/pbd/pthread_utils.h23
-rw-r--r--libs/pbd3/pbd/rcpointer.h61
-rw-r--r--libs/pbd3/pbd/receiver.h50
-rw-r--r--libs/pbd3/pbd/relation.h35
-rw-r--r--libs/pbd3/pbd/restartable_rw.h7
-rw-r--r--libs/pbd3/pbd/ringbuffer.h284
-rw-r--r--libs/pbd3/pbd/ringbufferNPT.h275
-rw-r--r--libs/pbd3/pbd/rt.h25
-rw-r--r--libs/pbd3/pbd/rtthread.h30
-rw-r--r--libs/pbd3/pbd/scale.h53
-rw-r--r--libs/pbd3/pbd/selectable.h102
-rw-r--r--libs/pbd3/pbd/stacktrace.h10
-rw-r--r--libs/pbd3/pbd/stl_delete.h89
-rw-r--r--libs/pbd3/pbd/stl_functors.h93
-rw-r--r--libs/pbd3/pbd/strsplit.h9
-rw-r--r--libs/pbd3/pbd/thread.h127
-rw-r--r--libs/pbd3/pbd/thrown_error.h39
-rw-r--r--libs/pbd3/pbd/touchable.h89
-rw-r--r--libs/pbd3/pbd/transmitter.h110
-rw-r--r--libs/pbd3/pbd/types.h32
-rw-r--r--libs/pbd3/pbd/undo.h96
-rw-r--r--libs/pbd3/pbd/unescape.h6
-rw-r--r--libs/pbd3/pbd/whitespace.h8
-rw-r--r--libs/pbd3/pbd/xml++.h129
-rw-r--r--libs/pbd3/pool.cc144
-rw-r--r--libs/pbd3/pthread_utils.cc133
-rw-r--r--libs/pbd3/receiver.cc58
-rw-r--r--libs/pbd3/stacktrace.cc42
-rw-r--r--libs/pbd3/strsplit.cc41
-rw-r--r--libs/pbd3/textreceiver.cc66
-rw-r--r--libs/pbd3/transmitter.cc115
-rw-r--r--libs/pbd3/undo.cc146
-rw-r--r--libs/pbd3/unescape.cc137
-rw-r--r--libs/pbd3/whitespace.cc30
-rw-r--r--libs/pbd3/xml++.cc422
-rw-r--r--libs/surfaces/control_protocol/control_protocol/control_protocol.h4
-rw-r--r--libs/surfaces/generic_midi/SConscript1
-rw-r--r--libs/surfaces/generic_midi/generic_midi_control_protocol.cc219
-rw-r--r--libs/surfaces/generic_midi/generic_midi_control_protocol.h44
-rw-r--r--libs/surfaces/generic_midi/interface.cc10
-rw-r--r--libs/surfaces/generic_midi/midicontrollable.cc366
-rw-r--r--libs/surfaces/generic_midi/midicontrollable.h97
-rw-r--r--libs/surfaces/tranzport/tranzport_control_protocol.cc14
-rw-r--r--libs/surfaces/tranzport/tranzport_control_protocol.h3
181 files changed, 2744 insertions, 10603 deletions
diff --git a/libs/ardour/SConscript b/libs/ardour/SConscript
index c93a7c4593..83849884ff 100644
--- a/libs/ardour/SConscript
+++ b/libs/ardour/SConscript
@@ -94,7 +94,6 @@ sndfile_helpers.cc
sndfilesource.cc
source.cc
state_manager.cc
-stateful.cc
tempo.cc
utils.cc
version.cc
diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h
index c0dfea9a95..dba588702f 100644
--- a/libs/ardour/ardour/ardour.h
+++ b/libs/ardour/ardour/ardour.h
@@ -58,7 +58,7 @@ namespace ARDOUR {
const layer_t max_layer = UCHAR_MAX;
- id_t new_id();
+ microseconds_t get_microseconds ();
Change new_change ();
diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h
index d1833d01a5..8e0f892e5a 100644
--- a/libs/ardour/ardour/audio_diskstream.h
+++ b/libs/ardour/ardour/audio_diskstream.h
@@ -33,7 +33,7 @@
#include <pbd/fastlog.h>
#include <pbd/ringbufferNPT.h>
-
+#include <pbd/stateful.h>
#include <ardour/ardour.h>
#include <ardour/configuration.h>
@@ -44,6 +44,7 @@
#include <ardour/utils.h>
#include <ardour/diskstream.h>
#include <ardour/audioplaylist.h>
+
struct tm;
namespace ARDOUR {
@@ -160,6 +161,17 @@ class AudioDiskstream : public Diskstream
//static sigc::signal<void,AudioDiskstream*> AudioDiskstreamCreated; // XXX use a ref with sigc2
static sigc::signal<void,list<AudioFileSource*>*> DeleteSources;
+ int set_loop (Location *loc);
+ sigc::signal<void,Location *> LoopSet;
+
+ std::list<Region*>& last_capture_regions () {
+ return _last_capture_regions;
+ }
+
+ void handle_input_change (IOChange, void *src);
+
+ const PBD::ID& id() const { return _id; }
+
protected:
friend class Session;
@@ -284,10 +296,11 @@ class AudioDiskstream : public Diskstream
void set_align_style_from_io();
void setup_destructive_playlist ();
void use_destructive_playlist ();
-
ChannelList channels;
AudioPlaylist* _playlist;
+ void engage_record_enable (void* src);
+ void disengage_record_enable (void* src);
};
}; /* namespace ARDOUR */
diff --git a/libs/ardour/ardour/audio_library.h b/libs/ardour/ardour/audio_library.h
index 2f9e84551b..3d4585fbd8 100644
--- a/libs/ardour/ardour/audio_library.h
+++ b/libs/ardour/ardour/audio_library.h
@@ -28,18 +28,23 @@
#include <sigc++/signal.h>
+#include <pbd/stateful.h>
+
using std::vector;
using std::string;
using std::map;
namespace ARDOUR {
-class AudioLibrary
+class AudioLibrary : public Stateful
{
public:
AudioLibrary ();
~AudioLibrary ();
+ XMLNode& get_state (void);
+ int set_state (const XMLNode&);
+
void set_paths (vector<string> paths);
vector<string> get_paths ();
void scan_paths ();
diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h
index 9d06f9425d..e92c11faff 100644
--- a/libs/ardour/ardour/audio_track.h
+++ b/libs/ardour/ardour/audio_track.h
@@ -55,7 +55,7 @@ class AudioTrack : public Route
AudioDiskstream& disk_stream() const { return *_diskstream; }
int set_diskstream (AudioDiskstream&, void *);
int use_diskstream (string name);
- int use_diskstream (id_t id);
+ int use_diskstream (const PBD::ID& id);
TrackMode mode() const { return _mode; }
void set_mode (TrackMode m);
@@ -88,13 +88,10 @@ class AudioTrack : public Route
XMLNode& get_template();
int set_state(const XMLNode& node);
- MIDI::Controllable& midi_rec_enable_control() {
- return _midi_rec_enable_control;
+ PBD::Controllable& rec_enable_control() {
+ return _rec_enable_control;
}
- void reset_midi_control (MIDI::Port*, bool);
- void send_all_midi_feedback ();
-
bool record_enabled() const;
void set_meter_point (MeterPoint, void* src);
@@ -116,9 +113,9 @@ class AudioTrack : public Route
FreezeRecordInsertInfo(XMLNode& st)
: state (st), insert (0) {}
- XMLNode state;
- Insert* insert;
- id_t id;
+ XMLNode state;
+ Insert* insert;
+ PBD::ID id;
UndoAction memento;
};
@@ -151,17 +148,16 @@ class AudioTrack : public Route
void set_state_part_two ();
void set_state_part_three ();
- struct MIDIRecEnableControl : public MIDI::Controllable {
- MIDIRecEnableControl (AudioTrack&, MIDI::Port *);
- void set_value (float);
- void send_feedback (bool);
- MIDI::byte* write_feedback (MIDI::byte* buf, int32_t& bufsize, bool val, bool force = false);
- AudioTrack& track;
- bool setting;
- bool last_written;
+ struct RecEnableControllable : public PBD::Controllable {
+ RecEnableControllable (AudioTrack&);
+
+ void set_value (float);
+ float get_value (void) const;
+
+ AudioTrack& track;
};
- MIDIRecEnableControl _midi_rec_enable_control;
+ RecEnableControllable _rec_enable_control;
bool _destructive;
};
diff --git a/libs/ardour/ardour/audiofilesource.h b/libs/ardour/ardour/audiofilesource.h
index 36251c07ff..b793ed14f0 100644
--- a/libs/ardour/ardour/audiofilesource.h
+++ b/libs/ardour/ardour/audiofilesource.h
@@ -95,7 +95,7 @@ class AudioFileSource : public AudioSource {
static void set_bwf_serial_number (int);
static void set_search_path (string);
- static void set_header_position_offset (jack_nframes_t offset, bool negative);
+ static void set_header_position_offset (jack_nframes_t offset );
static sigc::signal<void> HeaderPositionOffsetChanged;
@@ -107,7 +107,7 @@ class AudioFileSource : public AudioSource {
to cause issues.
*/
- void handle_header_position_change ();
+ virtual void handle_header_position_change ();
protected:
@@ -141,7 +141,6 @@ class AudioFileSource : public AudioSource {
static char bwf_serial_number[13];
static uint64_t header_position_offset;
- static bool header_position_negative;
virtual void set_timeline_position (jack_nframes_t pos);
virtual void set_header_timeline_position () = 0;
diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h
index 1dcf5b42f3..35158a24e7 100644
--- a/libs/ardour/ardour/audiosource.h
+++ b/libs/ardour/ardour/audiosource.h
@@ -33,7 +33,7 @@
#include <ardour/source.h>
#include <ardour/ardour.h>
-#include <ardour/stateful.h>
+#include <pbd/stateful.h>
#include <pbd/xml++.h>
using std::list;
@@ -51,6 +51,13 @@ class AudioSource : public Source
AudioSource (const XMLNode&);
virtual ~AudioSource ();
+ /* one could argue that this should belong to Source, but other data types
+ generally do not come with a model of "offset along an audio timeline"
+ so its here in AudioSource for now.
+ */
+
+ virtual jack_nframes_t natural_position() const { return 0; }
+
/* returns the number of items in this `audio_source' */
virtual jack_nframes_t length() const {
diff --git a/libs/ardour/ardour/configuration.h b/libs/ardour/ardour/configuration.h
index 60b5e8a2c3..cc4376f781 100644
--- a/libs/ardour/ardour/configuration.h
+++ b/libs/ardour/ardour/configuration.h
@@ -27,8 +27,9 @@
#include <sys/types.h>
#include <string>
+#include <pbd/stateful.h>
+
#include <ardour/types.h>
-#include <ardour/stateful.h>
#include <ardour/utils.h>
#include <ardour/configuration_variable.h>
diff --git a/libs/ardour/ardour/connection.h b/libs/ardour/ardour/connection.h
index 899bffc06a..da4d4e2684 100644
--- a/libs/ardour/ardour/connection.h
+++ b/libs/ardour/ardour/connection.h
@@ -25,7 +25,7 @@
#include <string>
#include <sigc++/signal.h>
#include <glibmm/thread.h>
-#include <ardour/stateful.h>
+#include <pbd/stateful.h>
using std::vector;
using std::string;
diff --git a/libs/ardour/ardour/control_protocol_manager.h b/libs/ardour/ardour/control_protocol_manager.h
index 03b21a299c..8eda7a4555 100644
--- a/libs/ardour/ardour/control_protocol_manager.h
+++ b/libs/ardour/ardour/control_protocol_manager.h
@@ -8,7 +8,7 @@
#include <glibmm/thread.h>
-#include <ardour/stateful.h>
+#include <pbd/stateful.h>
namespace ARDOUR {
@@ -23,6 +23,7 @@ struct ControlProtocolInfo {
std::string path;
bool requested;
bool mandatory;
+ XMLNode* state;
};
class ControlProtocolManager : public sigc::trackable, public Stateful
diff --git a/libs/ardour/ardour/destructive_filesource.h b/libs/ardour/ardour/destructive_filesource.h
index 2d10528ac8..947367f754 100644
--- a/libs/ardour/ardour/destructive_filesource.h
+++ b/libs/ardour/ardour/destructive_filesource.h
@@ -49,6 +49,8 @@ class DestructiveFileSource : public SndFileSource {
protected:
jack_nframes_t write_unlocked (Sample *src, jack_nframes_t cnt, char * workbuf);
+ virtual void handle_header_position_change ();
+
private:
static jack_nframes_t xfade_frames;
static gain_t* out_coefficient;
diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h
index a72289acd1..f9c662203c 100644
--- a/libs/ardour/ardour/diskstream.h
+++ b/libs/ardour/ardour/diskstream.h
@@ -33,7 +33,7 @@
#include <pbd/fastlog.h>
#include <pbd/ringbufferNPT.h>
-
+#include <pbd/stateful.h>
#include <ardour/ardour.h>
#include <ardour/configuration.h>
@@ -42,7 +42,7 @@
#include <ardour/route.h>
#include <ardour/port.h>
#include <ardour/utils.h>
-#include <ardour/stateful.h>
+
struct tm;
@@ -67,9 +67,6 @@ class Diskstream : public Stateful, public sigc::trackable
Destructive = 0x4
};
- Diskstream (Session &, const string& name, Flag f = Recordable);
- Diskstream (Session &, const XMLNode&);
-
string name () const { return _name; }
virtual int set_name (string str, void* src);
@@ -99,11 +96,11 @@ class Diskstream : public Stateful, public sigc::trackable
bool destructive() const { return _flags & Destructive; }
virtual void set_destructive (bool yn);
- id_t id() const { return _id; }
- bool hidden() const { return _flags & Hidden; }
- bool recordable() const { return _flags & Recordable; }
- bool reversed() const { return _actual_speed < 0.0f; }
- double speed() const { return _visible_speed; }
+ const PBD::ID& id() const { return _id; }
+ bool hidden() const { return _flags & Hidden; }
+ bool recordable() const { return _flags & Recordable; }
+ bool reversed() const { return _actual_speed < 0.0f; }
+ double speed() const { return _visible_speed; }
virtual void punch_in() {}
virtual void punch_out() {}
@@ -165,6 +162,9 @@ class Diskstream : public Stateful, public sigc::trackable
protected:
friend class Session;
+ Diskstream (Session &, const string& name, Flag f = Recordable);
+ Diskstream (Session &, const XMLNode&);
+
/* the Session is the only point of access for these
because they require that the Session is "inactive"
while they are called.
@@ -280,7 +280,7 @@ class Diskstream : public Stateful, public sigc::trackable
ARDOUR::Session& _session;
ARDOUR::IO* _io;
uint32_t _n_channels;
- id_t _id;
+ PBD::ID _id;
mutable gint _record_enabled;
double _visible_speed;
diff --git a/libs/ardour/ardour/insert.h b/libs/ardour/ardour/insert.h
index 803e16497d..2d6b672064 100644
--- a/libs/ardour/ardour/insert.h
+++ b/libs/ardour/ardour/insert.h
@@ -133,9 +133,6 @@ class PluginInsert : public Insert
bool is_generator() const;
- void reset_midi_control (MIDI::Port*, bool);
- void send_all_midi_feedback ();
-
void set_parameter (uint32_t port, float val);
AutoState get_port_automation_state (uint32_t port);
diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h
index fa2fe9851d..f696295b58 100644
--- a/libs/ardour/ardour/io.h
+++ b/libs/ardour/ardour/io.h
@@ -31,11 +31,10 @@
#include <pbd/fastlog.h>
#include <pbd/undo.h>
-
-#include <midi++/controllable.h>
+#include <pbd/stateful.h>
+#include <pbd/controllable.h>
#include <ardour/ardour.h>
-#include <ardour/stateful.h>
#include <ardour/utils.h>
#include <ardour/state_manager.h>
#include <ardour/curve.h>
@@ -186,25 +185,10 @@ class IO : public Stateful, public ARDOUR::StateManager
static sigc::signal<void,uint32_t> MoreOutputs;
static sigc::signal<int> PortsCreated;
- /* MIDI control */
-
- void set_midi_to_gain_function (gain_t (*function)(double val)) {
- _midi_gain_control.midi_to_gain = function;
- }
-
- void set_gain_to_midi_function (double (*function)(gain_t gain)) {
- _midi_gain_control.gain_to_midi = function;
- }
-
- MIDI::Controllable& midi_gain_control() {
- return _midi_gain_control;
+ PBD::Controllable& gain_control() {
+ return _gain_control;
}
- virtual void reset_midi_control (MIDI::Port*, bool on);
-
- virtual void send_all_midi_feedback ();
- virtual MIDI::byte* write_midi_feedback (MIDI::byte*, int32_t& bufsize);
-
/* Peak metering */
float peak_input_power (uint32_t n) {
@@ -266,7 +250,7 @@ public:
void start_pan_touch (uint32_t which);
void end_pan_touch (uint32_t which);
- id_t id() const { return _id; }
+ const PBD::ID& id() const { return _id; }
void defer_pan_reset ();
void allow_pan_reset ();
@@ -295,7 +279,7 @@ public:
string _name;
Connection* _input_connection;
Connection* _output_connection;
- id_t _id;
+ PBD::ID _id;
bool no_panner_reset;
XMLNode* deferred_state;
Buffer::Type _default_type;
@@ -310,31 +294,22 @@ public:
static void apply_declick (vector<Sample*>&, uint32_t nbufs, jack_nframes_t nframes,
gain_t initial, gain_t target, bool invert_polarity);
- struct MIDIGainControl : public MIDI::Controllable {
- MIDIGainControl (IO&, MIDI::Port *);
- void set_value (float);
-
- void send_feedback (gain_t);
- MIDI::byte* write_feedback (MIDI::byte* buf, int32_t& bufsize, gain_t val, bool force = false);
-
+ struct GainControllable : public PBD::Controllable {
+ GainControllable (IO& i) : io (i) {}
+
+ void set_value (float val);
+ float get_value (void) const;
+
IO& io;
- bool setting;
- MIDI::byte last_written;
-
- gain_t (*midi_to_gain) (double val);
- double (*gain_to_midi) (gain_t gain);
};
- MIDIGainControl _midi_gain_control;
+ GainControllable _gain_control;
/* state management */
Change restore_state (State&);
StateManager::State* state_factory (std::string why) const;
- bool get_midi_node_info (XMLNode * node, MIDI::eventType & ev, MIDI::channel_t & chan, MIDI::byte & additional);
- bool set_midi_node_info (XMLNode * node, MIDI::eventType ev, MIDI::channel_t chan, MIDI::byte additional);
-
/* automation */
jack_nframes_t last_automation_snapshot;
diff --git a/libs/ardour/ardour/ladspa_plugin.h b/libs/ardour/ardour/ladspa_plugin.h
index 2451953ce5..e4aba93ef6 100644
--- a/libs/ardour/ardour/ladspa_plugin.h
+++ b/libs/ardour/ardour/ladspa_plugin.h
@@ -27,12 +27,12 @@
#include <string>
#include <dlfcn.h>
-#include <midi++/controllable.h>
#include <sigc++/signal.h>
+#include <pbd/stateful.h>
+
#include <jack/types.h>
#include <ardour/ladspa.h>
-#include <ardour/stateful.h>
#include <ardour/plugin_state.h>
#include <ardour/plugin.h>
#include <ardour/ladspa_plugin.h>
diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h
index 75f4c5d12a..2c9f947541 100644
--- a/libs/ardour/ardour/location.h
+++ b/libs/ardour/ardour/location.h
@@ -32,10 +32,10 @@
#include <glibmm/thread.h>
#include <pbd/undo.h>
+#include <pbd/stateful.h>
-#include "ardour.h"
-#include "stateful.h"
-#include "state_manager.h"
+#include <ardour/ardour.h>
+#include <ardour/state_manager.h>
using std::string;
diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h
index 735ebba447..8e4da44082 100644
--- a/libs/ardour/ardour/midi_source.h
+++ b/libs/ardour/ardour/midi_source.h
@@ -30,7 +30,7 @@
#include <ardour/source.h>
#include <ardour/ardour.h>
-#include <ardour/stateful.h>
+#include <pbd/stateful.h>
#include <pbd/xml++.h>
using std::string;
diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h
index 1ef9bedf8d..090ca6b729 100644
--- a/libs/ardour/ardour/midi_track.h
+++ b/libs/ardour/ardour/midi_track.h
@@ -54,11 +54,11 @@ public:
void set_record_enable (bool yn, void *src);
- MidiDiskstream& disk_stream() const { return *diskstream; }
+ MidiDiskstream& disk_stream() const { return *_diskstream; }
int set_diskstream (MidiDiskstream&, void *);
int use_diskstream (string name);
- int use_diskstream (id_t id);
+ int use_diskstream (const PBD::ID& id);
TrackMode mode() const { return _mode; }
@@ -93,16 +93,13 @@ public:
XMLNode& get_template();
int set_state(const XMLNode& node);
- MIDI::Controllable& midi_rec_enable_control() { return _midi_rec_enable_control; }
-
- void reset_midi_control (MIDI::Port*, bool);
- void send_all_midi_feedback ();
+ PBD::Controllable& rec_enable_control() { return _rec_enable_control; }
bool record_enabled() const;
void set_meter_point (MeterPoint, void* src);
protected:
- MidiDiskstream *diskstream;
+ MidiDiskstream *_diskstream;
MeterPoint _saved_meter_point;
TrackMode _mode;
@@ -123,7 +120,7 @@ private:
XMLNode state;
Insert* insert;
- id_t id;
+ PBD::ID id;
UndoAction memento;
};
@@ -158,18 +155,16 @@ private:
void set_state_part_two ();
void set_state_part_three ();
- struct MIDIRecEnableControl : public MIDI::Controllable
- {
- MIDIRecEnableControl (MidiTrack&, MIDI::Port *);
- void set_value (float);
- void send_feedback (bool);
- MIDI::byte* write_feedback (MIDI::byte* buf, int32_t& bufsize, bool val, bool force = false);
- MidiTrack& track;
- bool setting;
- bool last_written;
+ struct MIDIRecEnableControllable : public PBD::Controllable {
+ MIDIRecEnableControllable (MidiTrack&);
+
+ void set_value (float);
+ float get_value (void) const;
+
+ MidiTrack& track;
};
- MIDIRecEnableControl _midi_rec_enable_control;
+ MIDIRecEnableControllable _rec_enable_control;
bool _destructive;
};
diff --git a/libs/ardour/ardour/named_selection.h b/libs/ardour/ardour/named_selection.h
index 91bb816181..87b71e73ff 100644
--- a/libs/ardour/ardour/named_selection.h
+++ b/libs/ardour/ardour/named_selection.h
@@ -24,7 +24,7 @@
#include <string>
#include <list>
-#include <ardour/stateful.h>
+#include <pbd/stateful.h>
class XMLNode;
diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h
index 806f350e03..37c985a2ef 100644
--- a/libs/ardour/ardour/panner.h
+++ b/libs/ardour/ardour/panner.h
@@ -27,10 +27,10 @@
#include <iostream>
#include <sigc++/signal.h>
-#include <midi++/controllable.h>
+#include <pbd/stateful.h>
+#include <pbd/controllable.h>
#include <ardour/types.h>
-#include <ardour/stateful.h>
#include <ardour/curve.h>
using std::istream;
@@ -75,24 +75,7 @@ class StreamPanner : public sigc::trackable, public Stateful
virtual void set_automation_state (AutoState) = 0;
virtual void set_automation_style (AutoStyle) = 0;
- /* MIDI control */
-
- struct MIDIControl : public MIDI::Controllable {
- MIDIControl (StreamPanner&, MIDI::Port *);
- void set_value (float);
- void send_feedback (gain_t);
- MIDI::byte* write_feedback (MIDI::byte* buf, int32_t& bufsize, gain_t val, bool force = false);
-
- pan_t (*midi_to_pan)(double val);
- double (*pan_to_midi)(pan_t p);
-
- StreamPanner& sp;
- bool setting;
- gain_t last_written;
- };
-
- MIDIControl& midi_control() { return _midi_control; }
- void reset_midi_control (MIDI::Port *, bool);
+ PBD::Controllable& control() { return _control; }
/* XXX this is wrong. for multi-dimensional panners, there
must surely be more than 1 automation curve.
@@ -100,7 +83,6 @@ class StreamPanner : public sigc::trackable, public Stateful
virtual Curve& automation() = 0;
-
virtual int load (istream&, string path, uint32_t&) = 0;
virtual int save (ostream&) const = 0;
@@ -130,12 +112,20 @@ class StreamPanner : public sigc::trackable, public Stateful
float effective_z;
bool _muted;
- MIDIControl _midi_control;
- void add_state (XMLNode&);
- bool get_midi_node_info (XMLNode * node, MIDI::eventType & ev, MIDI::channel_t & chan, MIDI::byte & additional);
- bool set_midi_node_info (XMLNode * node, MIDI::eventType ev, MIDI::channel_t chan, MIDI::byte additional);
+ struct PanControllable : public PBD::Controllable {
+ PanControllable (StreamPanner& p) : panner (p) {}
+
+ StreamPanner& panner;
+
+ void set_value (float);
+ float get_value (void) const;
+ bool can_send_feedback() const;
+ };
+ PanControllable _control;
+
+ void add_state (XMLNode&);
virtual void update () = 0;
};
@@ -290,10 +280,6 @@ class Panner : public std::vector<StreamPanner*>, public Stateful, public sigc::
std::vector<Output> outputs;
Session& session() const { return _session; }
- void reset_midi_control (MIDI::Port *, bool);
- void send_all_midi_feedback ();
- MIDI::byte* write_midi_feedback (MIDI::byte*, int32_t& bufsize);
-
enum LinkDirection {
SameDirection,
OppositeDirection
diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h
index 0a988b3c10..69b6a1fbc3 100644
--- a/libs/ardour/ardour/playlist.h
+++ b/libs/ardour/ardour/playlist.h
@@ -31,12 +31,13 @@
#include <glib.h>
#include <sigc++/signal.h>
+
#include <pbd/undo.h>
+#include <pbd/stateful.h>
#include <ardour/ardour.h>
#include <ardour/crossfade_compare.h>
#include <ardour/location.h>
-#include <ardour/stateful.h>
#include <ardour/state_manager.h>
namespace ARDOUR {
@@ -86,7 +87,7 @@ class Playlist : public Stateful, public StateManager {
void duplicate (Region&, jack_nframes_t position, float times);
void nudge_after (jack_nframes_t start, jack_nframes_t distance, bool forwards);
- Region* find_region (id_t) const;
+ Region* find_region (const PBD::ID&) const;
Playlist* cut (list<AudioRange>&, bool result_is_hidden = true);
Playlist* copy (list<AudioRange>&, bool result_is_hidden = true);
@@ -135,8 +136,8 @@ class Playlist : public Stateful, public StateManager {
Session& session() { return _session; }
- id_t get_orig_diskstream_id () const { return _orig_diskstream_id; }
- void set_orig_diskstream_id (id_t did) { _orig_diskstream_id = did; }
+ const PBD::ID& get_orig_diskstream_id () const { return _orig_diskstream_id; }
+ void set_orig_diskstream_id (const PBD::ID& did) { _orig_diskstream_id = did; }
/* destructive editing */
@@ -190,7 +191,7 @@ class Playlist : public Stateful, public StateManager {
bool _frozen;
uint32_t subcnt;
uint32_t _read_data_count;
- id_t _orig_diskstream_id;
+ PBD::ID _orig_diskstream_id;
uint64_t layer_op_counter;
jack_nframes_t freeze_length;
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h
index 211b00d0bb..e7d05aa352 100644
--- a/libs/ardour/ardour/plugin.h
+++ b/libs/ardour/ardour/plugin.h
@@ -21,12 +21,13 @@
#ifndef __ardour_ladspa_h__
#define __ardour_ladspa_h__
-#include <midi++/controllable.h>
#include <sigc++/signal.h>
+#include <pbd/stateful.h>
+#include <pbd/controllable.h>
+
#include <jack/types.h>
#include <ardour/types.h>
-#include <ardour/stateful.h>
#include <ardour/plugin_state.h>
#include <ardour/cycles.h>
@@ -136,10 +137,7 @@ class Plugin : public Stateful, public sigc::trackable
sigc::signal<void,uint32_t,float> ParameterChanged;
sigc::signal<void,Plugin *> GoingAway;
- void reset_midi_control (MIDI::Port*, bool);
- void send_all_midi_feedback ();
- MIDI::byte* write_midi_feedback (MIDI::byte*, int32_t& bufsize);
- MIDI::Controllable *get_nth_midi_control (uint32_t);
+ PBD::Controllable *get_nth_control (uint32_t);
PluginInfo & get_info() { return _info; }
void set_info (const PluginInfo &inf) { _info = inf; }
@@ -158,16 +156,14 @@ class Plugin : public Stateful, public sigc::trackable
map<string,string> presets;
bool save_preset(string name, string domain /* vst, ladspa etc. */);
- void setup_midi_controls ();
-
+ void setup_controls ();
- struct MIDIPortControl : public MIDI::Controllable {
- MIDIPortControl (Plugin&, uint32_t abs_port_id, MIDI::Port *,
- float lower, float upper, bool toggled, bool logarithmic);
+ struct PortControllable : public PBD::Controllable {
+ PortControllable (Plugin&, uint32_t abs_port_id,
+ float lower, float upper, bool toggled, bool logarithmic);
void set_value (float);
- void send_feedback (float);
- MIDI::byte* write_feedback (MIDI::byte* buf, int32_t& bufsize, float val, bool force = false);
+ float get_value () const;
Plugin& plugin;
uint32_t absolute_port;
@@ -176,14 +172,9 @@ class Plugin : public Stateful, public sigc::trackable
float range;
bool toggled;
bool logarithmic;
-
- bool setting;
- float last_written;
};
- vector<MIDIPortControl*> midi_controls;
-
-
+ vector<PortControllable*> controls;
};
/* this is actually defined in plugin_manager.cc */
diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h
index 67b5b3d9dd..d58f98adca 100644
--- a/libs/ardour/ardour/region.h
+++ b/libs/ardour/ardour/region.h
@@ -97,7 +97,7 @@ class Region : public Stateful, public StateManager
Region (const XMLNode&);
~Region();
- ARDOUR::id_t id() const { return _id; }
+ const PBD::ID& id() const { return _id; }
/* Note: changing the name of a Region does not constitute an edit */
@@ -222,7 +222,7 @@ class Region : public Stateful, public StateManager
mutable RegionEditState _first_edit;
int _frozen;
Glib::Mutex lock;
- ARDOUR::id_t _id;
+ PBD::ID _id;
ARDOUR::Playlist* _playlist;
mutable uint32_t _read_data_count; // modified in read()
Change pending_changed;
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 747dae939c..d30138640a 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -31,10 +31,10 @@
#include <glibmm/thread.h>
#include <pbd/xml++.h>
#include <pbd/undo.h>
-#include <midi++/controllable.h>
+#include <pbd/stateful.h>
+#include <pbd/controllable.h>
#include <ardour/ardour.h>
-#include <ardour/stateful.h>
#include <ardour/io.h>
#include <ardour/session.h>
#include <ardour/redirect.h>
@@ -215,34 +215,28 @@ class Route : public IO
bool feeds (Route *);
set<Route *> fed_by;
- struct MIDIToggleControl : public MIDI::Controllable {
- enum ToggleType {
- MuteControl = 0,
- SoloControl
- };
-
- MIDIToggleControl (Route&, ToggleType, MIDI::Port *);
- void set_value (float);
- void send_feedback (bool);
- MIDI::byte* write_feedback (MIDI::byte* buf, int32_t& bufsize, bool val, bool force = false);
-
- Route& route;
- ToggleType type;
- bool setting;
- bool last_written;
+ struct ToggleControllable : public PBD::Controllable {
+ enum ToggleType {
+ MuteControl = 0,
+ SoloControl
+ };
+
+ ToggleControllable (Route&, ToggleType);
+ void set_value (float);
+ float get_value (void) const;
+
+ Route& route;
+ ToggleType type;
};
- MIDI::Controllable& midi_solo_control() {
- return _midi_solo_control;
+ PBD::Controllable& solo_control() {
+ return _solo_control;
}
- MIDI::Controllable& midi_mute_control() {
- return _midi_mute_control;
+
+ PBD::Controllable& mute_control() {
+ return _mute_control;
}
- virtual void reset_midi_control (MIDI::Port*, bool);
- virtual void send_all_midi_feedback ();
- virtual MIDI::byte* write_midi_feedback (MIDI::byte*, int32_t& bufsize);
-
void automation_snapshot (jack_nframes_t now);
void protect_automation ();
@@ -302,8 +296,8 @@ class Route : public IO
std::string _comment;
bool _have_internal_generator;
- MIDIToggleControl _midi_solo_control;
- MIDIToggleControl _midi_mute_control;
+ ToggleControllable _solo_control;
+ ToggleControllable _mute_control;
void passthru (jack_nframes_t start_frame, jack_nframes_t end_frame,
jack_nframes_t nframes, jack_nframes_t offset, int declick, bool meter_inputs);
diff --git a/libs/ardour/ardour/route_group.h b/libs/ardour/ardour/route_group.h
index c9f966666f..19374b4f65 100644
--- a/libs/ardour/ardour/route_group.h
+++ b/libs/ardour/ardour/route_group.h
@@ -26,7 +26,7 @@
#include <string>
#include <stdint.h>
#include <sigc++/signal.h>
-#include <ardour/stateful.h>
+#include <pbd/stateful.h>
#include <ardour/types.h>
using std::string;
diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h
index a94318f2a5..54d4cbd7a9 100644
--- a/libs/ardour/ardour/send.h
+++ b/libs/ardour/ardour/send.h
@@ -24,12 +24,12 @@
#include <sigc++/signal.h>
#include <string>
+
+#include <pbd/stateful.h>
#include <ardour/ardour.h>
#include <ardour/audioengine.h>
-
-#include "io.h"
-#include "stateful.h"
-#include "redirect.h"
+#include <ardour/io.h>
+#include <ardour/redirect.h>
namespace ARDOUR {
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 0e1b7627be..6192fe4abd 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -40,10 +40,11 @@
#include <midi++/types.h>
#include <midi++/mmc.h>
+#include <pbd/stateful.h>
+
#include <ardour/ardour.h>
#include <ardour/configuration.h>
#include <ardour/location.h>
-#include <ardour/stateful.h>
#include <ardour/gain.h>
#include <ardour/io.h>
@@ -57,6 +58,10 @@ namespace MIDI {
class Port;
}
+namespace PBD {
+ class Controllable;
+}
+
namespace ARDOUR {
class Port;
@@ -274,7 +279,7 @@ class Session : public sigc::trackable, public Stateful
vector<Sample*>& get_silent_buffers (uint32_t howmany);
vector<Sample*>& get_send_buffers () { return _send_buffers; }
- Diskstream *diskstream_by_id (id_t id);
+ Diskstream *diskstream_by_id (const PBD::ID& id);
Diskstream *diskstream_by_name (string name);
bool have_captured() const { return _have_captured; }
@@ -706,7 +711,7 @@ class Session : public sigc::trackable, public Stateful
AudioFileSource *create_audio_source_for_session (ARDOUR::AudioDiskstream&, uint32_t which_channel, bool destructive);
- Source *get_source (ARDOUR::id_t);
+ Source *source_by_id (const PBD::ID&);
/* playlist management */
@@ -967,7 +972,13 @@ class Session : public sigc::trackable, public Stateful
static apply_gain_to_buffer_t apply_gain_to_buffer;
static mix_buffers_with_gain_t mix_buffers_with_gain;
static mix_buffers_no_gain_t mix_buffers_no_gain;
-
+
+ static sigc::signal<void> SendFeedback;
+
+ /* Controllables */
+
+ PBD::Controllable* controllable_by_id (const PBD::ID&);
+
protected:
friend class AudioEngine;
void set_block_size (jack_nframes_t nframes);
@@ -1502,7 +1513,7 @@ class Session : public sigc::trackable, public Stateful
/* REGION MANAGEMENT */
mutable Glib::Mutex region_lock;
- typedef map<ARDOUR::id_t,AudioRegion *> AudioRegionList;
+ typedef map<PBD::ID,AudioRegion *> AudioRegionList;
AudioRegionList audio_regions;
void region_renamed (Region *);
@@ -1515,7 +1526,7 @@ class Session : public sigc::trackable, public Stateful
/* SOURCES */
mutable Glib::Mutex audio_source_lock;
- typedef std::map<id_t, AudioSource *> AudioSourceList;
+ typedef std::map<PBD::ID,AudioSource *> AudioSourceList;
AudioSourceList audio_sources;
@@ -1743,6 +1754,13 @@ class Session : public sigc::trackable, public Stateful
LayerModel layer_model;
CrossfadeModel xfade_model;
+
+ typedef std::list<PBD::Controllable*> Controllables;
+ Glib::Mutex controllables_lock;
+ Controllables controllables;
+
+ void add_controllable (PBD::Controllable*);
+ void remove_controllable (PBD::Controllable*);
};
}; /* namespace ARDOUR */
diff --git a/libs/ardour/ardour/session_region.h b/libs/ardour/ardour/session_region.h
index 13d88a9aa4..4f0fb92e3b 100644
--- a/libs/ardour/ardour/session_region.h
+++ b/libs/ardour/ardour/session_region.h
@@ -10,7 +10,7 @@ template<class T> void Session::foreach_audio_region (T *obj, void (T::*func)(Au
{
Glib::Mutex::Lock lm (region_lock);
for (AudioRegionList::iterator i = audio_regions.begin(); i != audio_regions.end(); i++) {
- (obj->*func) ((*i).second);
+ (obj->*func) (i->second);
}
}
diff --git a/libs/ardour/ardour/sndfilesource.h b/libs/ardour/ardour/sndfilesource.h
index 5e3c1f621d..55a0e990a0 100644
--- a/libs/ardour/ardour/sndfilesource.h
+++ b/libs/ardour/ardour/sndfilesource.h
@@ -51,7 +51,7 @@ class SndFileSource : public AudioFileSource {
int update_header (jack_nframes_t when, struct tm&, time_t);
int flush_header ();
- void handle_smpte_offset_change (jack_nframes_t offset, bool negative);
+ jack_nframes_t natural_position () const;
protected:
void set_header_timeline_position ();
diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h
index f3133c71cd..f57ea79854 100644
--- a/libs/ardour/ardour/source.h
+++ b/libs/ardour/ardour/source.h
@@ -25,8 +25,9 @@
#include <sigc++/signal.h>
+#include <pbd/stateful.h>
+
#include <ardour/ardour.h>
-#include <ardour/stateful.h>
namespace ARDOUR {
@@ -40,7 +41,7 @@ class Source : public Stateful, public sigc::trackable
std::string name() const { return _name; }
int set_name (std::string str, bool destructive);
- ARDOUR::id_t id() const { return _id; }
+ const PBD::ID& id() const { return _id; }
uint32_t use_cnt() const { return _use_cnt; }
void use ();
@@ -60,7 +61,7 @@ class Source : public Stateful, public sigc::trackable
time_t _timestamp;
private:
- ARDOUR::id_t _id;
+ PBD::ID _id;
};
}
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h
index 13e8eb6348..db06894607 100644
--- a/libs/ardour/ardour/tempo.h
+++ b/libs/ardour/ardour/tempo.h
@@ -27,10 +27,10 @@
#include <cmath>
#include <glibmm/thread.h>
#include <pbd/undo.h>
+#include <pbd/stateful.h>
#include <sigc++/signal.h>
#include <ardour/ardour.h>
-#include <ardour/stateful.h>
#include <ardour/state_manager.h>
class XMLNode;
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index e729bbe956..1ae58039d9 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -30,6 +30,8 @@
#include <inttypes.h>
#include <jack/types.h>
#include <control_protocol/smpte.h>
+#include <pbd/id.h>
+
#include <map>
#if __GNUC__ < 3
@@ -45,7 +47,7 @@ namespace ARDOUR {
typedef float pan_t;
typedef float gain_t;
typedef uint32_t layer_t;
- typedef uint64_t id_t;
+ typedef uint64_t microseconds_t;
typedef unsigned char RawMidi;
diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h
index 3a9905b3ac..ad471085b5 100644
--- a/libs/ardour/ardour/utils.h
+++ b/libs/ardour/ardour/utils.h
@@ -50,8 +50,6 @@ int tokenize_fullpath (std::string fullpath, std::string& path, std::string& nam
int touch_file(std::string path);
-uint32_t long get_uid();
-
std::string region_name_from_path (std::string path);
std::string path_expand (std::string);
diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h
index ee8e6e986b..3cb10d1779 100644
--- a/libs/ardour/ardour/vst_plugin.h
+++ b/libs/ardour/ardour/vst_plugin.h
@@ -28,11 +28,9 @@
#include <string>
#include <dlfcn.h>
-#include <midi++/controllable.h>
#include <sigc++/signal.h>
-
+#include <pbd/stateful.h>
#include <jack/types.h>
-#include <ardour/stateful.h>
#include <ardour/plugin_state.h>
#include <ardour/plugin.h>
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index f24993b87b..20dbb915b0 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -65,7 +65,7 @@ AudioDiskstream::AudioDiskstream (Session &sess, const string &name, Diskstream:
in_set_state = true;
- init (flag);
+ init(flag);
use_new_playlist ();
in_set_state = false;
@@ -185,7 +185,7 @@ AudioDiskstream::~AudioDiskstream ()
channels.clear();
}
-/*
+
void
AudioDiskstream::handle_input_change (IOChange change, void *src)
{
@@ -196,7 +196,7 @@ AudioDiskstream::handle_input_change (IOChange change, void *src)
_session.request_input_change_handling ();
}
}
-*/
+
void
AudioDiskstream::non_realtime_input_change ()
{
@@ -421,8 +421,10 @@ AudioDiskstream::setup_destructive_playlist ()
/* a single full-sized region */
+ cerr << "setup DS using " << srcs.front()->natural_position () << endl;
+
AudioRegion* region = new AudioRegion (srcs, 0, max_frames, _name);
- _playlist->add_region (*region, 0);
+ _playlist->add_region (*region, srcs.front()->natural_position());
}
void
@@ -1040,6 +1042,12 @@ AudioDiskstream::seek (jack_nframes_t frame, bool complete_refill)
(*chan).capture_buf->reset ();
}
+ /* can't rec-enable in destructive mode if transport is before start */
+
+ if (destructive() && record_enabled() && frame < _session.current_start_frame()) {
+ disengage_record_enable (this);
+ }
+
playback_sample = frame;
file_frame = frame;
@@ -1451,7 +1459,6 @@ AudioDiskstream::do_flush (char * workbuf, bool force_flush)
to_write = min (disk_io_chunk_frames, (jack_nframes_t) vector.len[0]);
-
// check the transition buffer when recording destructive
// important that we get this after the capture buf
@@ -1773,15 +1780,15 @@ AudioDiskstream::finish_capture (bool rec_monitors_input)
void
AudioDiskstream::set_record_enabled (bool yn, void* src)
{
- bool rolling = _session.transport_speed() != 0.0f;
-
if (!recordable() || !_session.record_enabling_legal()) {
return;
}
-
- /* if we're turning on rec-enable, there needs to be an
- input connection.
- */
+
+ /* can't rec-enable in destructive mode if transport is before start */
+
+ if (destructive() && yn && _session.transport_frame() < _session.current_start_frame()) {
+ return;
+ }
if (yn && channels[0].source == 0) {
@@ -1798,36 +1805,51 @@ AudioDiskstream::set_record_enabled (bool yn, void* src)
if (record_enabled() != yn) {
if (yn) {
- g_atomic_int_set (&_record_enabled, 1);
- capturing_sources.clear ();
- if (Config->get_use_hardware_monitoring()) {
- for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
- if ((*chan).source) {
- (*chan).source->request_monitor_input (!(_session.get_auto_input() && rolling));
- }
- capturing_sources.push_back ((*chan).write_source);
- }
- } else {
- for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
- capturing_sources.push_back ((*chan).write_source);
- }
- }
-
+ engage_record_enable (src);
} else {
- g_atomic_int_set (&_record_enabled, 0);
- if (Config->get_use_hardware_monitoring()) {
- for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
- if ((*chan).source) {
- (*chan).source->request_monitor_input (false);
- }
- }
+ disengage_record_enable (src);
+ }
+ }
+}
+
+void
+AudioDiskstream::engage_record_enable (void* src)
+{
+ bool rolling = _session.transport_speed() != 0.0f;
+
+ g_atomic_int_set (&_record_enabled, 1);
+ capturing_sources.clear ();
+ if (Config->get_use_hardware_monitoring()) {
+ for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
+ if ((*chan).source) {
+ (*chan).source->request_monitor_input (!(_session.get_auto_input() && rolling));
}
- capturing_sources.clear ();
+ capturing_sources.push_back ((*chan).write_source);
+ }
+ } else {
+ for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
+ capturing_sources.push_back ((*chan).write_source);
}
+ }
+
+ record_enable_changed (src); /* EMIT SIGNAL */
+}
- record_enable_changed (src); /* EMIT SIGNAL */
+void
+AudioDiskstream::disengage_record_enable (void* src)
+{
+ g_atomic_int_set (&_record_enabled, 0);
+ if (Config->get_use_hardware_monitoring()) {
+ for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
+ if ((*chan).source) {
+ (*chan).source->request_monitor_input (false);
+ }
+ }
}
+ capturing_sources.clear ();
+ record_enable_changed (src); /* EMIT SIGNAL */
}
+
XMLNode&
AudioDiskstream::get_state ()
@@ -1848,7 +1870,7 @@ AudioDiskstream::get_state ()
node->add_property ("speed", buf);
node->add_property("name", _name);
- snprintf (buf, sizeof(buf), "%" PRIu64, id());
+ id().print (buf);
node->add_property("id", buf);
if (!capturing_sources.empty() && _session.get_record_enabled()) {
@@ -1915,11 +1937,11 @@ AudioDiskstream::set_state (const XMLNode& node)
if (deprecated_io_node) {
if ((prop = deprecated_io_node->property ("id")) != 0) {
- sscanf (prop->value().c_str(), "%" PRIu64, &_id);
+ _id = prop->value ();
}
} else {
if ((prop = node.property ("id")) != 0) {
- sscanf (prop->value().c_str(), "%" PRIu64, &_id);
+ _id = prop->value ();
}
}
@@ -2238,6 +2260,21 @@ AudioDiskstream::capture_buffer_load () const
(double) channels.front().capture_buf->bufsize());
}
+int
+AudioDiskstream::set_loop (Location *location)
+{
+ if (location) {
+ if (location->start() >= location->end()) {
+ error << string_compose(_("Location \"%1\" not valid for track loop (start >= end)"), location->name()) << endl;
+ return -1;
+ }
+ }
+
+ loop_location = location;
+
+ LoopSet (location); /* EMIT SIGNAL */
+ return 0;
+}
int
AudioDiskstream::use_pending_capture_data (XMLNode& node)
diff --git a/libs/ardour/audio_library.cc b/libs/ardour/audio_library.cc
index 7f421e86c8..168a1dcf5d 100644
--- a/libs/ardour/audio_library.cc
+++ b/libs/ardour/audio_library.cc
@@ -75,11 +75,16 @@ AudioLibrary::AudioLibrary ()
lrdf_free_statements(matches);
+ XMLNode* state = instant_xml(X_("AudioLibrary"), get_user_ardour_path());
+ if (state) {
+ set_state(*state);
+ }
scan_paths();
}
AudioLibrary::~AudioLibrary ()
{
+ add_instant_xml(get_state(), get_user_ardour_path());
}
void
@@ -429,5 +434,50 @@ AudioLibrary::safe_file_extension(string file)
file.rfind(".maud")== string::npos &&
file.rfind(".vwe") == string::npos &&
file.rfind(".paf") == string::npos &&
+#ifdef HAVE_COREAUDIO
+ file.rfind(".mp3") == string::npos &&
+ file.rfind(".aac") == string::npos &&
+ file.rfind(".mp4") == string::npos &&
+#endif // HAVE_COREAUDIO
file.rfind(".voc") == string::npos);
}
+
+XMLNode&
+AudioLibrary::get_state ()
+{
+ XMLNode* root = new XMLNode(X_("AudioLibrary"));
+
+ for (vector<string>::iterator i = sfdb_paths.begin(); i != sfdb_paths.end(); ++i) {
+ XMLNode* node = new XMLNode(X_("Path"));
+ node->add_property("value", *i);
+ root->add_child_nocopy(*node);
+ }
+
+ return *root;
+}
+
+int
+AudioLibrary::set_state (const XMLNode& node)
+{
+ if (node.name() != X_("AudioLibrary")) {
+ fatal << "programming error: AudioLibrary: incorrect XML node sent to set_state()" << endmsg;
+ return -1;
+ }
+
+ XMLNodeList nodes = node.children(X_("Path"));
+
+ vector<string> paths;
+ XMLProperty* prop;
+ XMLNode* child;
+ for (XMLNodeConstIterator iter = nodes.begin(); iter != nodes.end(); ++iter) {
+ child = *iter;
+
+ if ((prop = child->property(X_("value"))) != 0) {
+ paths.push_back(prop->value());
+ }
+ }
+
+ sfdb_paths = paths;
+
+ return 0;
+}
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc
index 82a2a38c2c..b3727937e2 100644
--- a/libs/ardour/audio_track.cc
+++ b/libs/ardour/audio_track.cc
@@ -43,7 +43,7 @@ using namespace PBD;
AudioTrack::AudioTrack (Session& sess, string name, Route::Flag flag, TrackMode mode)
: Route (sess, name, 1, -1, -1, -1, flag),
_diskstream (0),
- _midi_rec_enable_control (*this, _session.midi_port())
+ _rec_enable_control (*this)
{
AudioDiskstream::Flag dflags = AudioDiskstream::Flag (0);
@@ -65,26 +65,17 @@ AudioTrack::AudioTrack (Session& sess, string name, Route::Flag flag, TrackMode
_mode = mode;
set_diskstream (*ds, this);
-
- // session.SMPTEOffsetChanged.connect (mem_fun (*this, &AudioTrack::handle_smpte_offset_change));
-
- // we do this even though Route already did it in it's init
- reset_midi_control (_session.midi_port(), _session.get_midi_control());
-
}
AudioTrack::AudioTrack (Session& sess, const XMLNode& node)
: Route (sess, "to be renamed", 0, 0, -1, -1),
_diskstream (0),
- _midi_rec_enable_control (*this, _session.midi_port())
+ _rec_enable_control (*this)
{
_freeze_record.state = NoFreeze;
set_state (node);
_declickable = true;
_saved_meter_point = _meter_point;
-
- // we do this even though Route already did it in it's init
- reset_midi_control (_session.midi_port(), _session.get_midi_control());
}
AudioTrack::~AudioTrack ()
@@ -191,7 +182,7 @@ AudioTrack::use_diskstream (string name)
}
int
-AudioTrack::use_diskstream (id_t id)
+AudioTrack::use_diskstream (const PBD::ID& id)
{
AudioDiskstream *dstream;
@@ -235,10 +226,7 @@ AudioTrack::set_record_enable (bool yn, void *src)
set_meter_point (_saved_meter_point, this);
}
- if (_session.get_midi_feedback()) {
- _midi_rec_enable_control.send_feedback (record_enabled());
- }
-
+ _rec_enable_control.Changed ();
}
void
@@ -252,7 +240,6 @@ AudioTrack::set_state (const XMLNode& node)
{
const XMLProperty *prop;
XMLNodeConstIterator iter;
- XMLNodeList midi_kids;
if (Route::set_state (node)) {
return -1;
@@ -271,36 +258,6 @@ AudioTrack::set_state (const XMLNode& node)
_mode = Normal;
}
- midi_kids = node.children ("MIDI");
-
- for (iter = midi_kids.begin(); iter != midi_kids.end(); ++iter) {
-
- XMLNodeList kids;
- XMLNodeConstIterator miter;
- XMLNode* child;
-
- kids = (*iter)->children ();
-
- for (miter = kids.begin(); miter != kids.end(); ++miter) {
-
- child =* miter;
-
- if (child->name() == "rec_enable") {
-
- MIDI::eventType ev = MIDI::on; /* initialize to keep gcc happy */
- MIDI::byte additional = 0; /* ditto */
- MIDI::channel_t chn = 0; /* ditto */
-
- if (get_midi_node_info (child, ev, chn, additional)) {
- _midi_rec_enable_control.set_control_type (chn, ev, additional);
- } else {
- error << string_compose(_("MIDI rec_enable control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
- }
- }
- }
- }
-
-
if ((prop = node.property ("diskstream-id")) == 0) {
/* some old sessions use the diskstream name rather than the ID */
@@ -317,7 +274,7 @@ AudioTrack::set_state (const XMLNode& node)
} else {
- id_t id = strtoull (prop->value().c_str(), 0, 10);
+ PBD::ID id (prop->value());
if (use_diskstream (id)) {
return -1;
@@ -366,7 +323,7 @@ AudioTrack::state(bool full_state)
{
XMLNode& root (Route::state(full_state));
XMLNode* freeze_node;
- char buf[32];
+ char buf[64];
if (_freeze_record.playlist) {
XMLNode* inode;
@@ -378,7 +335,7 @@ AudioTrack::state(bool full_state)
for (vector<FreezeRecordInsertInfo*>::iterator i = _freeze_record.insert_info.begin(); i != _freeze_record.insert_info.end(); ++i) {
inode = new XMLNode (X_("insert"));
- snprintf (buf, sizeof (buf), "%" PRIu64, (*i)->id);
+ (*i)->id.print (buf);
inode->add_property (X_("id"), buf);
inode->add_child_copy ((*i)->state);
@@ -402,29 +359,6 @@ AudioTrack::state(bool full_state)
align_node->add_property (X_("style"), buf);
root.add_child_nocopy (*align_node);
- /* MIDI control */
-
- MIDI::channel_t chn;
- MIDI::eventType ev;
- MIDI::byte additional;
- XMLNode* midi_node = 0;
- XMLNode* child;
- XMLNodeList midikids;
-
- midikids = root.children ("MIDI");
- if (!midikids.empty()) {
- midi_node = midikids.front();
- }
- else {
- midi_node = root.add_child ("MIDI");
- }
-
- if (_midi_rec_enable_control.get_control_info (chn, ev, additional) && midi_node) {
-
- child = midi_node->add_child ("rec_enable");
- set_midi_node_info (child, ev, chn, additional);
- }
-
XMLNode* remote_control_node = new XMLNode (X_("remote_control"));
snprintf (buf, sizeof (buf), "%d", _remote_control_id);
remote_control_node->add_property (X_("id"), buf);
@@ -445,7 +379,7 @@ AudioTrack::state(bool full_state)
diskstream.
*/
- snprintf (buf, sizeof (buf), "%" PRIu64, _diskstream->id());
+ _diskstream->id().print (buf);
root.add_property ("diskstream-id", buf);
return root;
@@ -506,7 +440,7 @@ AudioTrack::set_state_part_two ()
FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo (*((*citer)->children().front()));
frii->insert = 0;
- sscanf (prop->value().c_str(), "%" PRIu64, &frii->id);
+ frii->id = prop->value ();
_freeze_record.insert_info.push_back (frii);
}
}
@@ -1054,93 +988,23 @@ AudioTrack::freeze_state() const
return _freeze_record.state;
}
-
-void
-AudioTrack::reset_midi_control (MIDI::Port* port, bool on)
+AudioTrack::RecEnableControllable::RecEnableControllable (AudioTrack& s)
+ : track (s)
{
- MIDI::channel_t chn;
- MIDI::eventType ev;
- MIDI::byte extra;
-
- Route::reset_midi_control (port, on);
-
- _midi_rec_enable_control.get_control_info (chn, ev, extra);
- if (!on) {
- chn = -1;
- }
- _midi_rec_enable_control.midi_rebind (port, chn);
}
void
-AudioTrack::send_all_midi_feedback ()
-{
- if (_session.get_midi_feedback()) {
-
- Route::send_all_midi_feedback();
-
- _midi_rec_enable_control.send_feedback (record_enabled());
- }
-}
-
-
-AudioTrack::MIDIRecEnableControl::MIDIRecEnableControl (AudioTrack& s, MIDI::Port* port)
- : MIDI::Controllable (port, 0), track (s), setting(false)
-{
- last_written = false; /* XXX need a good out of bound value */
-}
-
-void
-AudioTrack::MIDIRecEnableControl::set_value (float val)
+AudioTrack::RecEnableControllable::set_value (float val)
{
bool bval = ((val >= 0.5f) ? true: false);
-
- setting = true;
track.set_record_enable (bval, this);
- setting = false;
-}
-
-void
-AudioTrack::MIDIRecEnableControl::send_feedback (bool value)
-{
-
- if (!setting && get_midi_feedback()) {
- MIDI::byte val = (MIDI::byte) (value ? 127: 0);
- MIDI::channel_t ch = 0;
- MIDI::eventType ev = MIDI::none;
- MIDI::byte additional = 0;
- MIDI::EventTwoBytes data;
-
- if (get_control_info (ch, ev, additional)) {
- data.controller_number = additional;
- data.value = val;
-
- track._session.send_midi_message (get_port(), ev, ch, data);
- }
- }
-
}
-MIDI::byte*
-AudioTrack::MIDIRecEnableControl::write_feedback (MIDI::byte* buf, int32_t& bufsize, bool val, bool force)
+float
+AudioTrack::RecEnableControllable::get_value (void) const
{
- if (get_midi_feedback()) {
-
- MIDI::channel_t ch = 0;
- MIDI::eventType ev = MIDI::none;
- MIDI::byte additional = 0;
-
- if (get_control_info (ch, ev, additional)) {
- if (val != last_written || force) {
- *buf++ = ev & ch;
- *buf++ = additional; /* controller number */
- *buf++ = (MIDI::byte) (val ? 127: 0);
- last_written = val;
- bufsize -= 3;
- }
- }
- }
-
- return buf;
+ if (track.record_enabled()) { return 1.0f; }
+ return 0.0f;
}
void
diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc
index 0663f5f9b1..87700cedb3 100644
--- a/libs/ardour/audiofilesource.cc
+++ b/libs/ardour/audiofilesource.cc
@@ -56,8 +56,7 @@ string AudioFileSource::peak_dir = "";
string AudioFileSource::search_path;
sigc::signal<void> AudioFileSource::HeaderPositionOffsetChanged;
-bool AudioFileSource::header_position_negative;
-uint64_t AudioFileSource::header_position_offset;
+uint64_t AudioFileSource::header_position_offset = 0;
char AudioFileSource::bwf_country_code[3] = "US";
char AudioFileSource::bwf_organization_code[4] = "LAS";
@@ -592,11 +591,10 @@ AudioFileSource::set_search_path (string p)
}
void
-AudioFileSource::set_header_position_offset (jack_nframes_t offset, bool negative)
+AudioFileSource::set_header_position_offset (jack_nframes_t offset)
{
header_position_offset = offset;
- header_position_negative = negative;
-
+ cerr << "hpo set to " << offset << endl;
HeaderPositionOffsetChanged ();
}
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc
index 6b118faa51..4a8593cd63 100644
--- a/libs/ardour/audioregion.cc
+++ b/libs/ardour/audioregion.cc
@@ -267,8 +267,6 @@ AudioRegion::AudioRegion (SourceList& srcs, const XMLNode& node)
_fade_out (0.0, 2.0, 1.0, false),
_envelope (0.0, 2.0, 1.0, false)
{
- /* basic AudioRegion constructor */
-
set<AudioSource*> unique_srcs;
for (SourceList::iterator i=srcs.begin(); i != srcs.end(); ++i) {
@@ -657,7 +655,7 @@ AudioRegion::state (bool full)
for (uint32_t n=0; n < sources.size(); ++n) {
snprintf (buf2, sizeof(buf2), "source-%d", n);
- snprintf (buf, sizeof(buf), "%" PRIu64, sources[n]->id());
+ sources[n]->id().print (buf);
node.add_property (buf2, buf);
}
diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc
index c2fb188953..0370886a35 100644
--- a/libs/ardour/control_protocol_manager.cc
+++ b/libs/ardour/control_protocol_manager.cc
@@ -49,6 +49,10 @@ ControlProtocolManager::set_session (Session& s)
if ((*i)->requested || (*i)->mandatory) {
instantiate (**i);
(*i)->requested = false;
+
+ if ((*i)->state) {
+ (*i)->protocol->set_state (*(*i)->state);
+ }
}
}
}
@@ -181,6 +185,7 @@ ControlProtocolManager::control_protocol_discover (string path)
cpi->protocol = 0;
cpi->requested = false;
cpi->mandatory = descriptor->mandatory;
+ cpi->state = 0;
control_protocol_info.push_back (cpi);
diff --git a/libs/ardour/crossfade.cc b/libs/ardour/crossfade.cc
index 5d36c63f01..bbe0c63b0a 100644
--- a/libs/ardour/crossfade.cc
+++ b/libs/ardour/crossfade.cc
@@ -112,7 +112,6 @@ Crossfade::Crossfade (const Playlist& playlist, XMLNode& node)
{
Region* r;
XMLProperty* prop;
- id_t id;
LocaleGuard lg (X_("POSIX"));
/* we have to find the in/out regions before we can do anything else */
@@ -122,7 +121,7 @@ Crossfade::Crossfade (const Playlist& playlist, XMLNode& node)
throw failed_constructor();
}
- sscanf (prop->value().c_str(), "%" PRIu64, &id);
+ PBD::ID id (prop->value());
if ((r = playlist.find_region (id)) == 0) {
error << string_compose (_("Crossfade: no \"in\" region %1 found in playlist %2"), id, playlist.name())
@@ -139,10 +138,10 @@ Crossfade::Crossfade (const Playlist& playlist, XMLNode& node)
throw failed_constructor();
}
- sscanf (prop->value().c_str(), "%" PRIu64, &id);
+ PBD::ID id2 (prop->value());
- if ((r = playlist.find_region (id)) == 0) {
- error << string_compose (_("Crossfade: no \"out\" region %1 found in playlist %2"), id, playlist.name())
+ if ((r = playlist.find_region (id2)) == 0) {
+ error << string_compose (_("Crossfade: no \"out\" region %1 found in playlist %2"), id2, playlist.name())
<< endmsg;
throw failed_constructor();
}
@@ -680,9 +679,9 @@ Crossfade::get_state ()
char buf[64];
LocaleGuard lg (X_("POSIX"));
- snprintf (buf, sizeof(buf), "%" PRIu64, _out->id());
+ _out->id().print (buf);
node->add_property ("out", buf);
- snprintf (buf, sizeof(buf), "%" PRIu64, _in->id());
+ _in->id().print (buf);
node->add_property ("in", buf);
node->add_property ("active", (_active ? "yes" : "no"));
node->add_property ("follow-overlap", (_follow_overlap ? "yes" : "no"));
diff --git a/libs/ardour/destructive_filesource.cc b/libs/ardour/destructive_filesource.cc
index cce757509a..68eeded9b2 100644
--- a/libs/ardour/destructive_filesource.cc
+++ b/libs/ardour/destructive_filesource.cc
@@ -75,6 +75,9 @@ DestructiveFileSource::DestructiveFileSource (string path, SampleFormat samp_for
_capture_start = false;
_capture_end = false;
file_pos = 0;
+
+ timeline_position = header_position_offset;
+ AudioFileSource::HeaderPositionOffsetChanged.connect (mem_fun (*this, &DestructiveFileSource::handle_header_position_change));
}
DestructiveFileSource::DestructiveFileSource (const XMLNode& node)
@@ -85,6 +88,9 @@ DestructiveFileSource::DestructiveFileSource (const XMLNode& node)
_capture_start = false;
_capture_end = false;
file_pos = 0;
+
+ timeline_position = header_position_offset;
+ AudioFileSource::HeaderPositionOffsetChanged.connect (mem_fun (*this, &DestructiveFileSource::handle_header_position_change));
}
DestructiveFileSource::~DestructiveFileSource()
@@ -124,8 +130,12 @@ DestructiveFileSource::setup_standard_crossfades (jack_nframes_t rate)
void
DestructiveFileSource::mark_capture_start (jack_nframes_t pos)
{
- _capture_start = true;
- capture_start_frame = pos;
+ if (pos < timeline_position) {
+ _capture_start = false;
+ } else {
+ _capture_start = true;
+ capture_start_frame = pos;
+ }
}
void
@@ -265,6 +275,11 @@ DestructiveFileSource::write_unlocked (Sample* data, jack_nframes_t cnt, char *
}
if (_capture_start && _capture_end) {
+
+ /* start and end of capture both occur within the data we are writing,
+ so do both crossfades.
+ */
+
_capture_start = false;
_capture_end = false;
@@ -290,8 +305,12 @@ DestructiveFileSource::write_unlocked (Sample* data, jack_nframes_t cnt, char *
}
file_pos = ofilepos; // adjusted below
- }
- else if (_capture_start) {
+
+ } else if (_capture_start) {
+
+ /* start of capture both occur within the data we are writing,
+ so do the fade in
+ */
_capture_start = false;
_capture_end = false;
@@ -305,6 +324,10 @@ DestructiveFileSource::write_unlocked (Sample* data, jack_nframes_t cnt, char *
} else if (_capture_end) {
+ /* end of capture both occur within the data we are writing,
+ so do the fade out
+ */
+
_capture_start = false;
_capture_end = false;
@@ -314,6 +337,8 @@ DestructiveFileSource::write_unlocked (Sample* data, jack_nframes_t cnt, char *
} else {
+ /* in the middle of recording */
+
if (write_float (data, file_pos, cnt) != cnt) {
return 0;
}
@@ -366,8 +391,19 @@ DestructiveFileSource::get_state ()
}
void
+DestructiveFileSource::handle_header_position_change ()
+{
+ if ( _length != 0 ) {
+ error << string_compose(_("Filesource: start time is already set for existing file (%1): Cannot change start time."), _path ) << endmsg;
+ //in the future, pop up a dialog here that allows user to regenerate file with new start offset
+ } else if (writable()) {
+ timeline_position = header_position_offset;
+ set_header_timeline_position (); //this will get flushed if/when the file is recorded to
+ }
+}
+
+void
DestructiveFileSource::set_timeline_position (jack_nframes_t pos)
{
- /* destructive tracks always start at where our reference frame zero is */
- timeline_position = 0;
+ //destructive track timeline postion does not change except at instantion or when header_position_offset (session start) changes
}
diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc
index 050f23497b..8b7edae6b4 100644
--- a/libs/ardour/diskstream.cc
+++ b/libs/ardour/diskstream.cc
@@ -63,48 +63,24 @@ sigc::signal<void> Diskstream::DiskOverrun;
sigc::signal<void> Diskstream::DiskUnderrun;
Diskstream::Diskstream (Session &sess, const string &name, Flag flag)
- : _name (name)
+ : deprecated_io_node(NULL)
+ , _name (name)
, _session (sess)
{
-#if 0
- /* prevent any write sources from being created */
-
- in_set_state = true;
-
init (flag);
- //use_new_playlist ();
-
- in_set_state = false;
- DiskstreamCreated (this); /* EMIT SIGNAL */
-#endif
}
Diskstream::Diskstream (Session& sess, const XMLNode& node)
- : _session (sess)
+ : deprecated_io_node(NULL)
+ , _session (sess)
{
-#if 0
- in_set_state = true;
init (Recordable);
-
- /*if (set_state (node)) {
- in_set_state = false;
- throw failed_constructor();
- }*/
-
- in_set_state = false;
-
- //if (destructive()) {
- // use_destructive_playlist ();
- //}
- DiskstreamCreated (this); /* EMIT SIGNAL */
-#endif
}
void
Diskstream::init (Flag f)
{
- _id = new_id();
_refcnt = 0;
_flags = f;
_io = 0;
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index f3e6e1b947..951d155d9e 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -32,6 +32,7 @@
#include <lrdf.h>
#include <pbd/error.h>
+#include <pbd/id.h>
#include <pbd/strsplit.h>
#include <midi++/port.h>
@@ -198,6 +199,8 @@ ARDOUR::init (AudioEngine& engine, bool use_vst, bool try_optimization)
(void) bindtextdomain(PACKAGE, LOCALEDIR);
+ PBD::ID::init ();
+
Config = new Configuration;
if (Config->load_state ()) {
@@ -295,7 +298,7 @@ ARDOUR::init (AudioEngine& engine, bool use_vst, bool try_optimization)
info << "No H/W specific optimizations in use" << endmsg;
}
-
+
lrdf_init();
Library = new AudioLibrary;
@@ -325,10 +328,15 @@ ARDOUR::cleanup ()
return 0;
}
-ARDOUR::id_t
-ARDOUR::new_id ()
+
+microseconds_t
+ARDOUR::get_microseconds ()
{
- return get_uid();
+ /* XXX need JACK to export its functionality */
+
+ struct timeval now;
+ gettimeofday (&now, 0);
+ return now.tv_sec * 1000000ULL + now.tv_usec;
}
ARDOUR::Change
diff --git a/libs/ardour/insert.cc b/libs/ardour/insert.cc
index fc05355d4a..a2b03ad38d 100644
--- a/libs/ardour/insert.cc
+++ b/libs/ardour/insert.cc
@@ -599,7 +599,7 @@ PluginInsert::state (bool full)
node->add_property("id", string(buf));
if (_plugins[0]->state_node_name() == "ladspa") {
char buf[32];
- snprintf (buf, 31, "%ld", _plugins[0]->get_info().unique_id);
+ snprintf (buf, sizeof (buf), "%ld", _plugins[0]->get_info().unique_id);
node->add_property("unique-id", string(buf));
}
node->add_property("count", string_compose("%1", _plugins.size()));
@@ -780,18 +780,6 @@ PluginInsert::describe_parameter (uint32_t what)
return _plugins[0]->describe_parameter (what);
}
-void
-PluginInsert::reset_midi_control (MIDI::Port* port, bool on)
-{
- _plugins[0]->reset_midi_control (port, on);
-}
-
-void
-PluginInsert::send_all_midi_feedback ()
-{
- _plugins[0]->send_all_midi_feedback();
-}
-
jack_nframes_t
PluginInsert::latency()
{
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index 8225396486..1c8de5008a 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -74,17 +74,17 @@ sigc::signal<int> IO::PortsCreated;
Glib::StaticMutex IO::m_meter_signal_lock = GLIBMM_STATIC_MUTEX_INIT;
-/* this is a default mapper of MIDI control values to a gain coefficient.
- others can be imagined. see IO::set_midi_to_gain_function().
+/* this is a default mapper of [0 .. 1.0] control values to a gain coefficient.
+ others can be imagined.
*/
-static gain_t direct_midi_to_gain (double fract) {
+static gain_t direct_control_to_gain (double fract) {
/* XXX Marcus writes: this doesn't seem right to me. but i don't have a better answer ... */
/* this maxes at +6dB */
return pow (2.0,(sqrt(sqrt(sqrt(fract)))*198.0-192.0)/6.0);
}
-static double direct_gain_to_midi (gain_t gain) {
+static double direct_gain_to_control (gain_t gain) {
/* XXX Marcus writes: this doesn't seem right to me. but i don't have a better answer ... */
if (gain == 0) return 0.0;
@@ -97,11 +97,8 @@ static bool sort_ports_by_name (Port* a, Port* b)
}
-/** The 'default_type' argument here isn't very good, but port creation is too
- * brufty and all over the place to make anything else feasible without massive
- * changes. The default typed passed is the type of port that will be created
- * by ensure_io and friends. This is a temporary compatibility hack to get
- * multiple data types off the gound and should be removed.
+/** @param default_type The type of port that will be created by ensure_io
+ * and friends if no type is explicitly requested (to avoid breakage).
*/
IO::IO (Session& s, string name,
int input_min, int input_max, int output_min, int output_max,
@@ -109,14 +106,13 @@ IO::IO (Session& s, string name,
: _session (s),
_name (name),
_default_type(default_type),
- _midi_gain_control (*this, _session.midi_port()),
+ _gain_control (*this),
_gain_automation_curve (0.0, 2.0, 1.0),
_input_minimum (input_min),
_input_maximum (input_max),
_output_minimum (output_min),
_output_maximum (output_max)
{
- _id = new_id();
_panner = new Panner (name, _session);
_gain = 1.0;
_desired_gain = 1.0;
@@ -128,9 +124,6 @@ IO::IO (Session& s, string name,
no_panner_reset = false;
deferred_state = 0;
- _midi_gain_control.midi_to_gain = direct_midi_to_gain;
- _midi_gain_control.gain_to_midi = direct_gain_to_midi;
-
apply_gain_automation = false;
last_automation_snapshot = 0;
@@ -1429,7 +1422,7 @@ XMLNode&
IO::state (bool full_state)
{
XMLNode* node = new XMLNode (state_node_name);
- char buf[32];
+ char buf[64];
string str;
bool need_ins = true;
bool need_outs = true;
@@ -1437,7 +1430,7 @@ IO::state (bool full_state)
Glib::Mutex::Lock lm (io_lock);
node->add_property("name", _name);
- snprintf (buf, sizeof(buf), "%" PRIu64, id());
+ id().print (buf);
node->add_property("id", buf);
str = "";
@@ -1531,22 +1524,6 @@ IO::state (bool full_state)
node->add_property ("iolimits", buf);
- /* MIDI control */
-
- MIDI::channel_t chn;
- MIDI::eventType ev;
- MIDI::byte additional;
- XMLNode* midi_node = 0;
- XMLNode* child;
-
- if (_midi_gain_control.get_control_info (chn, ev, additional)) {
-
- midi_node = node->add_child ("MIDI");
-
- child = midi_node->add_child ("gain");
- set_midi_node_info (child, ev, chn, additional);
- }
-
/* automation */
if (full_state) {
@@ -1615,7 +1592,6 @@ IO::set_state (const XMLNode& node)
{
const XMLProperty* prop;
XMLNodeConstIterator iter;
- XMLNodeList midi_kids;
LocaleGuard lg (X_("POSIX"));
/* force use of non-localized representation of decimal point,
@@ -1633,7 +1609,7 @@ IO::set_state (const XMLNode& node)
}
if ((prop = node.property ("id")) != 0) {
- sscanf (prop->value().c_str(), "%" PRIu64, &_id);
+ _id = prop->value ();
}
if ((prop = node.property ("iolimits")) != 0) {
@@ -1655,35 +1631,6 @@ IO::set_state (const XMLNode& node)
}
}
- midi_kids = node.children ("MIDI");
-
- for (iter = midi_kids.begin(); iter != midi_kids.end(); ++iter) {
-
- XMLNodeList kids;
- XMLNodeConstIterator miter;
- XMLNode* child;
-
- kids = (*iter)->children ();
-
- for (miter = kids.begin(); miter != kids.end(); ++miter) {
-
- child =* miter;
-
- if (child->name() == "gain") {
-
- MIDI::eventType ev = MIDI::on; /* initialize to keep gcc happy */
- MIDI::byte additional = 0; /* ditto */
- MIDI::channel_t chn = 0; /* ditto */
-
- if (get_midi_node_info (child, ev, chn, additional)) {
- _midi_gain_control.set_control_type (chn, ev, additional);
- } else {
- error << string_compose(_("MIDI gain control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
- }
- }
- }
- }
-
if ((prop = node.property ("automation-state")) != 0) {
long int x;
@@ -1801,50 +1748,6 @@ IO::create_ports (const XMLNode& node)
return 0;
}
-bool
-IO::get_midi_node_info (XMLNode * node, MIDI::eventType & ev, MIDI::channel_t & chan, MIDI::byte & additional)
-{
- bool ok = true;
- const XMLProperty* prop;
- int xx;
-
- if ((prop = node->property ("event")) != 0) {
- sscanf (prop->value().c_str(), "0x%x", &xx);
- ev = (MIDI::eventType) xx;
- } else {
- ok = false;
- }
-
- if (ok && ((prop = node->property ("channel")) != 0)) {
- sscanf (prop->value().c_str(), "%d", &xx);
- chan = (MIDI::channel_t) xx;
- } else {
- ok = false;
- }
-
- if (ok && ((prop = node->property ("additional")) != 0)) {
- sscanf (prop->value().c_str(), "0x%x", &xx);
- additional = (MIDI::byte) xx;
- }
-
- return ok;
-}
-
-bool
-IO::set_midi_node_info (XMLNode * node, MIDI::eventType ev, MIDI::channel_t chan, MIDI::byte additional)
-{
- char buf[32];
-
- snprintf (buf, sizeof(buf), "0x%x", ev);
- node->add_property ("event", buf);
- snprintf (buf, sizeof(buf), "%d", chan);
- node->add_property ("channel", buf);
- snprintf (buf, sizeof(buf), "0x%x", additional);
- node->add_property ("additional", buf);
-
- return true;
-}
-
int
IO::make_connections (const XMLNode& node)
@@ -2371,69 +2274,16 @@ IO::output_connection_configuration_changed ()
use_output_connection (*_output_connection, this);
}
-IO::MIDIGainControl::MIDIGainControl (IO& i, MIDI::Port* port)
- : MIDI::Controllable (port, 0), io (i), setting(false)
-{
- midi_to_gain = 0;
- gain_to_midi = 0;
- setting = false;
- last_written = 0; /* XXX need a good out-of-bound-value */
-}
-
void
-IO::MIDIGainControl::set_value (float val)
+IO::GainControllable::set_value (float val)
{
- if (midi_to_gain == 0) return;
-
- setting = true;
- io.set_gain (midi_to_gain (val), this);
- setting = false;
-}
-
-void
-IO::MIDIGainControl::send_feedback (gain_t gain)
-{
- if (!setting && get_midi_feedback() && gain_to_midi) {
- MIDI::byte val = (MIDI::byte) (gain_to_midi (gain) * 127.0);
- MIDI::channel_t ch = 0;
- MIDI::eventType ev = MIDI::none;
- MIDI::byte additional = 0;
- MIDI::EventTwoBytes data;
-
- if (get_control_info (ch, ev, additional)) {
- data.controller_number = additional;
- data.value = val;
- last_written = val;
-
- io._session.send_midi_message (get_port(), ev, ch, data);
- }
- //send_midi_feedback (gain_to_midi (gain));
- }
+ io.set_gain (direct_control_to_gain (val), this);
}
-MIDI::byte*
-IO::MIDIGainControl::write_feedback (MIDI::byte* buf, int32_t& bufsize, gain_t val, bool force)
+float
+IO::GainControllable::get_value (void) const
{
- if (get_midi_feedback() && gain_to_midi && bufsize > 2) {
- MIDI::channel_t ch = 0;
- MIDI::eventType ev = MIDI::none;
- MIDI::byte additional = 0;
- MIDI::byte gm;
-
- if (get_control_info (ch, ev, additional)) {
- gm = (MIDI::byte) (gain_to_midi (val) * 127.0);
-
- if (gm != last_written) {
- *buf++ = (0xF0 & ev) | (0xF & ch);
- *buf++ = additional; /* controller number */
- *buf++ = gm;
- last_written = gm;
- bufsize -= 3;
- }
- }
- }
-
- return buf;
+ return direct_gain_to_control (io.effective_gain());
}
void
@@ -2525,23 +2375,6 @@ IO::meter ()
}
}
-void
-IO::reset_midi_control (MIDI::Port* port, bool on)
-{
- MIDI::channel_t chn;
- MIDI::eventType ev;
- MIDI::byte extra;
-
- _midi_gain_control.get_control_info (chn, ev, extra);
- if (!on) {
- chn = -1;
- }
- _midi_gain_control.midi_rebind (port, chn);
-
- _panner->reset_midi_control (port, on);
-}
-
-
int
IO::save_automation (const string& path)
{
@@ -2731,10 +2564,7 @@ IO::set_gain (gain_t val, void *src)
}
gain_changed (src);
-
- if (_session.get_midi_feedback()) {
- _midi_gain_control.send_feedback (_desired_gain);
- }
+ _gain_control.Changed (); /* EMIT SIGNAL */
if (_session.transport_stopped() && src != 0 && src != this && gain_automation_recording()) {
_gain_automation_curve.add (_session.transport_frame(), val);
@@ -2745,30 +2575,6 @@ IO::set_gain (gain_t val, void *src)
}
void
-IO::send_all_midi_feedback ()
-{
- if (_session.get_midi_feedback()) {
- _midi_gain_control.send_feedback (_effective_gain);
-
- // panners
- _panner->send_all_midi_feedback();
- }
-}
-
-MIDI::byte*
-IO::write_midi_feedback (MIDI::byte* buf, int32_t& bufsize)
-{
- if (_session.get_midi_feedback()) {
- if (gain_automation_playback ()) {
- buf = _midi_gain_control.write_feedback (buf, bufsize, _effective_gain);
- }
- buf = _panner->write_midi_feedback (buf, bufsize);
- }
-
- return buf;
-}
-
-void
IO::start_gain_touch ()
{
_gain_automation_curve.start_touch ();
diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc
index 11001655d2..fa19a682e7 100644
--- a/libs/ardour/ladspa_plugin.cc
+++ b/libs/ardour/ladspa_plugin.cc
@@ -133,20 +133,9 @@ LadspaPlugin::init (void *mod, uint32_t index, jack_nframes_t rate)
}
}
- Plugin::setup_midi_controls ();
+ Plugin::setup_controls ();
latency_compute_run ();
-
- MIDI::Controllable *mcontrol;
-
- for (uint32_t i = 0; i < parameter_count(); ++i) {
- if (LADSPA_IS_PORT_INPUT(port_descriptor (i)) &&
- LADSPA_IS_PORT_CONTROL(port_descriptor (i))) {
- if ((mcontrol = get_nth_midi_control (i)) != 0) {
- mcontrol->midi_rebind (_session.midi_port(), 0);
- }
- }
- }
}
LadspaPlugin::~LadspaPlugin ()
@@ -318,17 +307,14 @@ LadspaPlugin::set_parameter (uint32_t which, float val)
shadow_data[which] = (LADSPA_Data) val;
ParameterChanged (which, val); /* EMIT SIGNAL */
- if (session().get_midi_feedback()) {
-
- if (which < parameter_count() && midi_controls[which]) {
- midi_controls[which]->send_feedback (val);
- }
+ if (which < parameter_count() && controls[which]) {
+ controls[which]->Changed ();
}
-
+
} else {
warning << string_compose (_("illegal parameter number used with plugin \"%1\". This may"
- "indicate a change in the plugin design, and presets may be"
- "invalid"), name())
+ "indicate a change in the plugin design, and presets may be"
+ "invalid"), name())
<< endmsg;
}
}
@@ -380,28 +366,6 @@ LadspaPlugin::get_state()
snprintf(buf, sizeof(buf), "%+f", shadow_data[i]);
child->add_property("value", string(buf));
root->add_child_nocopy (*child);
-
- MIDI::Controllable *pcontrol = get_nth_midi_control (i);
-
- if (pcontrol) {
-
- MIDI::eventType ev;
- MIDI::byte additional;
- MIDI::channel_t chn;
- XMLNode* midi_node;
-
- if (pcontrol->get_control_info (chn, ev, additional)) {
-
- midi_node = child->add_child ("midi-control");
-
- snprintf (buf, sizeof(buf), "0x%x", ev);
- midi_node->add_property ("event", buf);
- snprintf (buf, sizeof(buf), "%d", chn);
- midi_node->add_property ("channel", buf);
- snprintf (buf, sizeof(buf), "0x%x", additional);
- midi_node->add_property ("additional", buf);
- }
- }
}
}
@@ -452,52 +416,6 @@ LadspaPlugin::set_state(const XMLNode& node)
sscanf (port, "%" PRIu32, &port_id);
set_parameter (port_id, atof(data));
-
- XMLNodeList midi_kids;
- XMLNodeConstIterator iter;
-
- midi_kids = child->children ("midi-control");
-
- for (iter = midi_kids.begin(); iter != midi_kids.end(); ++iter) {
-
- child = *iter;
-
- MIDI::eventType ev = MIDI::on; /* initialize to keep gcc happy */
- MIDI::byte additional = 0; /* initialize to keep gcc happy */
- MIDI::channel_t chn = 0; /* initialize to keep gcc happy */
- bool ok = true;
- int xx;
-
- if ((prop = child->property ("event")) != 0) {
- sscanf (prop->value().c_str(), "0x%x", &xx);
- ev = (MIDI::eventType) xx;
- } else {
- ok = false;
- }
-
- if (ok && ((prop = child->property ("channel")) != 0)) {
- sscanf (prop->value().c_str(), "%d", &xx);
- chn = (MIDI::channel_t) xx;
- } else {
- ok = false;
- }
-
- if (ok && ((prop = child->property ("additional")) != 0)) {
- sscanf (prop->value().c_str(), "0x%x", &xx);
- additional = (MIDI::byte) xx;
- }
-
- if (ok) {
- MIDI::Controllable* pcontrol = get_nth_midi_control (port_id);
-
- if (pcontrol) {
- pcontrol->set_control_type (chn, ev, additional);
- }
-
- } else {
- error << string_compose(_("LADSPA LadspaPlugin MIDI control specification for port %1 is incomplete, so it has been ignored"), port) << endl;
- }
- }
}
latency_compute_run ();
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc
index b2af52284e..5b5f733138 100644
--- a/libs/ardour/location.cc
+++ b/libs/ardour/location.cc
@@ -30,6 +30,7 @@
#include <pbd/xml++.h>
#include <ardour/location.h>
+#include <ardour/audiofilesource.h>
#include "i18n.h"
@@ -44,6 +45,10 @@ Location::Location (const Location& other)
_end (other._end),
_flags (other._flags)
{
+ /* start and end flags can never be copied, because there can only ever be one of each */
+
+ _flags = Flags (_flags & ~IsStart);
+ _flags = Flags (_flags & ~IsEnd);
}
Location*
@@ -71,6 +76,9 @@ Location::set_start (jack_nframes_t s)
_start = s;
_end = s;
start_changed(this); /* EMIT SIGNAL */
+ if ( is_start() ) {
+ AudioFileSource::set_header_position_offset ( s );
+ }
}
return 0;
}
diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc
index fdf9092308..05584d0b5e 100644
--- a/libs/ardour/midi_diskstream.cc
+++ b/libs/ardour/midi_diskstream.cc
@@ -65,7 +65,7 @@ MidiDiskstream::MidiDiskstream (Session &sess, const string &name, Diskstream::F
in_set_state = true;
- init (flag);
+ init(flag);
use_new_playlist ();
in_set_state = false;
@@ -432,7 +432,7 @@ MidiDiskstream::get_state ()
node->add_property ("speed", buf);
node->add_property("name", _name);
- snprintf (buf, sizeof(buf), "%" PRIu64, id());
+ id().print(buf);
node->add_property("id", buf);
if (!_capturing_sources.empty() && _session.get_record_enabled()) {
@@ -499,11 +499,11 @@ MidiDiskstream::set_state (const XMLNode& node)
if (deprecated_io_node) {
if ((prop = deprecated_io_node->property ("id")) != 0) {
- sscanf (prop->value().c_str(), "%" PRIu64, &_id);
+ _id = prop->value ();
}
} else {
if ((prop = node.property ("id")) != 0) {
- sscanf (prop->value().c_str(), "%" PRIu64, &_id);
+ _id = prop->value ();
}
}
diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc
index 4a9febcdca..af086d7c61 100644
--- a/libs/ardour/midi_track.cc
+++ b/libs/ardour/midi_track.cc
@@ -37,11 +37,12 @@
using namespace std;
using namespace ARDOUR;
+using namespace PBD;
MidiTrack::MidiTrack (Session& sess, string name, Route::Flag flag, TrackMode mode)
: Route (sess, name, 1, -1, -1, -1, flag, Buffer::MIDI),
- diskstream (0),
- _midi_rec_enable_control (*this, _session.midi_port())
+ _diskstream (0),
+ _rec_enable_control (*this)
{
MidiDiskstream::Flag dflags = MidiDiskstream::Flag (0);
@@ -63,32 +64,23 @@ MidiTrack::MidiTrack (Session& sess, string name, Route::Flag flag, TrackMode mo
_mode = mode;
set_diskstream (*ds, this);
-
- // session.SMPTEOffsetChanged.connect (mem_fun (*this, &MidiTrack::handle_smpte_offset_change));
-
- // we do this even though Route already did it in it's init
- reset_midi_control (_session.midi_port(), _session.get_midi_control());
-
}
MidiTrack::MidiTrack (Session& sess, const XMLNode& node)
: Route (sess, "to be renamed", 0, 0, -1, -1),
- diskstream (0),
- _midi_rec_enable_control (*this, _session.midi_port())
+ _diskstream (0),
+ _rec_enable_control (*this)
{
_freeze_record.state = NoFreeze;
set_state (node);
_declickable = true;
_saved_meter_point = _meter_point;
-
- // we do this even though Route already did it in it's init
- reset_midi_control (_session.midi_port(), _session.get_midi_control());
}
MidiTrack::~MidiTrack ()
{
- if (diskstream) {
- diskstream->unref();
+ if (_diskstream) {
+ _diskstream->unref();
}
}
@@ -103,16 +95,16 @@ MidiTrack::handle_smpte_offset_change ()
int
MidiTrack::deprecated_use_diskstream_connections ()
{
- if (diskstream->deprecated_io_node == 0) {
+ if (_diskstream->deprecated_io_node == 0) {
return 0;
}
const XMLProperty* prop;
- XMLNode& node (*diskstream->deprecated_io_node);
+ XMLNode& node (*_diskstream->deprecated_io_node);
/* don't do this more than once. */
- diskstream->deprecated_io_node = 0;
+ _diskstream->deprecated_io_node = 0;
set_input_minimum (-1);
set_input_maximum (-1);
@@ -155,15 +147,15 @@ MidiTrack::deprecated_use_diskstream_connections ()
int
MidiTrack::set_diskstream (MidiDiskstream& ds, void *src)
{
- if (diskstream) {
- diskstream->unref();
+ if (_diskstream) {
+ _diskstream->unref();
}
- diskstream = &ds.ref();
- diskstream->set_io (*this);
- diskstream->set_destructive (_mode == Destructive);
+ _diskstream = &ds.ref();
+ _diskstream->set_io (*this);
+ _diskstream->set_destructive (_mode == Destructive);
- if (diskstream->deprecated_io_node) {
+ if (_diskstream->deprecated_io_node) {
if (!connecting_legal) {
ConnectingLegal.connect (mem_fun (*this, &MidiTrack::deprecated_use_diskstream_connections));
@@ -172,11 +164,11 @@ MidiTrack::set_diskstream (MidiDiskstream& ds, void *src)
}
}
- diskstream->set_record_enabled (false, this);
- //diskstream->monitor_input (false);
+ _diskstream->set_record_enabled (false, this);
+ //_diskstream->monitor_input (false);
ic_connection.disconnect();
- ic_connection = input_changed.connect (mem_fun (*diskstream, &MidiDiskstream::handle_input_change));
+ ic_connection = input_changed.connect (mem_fun (*_diskstream, &MidiDiskstream::handle_input_change));
diskstream_changed (src); /* EMIT SIGNAL */
@@ -189,34 +181,30 @@ MidiTrack::use_diskstream (string name)
MidiDiskstream *dstream;
if ((dstream = dynamic_cast<MidiDiskstream*>(_session.diskstream_by_name (name))) == 0) {
- PBD::error << string_compose(_("MidiTrack: diskstream \"%1\" not known by session"), name) << endmsg;
+ error << string_compose(_("MidiTrack: midi diskstream \"%1\" not known by session"), name) << endmsg;
return -1;
}
-
- return set_diskstream (*dstream, this);
- return 0;
+ return set_diskstream (*dstream, this);
}
int
-MidiTrack::use_diskstream (id_t id)
+MidiTrack::use_diskstream (const PBD::ID& id)
{
MidiDiskstream *dstream;
if ((dstream = dynamic_cast<MidiDiskstream*>(_session.diskstream_by_id (id))) == 0) {
- PBD::error << string_compose(_("MidiTrack: diskstream \"%1\" not known by session"), id) << endmsg;
+ error << string_compose(_("MidiTrack: midi diskstream \"%1\" not known by session"), id) << endmsg;
return -1;
}
return set_diskstream (*dstream, this);
-
- return 0;
}
bool
MidiTrack::record_enabled () const
{
- return diskstream->record_enabled ();
+ return _diskstream->record_enabled ();
}
void
@@ -262,7 +250,6 @@ MidiTrack::set_state (const XMLNode& node)
{
const XMLProperty *prop;
XMLNodeConstIterator iter;
- XMLNodeList midi_kids;
if (Route::set_state (node)) {
return -1;
@@ -274,49 +261,19 @@ MidiTrack::set_state (const XMLNode& node)
} else if (prop->value() == X_("destructive")) {
_mode = Destructive;
} else {
- PBD::warning << string_compose ("unknown midi track mode \"%1\" seen and ignored", prop->value()) << endmsg;
+ warning << string_compose ("unknown midi track mode \"%1\" seen and ignored", prop->value()) << endmsg;
_mode = Normal;
}
} else {
_mode = Normal;
}
- midi_kids = node.children ("MIDI");
-
- for (iter = midi_kids.begin(); iter != midi_kids.end(); ++iter) {
-
- XMLNodeList kids;
- XMLNodeConstIterator miter;
- XMLNode* child;
-
- kids = (*iter)->children ();
-
- for (miter = kids.begin(); miter != kids.end(); ++miter) {
-
- child =* miter;
-
- if (child->name() == "rec_enable") {
-
- MIDI::eventType ev = MIDI::on; /* initialize to keep gcc happy */
- MIDI::byte additional = 0; /* ditto */
- MIDI::channel_t chn = 0; /* ditto */
-
- if (get_midi_node_info (child, ev, chn, additional)) {
- _midi_rec_enable_control.set_control_type (chn, ev, additional);
- } else {
- PBD::error << string_compose(_("MIDI rec_enable control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
- }
- }
- }
- }
-
-
if ((prop = node.property ("diskstream-id")) == 0) {
/* some old sessions use the diskstream name rather than the ID */
if ((prop = node.property ("diskstream")) == 0) {
- PBD::fatal << _("programming error: MidiTrack given state without diskstream!") << endmsg;
+ fatal << _("programming error: MidiTrack given state without diskstream!") << endmsg;
/*NOTREACHED*/
return -1;
}
@@ -327,7 +284,7 @@ MidiTrack::set_state (const XMLNode& node)
} else {
- id_t id = strtoull (prop->value().c_str(), 0, 10);
+ PBD::ID id (prop->value());
if (use_diskstream (id)) {
return -1;
@@ -376,7 +333,7 @@ MidiTrack::state(bool full_state)
{
XMLNode& root (Route::state(full_state));
XMLNode* freeze_node;
- char buf[32];
+ char buf[64];
if (_freeze_record.playlist) {
XMLNode* inode;
@@ -388,7 +345,7 @@ MidiTrack::state(bool full_state)
for (vector<FreezeRecordInsertInfo*>::iterator i = _freeze_record.insert_info.begin(); i != _freeze_record.insert_info.end(); ++i) {
inode = new XMLNode (X_("insert"));
- snprintf (buf, sizeof (buf), "%" PRIu64, (*i)->id);
+ (*i)->id.print (buf);
inode->add_property (X_("id"), buf);
inode->add_child_copy ((*i)->state);
@@ -401,7 +358,7 @@ MidiTrack::state(bool full_state)
/* Alignment: act as a proxy for the diskstream */
XMLNode* align_node = new XMLNode (X_("alignment"));
- switch (diskstream->alignment_style()) {
+ switch (_diskstream->alignment_style()) {
case ExistingMaterial:
snprintf (buf, sizeof (buf), X_("existing"));
break;
@@ -412,29 +369,6 @@ MidiTrack::state(bool full_state)
align_node->add_property (X_("style"), buf);
root.add_child_nocopy (*align_node);
- /* MIDI control */
-
- MIDI::channel_t chn;
- MIDI::eventType ev;
- MIDI::byte additional;
- XMLNode* midi_node = 0;
- XMLNode* child;
- XMLNodeList midikids;
-
- midikids = root.children ("MIDI");
- if (!midikids.empty()) {
- midi_node = midikids.front();
- }
- else {
- midi_node = root.add_child ("MIDI");
- }
-
- if (_midi_rec_enable_control.get_control_info (chn, ev, additional) && midi_node) {
-
- child = midi_node->add_child ("rec_enable");
- set_midi_node_info (child, ev, chn, additional);
- }
-
XMLNode* remote_control_node = new XMLNode (X_("remote_control"));
snprintf (buf, sizeof (buf), "%d", _remote_control_id);
remote_control_node->add_property (X_("id"), buf);
@@ -455,7 +389,7 @@ MidiTrack::state(bool full_state)
diskstream.
*/
- snprintf (buf, sizeof (buf), "%" PRIu64, diskstream->id());
+ _diskstream->id().print (buf);
root.add_property ("diskstream-id", buf);
return root;
@@ -516,7 +450,7 @@ MidiTrack::set_state_part_two ()
FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo (*((*citer)->children().front()));
frii->insert = 0;
- sscanf (prop->value().c_str(), "%" PRIu64, &frii->id);
+ frii->id = prop->value ();
_freeze_record.insert_info.push_back (frii);
}
}
@@ -527,9 +461,9 @@ MidiTrack::set_state_part_two ()
if ((prop = fnode->property (X_("style"))) != 0) {
if (prop->value() == "existing") {
- diskstream->set_persistent_align_style (ExistingMaterial);
+ _diskstream->set_persistent_align_style (ExistingMaterial);
} else if (prop->value() == "capture") {
- diskstream->set_persistent_align_style (CaptureTime);
+ _diskstream->set_persistent_align_style (CaptureTime);
}
}
}
@@ -539,7 +473,7 @@ MidiTrack::set_state_part_two ()
uint32_t
MidiTrack::n_process_buffers ()
{
- return max ((uint32_t) diskstream->n_channels(), redirect_max_outs);
+ return max ((uint32_t) _diskstream->n_channels(), redirect_max_outs);
}
void
@@ -570,7 +504,7 @@ MidiTrack::no_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nfr
return 0;
}
- diskstream->check_record_status (start_frame, nframes, can_record);
+ _diskstream->check_record_status (start_frame, nframes, can_record);
bool send_silence;
@@ -589,7 +523,7 @@ MidiTrack::no_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nfr
send_silence = true;
}
} else {
- if (diskstream->record_enabled()) {
+ if (_diskstream->record_enabled()) {
if (Config->get_use_sw_monitoring()) {
send_silence = false;
} else {
@@ -759,7 +693,7 @@ MidiTrack::silent_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack
silence (nframes, offset);
- return diskstream->process (_session.transport_frame() + offset, nframes, offset, can_record, rec_monitors_input);
+ return _diskstream->process (_session.transport_frame() + offset, nframes, offset, can_record, rec_monitors_input);
}
void
@@ -780,7 +714,7 @@ MidiTrack::set_name (string str, void *src)
return -1;
}
- if (diskstream->set_name (str, src)) {
+ if (_diskstream->set_name (str, src)) {
return -1;
}
@@ -893,7 +827,7 @@ void
MidiTrack::set_latency_delay (jack_nframes_t longest_session_latency)
{
Route::set_latency_delay (longest_session_latency);
- diskstream->set_roll_delay (_roll_delay);
+ _diskstream->set_roll_delay (_roll_delay);
}
jack_nframes_t
@@ -1064,101 +998,32 @@ MidiTrack::freeze_state() const
}
-void
-MidiTrack::reset_midi_control (MIDI::Port* port, bool on)
-{
- MIDI::channel_t chn;
- MIDI::eventType ev;
- MIDI::byte extra;
-
- Route::reset_midi_control (port, on);
-
- _midi_rec_enable_control.get_control_info (chn, ev, extra);
- if (!on) {
- chn = -1;
- }
- _midi_rec_enable_control.midi_rebind (port, chn);
-}
-
-void
-MidiTrack::send_all_midi_feedback ()
-{
- if (_session.get_midi_feedback()) {
-
- Route::send_all_midi_feedback();
-
- _midi_rec_enable_control.send_feedback (record_enabled());
- }
-}
-
-
-MidiTrack::MIDIRecEnableControl::MIDIRecEnableControl (MidiTrack& s, MIDI::Port* port)
- : MIDI::Controllable (port, 0), track (s), setting(false)
+MidiTrack::MIDIRecEnableControllable::MIDIRecEnableControllable (MidiTrack& s)
+ : track(s)
{
- last_written = false; /* XXX need a good out of bound value */
}
void
-MidiTrack::MIDIRecEnableControl::set_value (float val)
+MidiTrack::MIDIRecEnableControllable::set_value (float val)
{
bool bval = ((val >= 0.5f) ? true: false);
-
- setting = true;
track.set_record_enable (bval, this);
- setting = false;
-}
-
-void
-MidiTrack::MIDIRecEnableControl::send_feedback (bool value)
-{
-
- if (!setting && get_midi_feedback()) {
- MIDI::byte val = (MIDI::byte) (value ? 127: 0);
- MIDI::channel_t ch = 0;
- MIDI::eventType ev = MIDI::none;
- MIDI::byte additional = 0;
- MIDI::EventTwoBytes data;
-
- if (get_control_info (ch, ev, additional)) {
- data.controller_number = additional;
- data.value = val;
-
- track._session.send_midi_message (get_port(), ev, ch, data);
- }
- }
-
}
-MIDI::byte*
-MidiTrack::MIDIRecEnableControl::write_feedback (MIDI::byte* buf, int32_t& bufsize, bool val, bool force)
+float
+MidiTrack::MIDIRecEnableControllable::get_value (void) const
{
- if (get_midi_feedback()) {
-
- MIDI::channel_t ch = 0;
- MIDI::eventType ev = MIDI::none;
- MIDI::byte additional = 0;
-
- if (get_control_info (ch, ev, additional)) {
- if (val != last_written || force) {
- *buf++ = ev & ch;
- *buf++ = additional; /* controller number */
- *buf++ = (MIDI::byte) (val ? 127: 0);
- last_written = val;
- bufsize -= 3;
- }
- }
- }
-
- return buf;
+ if (track.record_enabled()) { return 1.0f; }
+ return 0.0f;
}
void
MidiTrack::set_mode (TrackMode m)
{
- if (diskstream) {
+ if (_diskstream) {
if (_mode != m) {
_mode = m;
- diskstream->set_destructive (m == Destructive);
+ _diskstream->set_destructive (m == Destructive);
ModeChanged();
}
}
diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc
index 83c9e6eb4d..a56424cfea 100644
--- a/libs/ardour/panner.cc
+++ b/libs/ardour/panner.cc
@@ -53,21 +53,21 @@ float Panner::current_automation_version_number = 1.0;
string EqualPowerStereoPanner::name = "Equal Power Stereo";
string Multi2dPanner::name = "Multiple (2D)";
-/* this is a default mapper of MIDI control values to a pan position
- others can be imagined. see Panner::set_midi_to_pan_function().
+/* this is a default mapper of control values to a pan position
+ others can be imagined.
*/
-static pan_t direct_midi_to_pan (double fract) {
+static pan_t direct_control_to_pan (double fract) {
return fract;
}
-static double direct_pan_to_midi (pan_t val) {
+static double direct_pan_to_control (pan_t val) {
return val;
}
StreamPanner::StreamPanner (Panner& p)
: parent (p),
- _midi_control (*this, (MIDI::Port*) 0)
+ _control (*this)
{
_muted = false;
@@ -80,84 +80,30 @@ StreamPanner::~StreamPanner ()
{
}
-StreamPanner::MIDIControl::MIDIControl (StreamPanner& s, MIDI::Port* port)
- : MIDI::Controllable (port, 0), sp (s), setting(false)
-{
- midi_to_pan = direct_midi_to_pan;
- pan_to_midi = direct_pan_to_midi;
- last_written = 0; /* XXX need a good out-of-bound-value */
-}
-
void
-StreamPanner::MIDIControl::set_value (float val)
+StreamPanner::PanControllable::set_value (float val)
{
- setting = true;
- sp.set_position (midi_to_pan (val));
- setting = false;
-}
-
-void
-StreamPanner::MIDIControl::send_feedback (pan_t value)
-{
-
- if (!setting && get_midi_feedback() && pan_to_midi) {
- MIDI::byte val = (MIDI::byte) (pan_to_midi (value) * 127.0f);
- MIDI::channel_t ch = 0;
- MIDI::eventType ev = MIDI::none;
- MIDI::byte additional = 0;
- MIDI::EventTwoBytes data;
-
- if (get_control_info (ch, ev, additional)) {
- data.controller_number = additional;
- data.value = val;
- last_written = val;
-
- sp.get_parent().session().send_midi_message (get_port(), ev, ch, data);
- }
-
- // send_midi_feedback (pan_to_midi (val));
- }
-
+ panner.set_position (direct_control_to_pan (val));
}
-MIDI::byte*
-StreamPanner::MIDIControl::write_feedback (MIDI::byte* buf, int32_t& bufsize, pan_t val, bool force)
+float
+StreamPanner::PanControllable::get_value (void) const
{
- if (get_midi_feedback() && pan_to_midi && bufsize > 2) {
- MIDI::channel_t ch = 0;
- MIDI::eventType ev = MIDI::none;
- MIDI::byte additional = 0;
- MIDI::byte pm;
- if (get_control_info (ch, ev, additional)) {
-
- pm = (MIDI::byte) (pan_to_midi (val) * 127.0);
-
- if (pm != last_written || force) {
- *buf++ = (0xF0 & ev) | (0xF & ch);
- *buf++ = additional; /* controller number */
- *buf++ = pm;
- last_written = pm;
- bufsize -= 3;
- }
- }
- }
-
- return buf;
+ float xpos;
+ panner.get_effective_position (xpos);
+ return direct_pan_to_control (xpos);
}
-
-void
-StreamPanner::reset_midi_control (MIDI::Port* port, bool on)
+bool
+StreamPanner::PanControllable::can_send_feedback () const
{
- MIDI::channel_t chn;
- MIDI::eventType ev;
- MIDI::byte extra;
+ AutoState astate = panner.get_parent().automation_state ();
- _midi_control.get_control_info (chn, ev, extra);
- if (!on) {
- chn = -1;
+ if ((astate == Play) || (astate == Touch && !panner.get_parent().touching())) {
+ return true;
}
- _midi_control.midi_rebind (port, chn);
+
+ return false;
}
void
@@ -180,10 +126,7 @@ StreamPanner::set_position (float xpos, bool link_call)
x = xpos;
update ();
Changed ();
-
- if (parent.session().get_midi_feedback()) {
- _midi_control.send_feedback (x);
- }
+ _control.Changed ();
}
}
@@ -224,42 +167,11 @@ StreamPanner::set_state (const XMLNode& node)
{
const XMLProperty* prop;
XMLNodeConstIterator iter;
- XMLNodeList midi_kids;
if ((prop = node.property (X_("muted")))) {
set_muted (prop->value() == "yes");
}
- midi_kids = node.children ("MIDI");
-
- for (iter = midi_kids.begin(); iter != midi_kids.end(); ++iter) {
-
- XMLNodeList kids;
- XMLNodeConstIterator miter;
- XMLNode* child;
-
- kids = (*iter)->children ();
-
- for (miter = kids.begin(); miter != kids.end(); ++miter) {
-
- child =* miter;
-
- if (child->name() == "pan") {
-
- MIDI::eventType ev = MIDI::on; /* initialize to keep gcc happy */
- MIDI::byte additional = 0; /* ditto */
- MIDI::channel_t chn = 0; /* ditto */
-
- if (get_midi_node_info (child, ev, chn, additional)) {
- _midi_control.set_control_type (chn, ev, additional);
- } else {
- error << _("MIDI pan control specification is incomplete, so it has been ignored") << endmsg;
- }
- }
- }
- }
-
-
return 0;
}
@@ -267,68 +179,6 @@ void
StreamPanner::add_state (XMLNode& node)
{
node.add_property (X_("muted"), (muted() ? "yes" : "no"));
-
- /* MIDI control */
-
- MIDI::channel_t chn;
- MIDI::eventType ev;
- MIDI::byte additional;
- XMLNode* midi_node = 0;
- XMLNode* child;
-
- if (_midi_control.get_control_info (chn, ev, additional)) {
-
- midi_node = node.add_child ("MIDI");
-
- child = midi_node->add_child ("pan");
- set_midi_node_info (child, ev, chn, additional);
- }
-
-}
-
-
-bool
-StreamPanner::get_midi_node_info (XMLNode * node, MIDI::eventType & ev, MIDI::channel_t & chan, MIDI::byte & additional)
-{
- bool ok = true;
- const XMLProperty* prop;
- int xx;
-
- if ((prop = node->property ("event")) != 0) {
- sscanf (prop->value().c_str(), "0x%x", &xx);
- ev = (MIDI::eventType) xx;
- } else {
- ok = false;
- }
-
- if (ok && ((prop = node->property ("channel")) != 0)) {
- sscanf (prop->value().c_str(), "%d", &xx);
- chan = (MIDI::channel_t) xx;
- } else {
- ok = false;
- }
-
- if (ok && ((prop = node->property ("additional")) != 0)) {
- sscanf (prop->value().c_str(), "0x%x", &xx);
- additional = (MIDI::byte) xx;
- }
-
- return ok;
-}
-
-bool
-StreamPanner::set_midi_node_info (XMLNode * node, MIDI::eventType ev, MIDI::channel_t chan, MIDI::byte additional)
-{
- char buf[32];
-
- snprintf (buf, sizeof(buf), "0x%x", ev);
- node->add_property ("event", buf);
- snprintf (buf, sizeof(buf), "%d", chan);
- node->add_property ("channel", buf);
- snprintf (buf, sizeof(buf), "0x%x", additional);
- node->add_property ("additional", buf);
-
- return true;
}
/*---------------------------------------------------------------------- */
@@ -959,8 +809,6 @@ Panner::Panner (string name, Session& s)
_linked = false;
_link_direction = SameDirection;
_bypassed = false;
-
- reset_midi_control (_session.mmc_port(), _session.get_mmc_control());
}
Panner::~Panner ()
@@ -1107,8 +955,6 @@ Panner::reset (uint32_t nouts, uint32_t npans)
(*x)->update ();
}
- reset_midi_control (_session.mmc_port(), _session.get_mmc_control());
-
/* force hard left/right panning in a common case: 2in/2out
*/
@@ -1490,14 +1336,6 @@ Panner::touching () const
}
void
-Panner::reset_midi_control (MIDI::Port* port, bool on)
-{
- for (vector<StreamPanner*>::const_iterator i = begin(); i != end(); ++i) {
- (*i)->reset_midi_control (port, on);
- }
-}
-
-void
Panner::set_position (float xpos, StreamPanner& orig)
{
float xnow;
@@ -1639,42 +1477,3 @@ Panner::set_position (float xpos, float ypos, float zpos, StreamPanner& orig)
}
}
}
-
-void
-Panner::send_all_midi_feedback ()
-{
- if (_session.get_midi_feedback()) {
- float xpos;
-
- // do feedback for all panners
- for (vector<StreamPanner*>::iterator i = begin(); i != end(); ++i) {
- (*i)->get_effective_position (xpos);
-
- (*i)->midi_control().send_feedback (xpos);
- }
-
- }
-}
-
-MIDI::byte*
-Panner::write_midi_feedback (MIDI::byte* buf, int32_t& bufsize)
-{
- AutoState astate = automation_state ();
-
- if (_session.get_midi_feedback() &&
- (astate == Play || (astate == Touch && !touching()))) {
-
- float xpos;
-
- // do feedback for all panners
- for (vector<StreamPanner*>::iterator i = begin(); i != end(); ++i) {
- (*i)->get_effective_position (xpos);
-
- buf = (*i)->midi_control().write_feedback (buf, bufsize, xpos);
- }
-
- }
-
- return buf;
-}
-
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index 7dee866767..fc1dd84066 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -77,7 +77,6 @@ Playlist::Playlist (Session& sess, string nom, bool hide)
{
init (hide);
_name = nom;
- _orig_diskstream_id = 0;
}
@@ -86,7 +85,6 @@ Playlist::Playlist (Session& sess, const XMLNode& node, bool hide)
{
init (hide);
_name = "unnamed"; /* reset by set_state */
- _orig_diskstream_id = 0;
if (set_state (node)) {
throw failed_constructor();
@@ -1343,7 +1341,7 @@ Playlist::set_state (const XMLNode& node)
if (prop->name() == X_("name")) {
_name = prop->value();
} else if (prop->name() == X_("orig_diskstream_id")) {
- sscanf (prop->value().c_str(), "%" PRIu64, &_orig_diskstream_id);
+ _orig_diskstream_id = prop->value ();
} else if (prop->name() == X_("frozen")) {
_frozen = (prop->value() == X_("yes"));
}
@@ -1404,7 +1402,7 @@ Playlist::state (bool full_state)
node->add_property (X_("name"), _name);
- snprintf (buf, sizeof(buf), "%" PRIu64, _orig_diskstream_id);
+ _orig_diskstream_id.print (buf);
node->add_property (X_("orig_diskstream_id"), buf);
node->add_property (X_("frozen"), _frozen ? "yes" : "no");
@@ -1725,7 +1723,7 @@ Playlist::nudge_after (jack_nframes_t start, jack_nframes_t distance, bool forwa
}
Region*
-Playlist::find_region (id_t id) const
+Playlist::find_region (const ID& id) const
{
RegionLock rlock (const_cast<Playlist*> (this));
RegionList::const_iterator i;
diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc
index 9fc6c57909..6763e7f508 100644
--- a/libs/ardour/plugin.cc
+++ b/libs/ardour/plugin.cc
@@ -35,8 +35,6 @@
#include <pbd/pathscanner.h>
#include <pbd/xml++.h>
-#include <midi++/manager.h>
-
#include <ardour/ardour.h>
#include <ardour/session.h>
#include <ardour/audioengine.h>
@@ -61,64 +59,59 @@ Plugin::Plugin (const Plugin& other)
}
void
-Plugin::setup_midi_controls ()
+Plugin::setup_controls ()
{
- uint32_t port_cnt;
-
- port_cnt = parameter_count();
+ uint32_t port_cnt = parameter_count();
- /* set up a vector of null pointers for the MIDI controls.
+ /* set up a vector of null pointers for the controls.
we'll fill this in on an as-needed basis.
*/
for (uint32_t i = 0; i < port_cnt; ++i) {
- midi_controls.push_back (0);
+ controls.push_back (0);
}
}
Plugin::~Plugin ()
{
- for (vector<MIDIPortControl*>::iterator i = midi_controls.begin(); i != midi_controls.end(); ++i) {
+ for (vector<PortControllable*>::iterator i = controls.begin(); i != controls.end(); ++i) {
if (*i) {
delete *i;
}
}
}
-MIDI::Controllable *
-Plugin::get_nth_midi_control (uint32_t n)
+Controllable *
+Plugin::get_nth_control (uint32_t n)
{
if (n >= parameter_count()) {
return 0;
}
- if (midi_controls[n] == 0) {
+ if (controls[n] == 0) {
Plugin::ParameterDescriptor desc;
get_parameter_descriptor (n, desc);
-
- midi_controls[n] = new MIDIPortControl (*this, n, _session.midi_port(), desc.lower, desc.upper, desc.toggled, desc.logarithmic);
+
+ controls[n] = new PortControllable (*this, n, desc.lower, desc.upper, desc.toggled, desc.logarithmic);
}
- return midi_controls[n];
+ return controls[n];
}
-Plugin::MIDIPortControl::MIDIPortControl (Plugin& p, uint32_t port_id, MIDI::Port *port,
- float low, float up, bool t, bool loga)
- : MIDI::Controllable (port, 0), plugin (p), absolute_port (port_id)
+Plugin::PortControllable::PortControllable (Plugin& p, uint32_t port_id, float low, float up, bool t, bool loga)
+ : plugin (p), absolute_port (port_id)
{
toggled = t;
logarithmic = loga;
lower = low;
upper = up;
range = upper - lower;
- last_written = 0; /* XXX need a good out-of-bound-value */
- setting = false;
}
void
-Plugin::MIDIPortControl::set_value (float value)
+Plugin::PortControllable::set_value (float value)
{
if (toggled) {
if (value > 0.5) {
@@ -140,138 +133,27 @@ Plugin::MIDIPortControl::set_value (float value)
}
}
- setting = true;
plugin.set_parameter (absolute_port, value);
- setting = false;
-}
-
-void
-Plugin::MIDIPortControl::send_feedback (float value)
-{
-
- if (!setting && get_midi_feedback()) {
- MIDI::byte val;
- MIDI::channel_t ch = 0;
- MIDI::eventType ev = MIDI::none;
- MIDI::byte additional = 0;
- MIDI::EventTwoBytes data;
-
- if (toggled) {
- val = (MIDI::byte) (value * 127.0f);
- } else {
- if (logarithmic) {
- value = log(value);
- }
-
- val = (MIDI::byte) (((value - lower) / range) * 127.0f);
- }
-
- if (get_control_info (ch, ev, additional)) {
- data.controller_number = additional;
- data.value = val;
- last_written = val;
-
- plugin.session().send_midi_message (get_port(), ev, ch, data);
- }
- }
-
}
-MIDI::byte*
-Plugin::MIDIPortControl::write_feedback (MIDI::byte* buf, int32_t& bufsize, float value, bool force)
+float
+Plugin::PortControllable::get_value (void) const
{
- if (get_midi_feedback() && bufsize > 2) {
- MIDI::channel_t ch = 0;
- MIDI::eventType ev = MIDI::none;
- MIDI::byte additional = 0;
-
- if (get_control_info (ch, ev, additional)) {
-
- MIDI::byte val;
-
- if (toggled) {
+ float val = plugin.get_parameter (absolute_port);
- val = (MIDI::byte) (value * 127.0f);
-
- } else {
-
- if (logarithmic) {
- value = log(value);
- }
-
- val = (MIDI::byte) (((value - lower) / range) * 127.0f);
- }
-
- if (val != last_written || force) {
- *buf++ = MIDI::controller & ch;
- *buf++ = additional; /* controller number */
- *buf++ = val;
- last_written = val;
- bufsize -= 3;
- }
- }
- }
-
- return buf;
-}
-
-
-void
-Plugin::reset_midi_control (MIDI::Port* port, bool on)
-{
- MIDI::channel_t chn;
- MIDI::eventType ev;
- MIDI::byte extra;
-
- for (vector<MIDIPortControl*>::iterator i = midi_controls.begin(); i != midi_controls.end(); ++i) {
- if (*i == 0)
- continue;
- (*i)->get_control_info (chn, ev, extra);
- if (!on) {
- chn = -1;
- }
- (*i)->midi_rebind (port, chn);
- }
-}
-
-void
-Plugin::send_all_midi_feedback ()
-{
- if (_session.get_midi_feedback()) {
- float val = 0.0;
- uint32_t n = 0;
+ if (toggled) {
- for (vector<MIDIPortControl*>::iterator i = midi_controls.begin(); i != midi_controls.end(); ++i, ++n) {
- if (*i == 0) {
- continue;
- }
-
- val = (*i)->plugin.get_parameter (n);
- (*i)->send_feedback (val);
- }
+ return val;
- }
-}
-
-MIDI::byte*
-Plugin::write_midi_feedback (MIDI::byte* buf, int32_t& bufsize)
-{
- if (_session.get_midi_feedback()) {
- float val = 0.0;
- uint32_t n = 0;
+ } else {
- for (vector<MIDIPortControl*>::iterator i = midi_controls.begin(); i != midi_controls.end(); ++i, ++n) {
- if (*i == 0) {
- continue;
- }
-
- val = (*i)->plugin.get_parameter (n);
- buf = (*i)->write_feedback (buf, bufsize, val);
+ if (logarithmic) {
+ val = log(val);
}
+
+ return ((val - lower) / range);
}
-
- return buf;
-}
+}
vector<string>
Plugin::get_presets()
diff --git a/libs/ardour/po/el_GR.po b/libs/ardour/po/el_GR.po
index a7aefa2cca..5d8adef7d0 100644
--- a/libs/ardour/po/el_GR.po
+++ b/libs/ardour/po/el_GR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libardour 0.664.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-06-20 16:23-0400\n"
+"POT-Creation-Date: 2006-06-29 21:03-0400\n"
"PO-Revision-Date: 2003-05-21 12:50+0500\n"
"Last-Translator: Muadibas\n"
"Language-Team: Hellenic(Greek)\n"
@@ -15,23 +15,23 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: libs/ardour/audio_diskstream.cc:336
+#: libs/ardour/audio_diskstream.cc:337
#, fuzzy
msgid "AudioDiskstream: Session doesn't know about a Playlist called \"%1\""
msgstr ""
"DiskStream: Η ΣυνεδÏία δεν γνωÏίζει για την λίστα ΑναπαÏ/γής με όνομα \"%1\""
-#: libs/ardour/audio_diskstream.cc:341
+#: libs/ardour/audio_diskstream.cc:342
#, fuzzy
msgid "AudioDiskstream: Playlist \"%1\" isn't an audio playlist"
msgstr "DiskStream: Η Λίστα \"%1\" δεν είναι ηχητική λίστα αναπαÏ/γής"
-#: libs/ardour/audio_diskstream.cc:432
+#: libs/ardour/audio_diskstream.cc:433
#, fuzzy
msgid "AudioDiskstream %1: there is no existing playlist to make a copy of!"
msgstr "DiskStream %1: δεν υπάÏχει λίστα αναπαÏ/γής για να γίνει αντιγÏαφή!"
-#: libs/ardour/audio_diskstream.cc:1113 libs/ardour/audio_diskstream.cc:1124
+#: libs/ardour/audio_diskstream.cc:1114 libs/ardour/audio_diskstream.cc:1125
#, fuzzy
msgid ""
"AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3"
@@ -39,100 +39,100 @@ msgstr ""
"DiskStream %1: κατα την αναγόμωση, δεν μπόÏεσα να διαβάσω %2 από τη λίστα "
"αναπαÏ/γής στο frame %3"
-#: libs/ardour/audio_diskstream.cc:1253
+#: libs/ardour/audio_diskstream.cc:1254
#, fuzzy
msgid "AudioDiskstream %1: cannot read %2 from playlist at frame %3"
msgstr ""
"DiskStream %1: δεν μπόÏεσα να διαβάσω %2 από τη λίστα αναπαÏ/γής στο frame %3"
-#: libs/ardour/audio_diskstream.cc:1620 libs/ardour/audio_diskstream.cc:1637
+#: libs/ardour/audio_diskstream.cc:1621 libs/ardour/audio_diskstream.cc:1638
#, fuzzy
msgid "AudioDiskstream %1: cannot write to disk"
msgstr "DiskStream %1: δεν μποÏÏŽ να γÏάψω στο δίσκο"
-#: libs/ardour/audio_diskstream.cc:1697
+#: libs/ardour/audio_diskstream.cc:1698
#, fuzzy
msgid "AudioDiskstream \"%1\": cannot flush captured data to disk!"
msgstr ""
"DiskStream \"%1\": δεν γίνεται να αποÏÏιφθοÏν δειγματοληψίες στο δίσκο!"
-#: libs/ardour/audio_diskstream.cc:1794
+#: libs/ardour/audio_diskstream.cc:1796
msgid "%1: could not create region for complete audio file"
msgstr "%1: δεν μπόÏεσα να δημιουÏγήσω πεÏιοχή για ολόκληÏο audio file"
-#: libs/ardour/audio_diskstream.cc:1817
+#: libs/ardour/audio_diskstream.cc:1819
#, fuzzy
msgid "AudioDiskstream: could not create region for captured audio!"
msgstr "DiskStream: δεν μπόÏεσα να δημιουÏγήσω πεÏιοχή για δειγματοληψίες!"
-#: libs/ardour/audio_diskstream.cc:1872
+#: libs/ardour/audio_diskstream.cc:1874
#, fuzzy
msgid "programmer error: %1"
msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: %1"
-#: libs/ardour/audio_diskstream.cc:2144
+#: libs/ardour/audio_diskstream.cc:2146
#, fuzzy
msgid "AudioDiskstream: channel %1 out of range"
msgstr "DiskStream: κανάλι εκτός διαστήματος"
-#: libs/ardour/audio_diskstream.cc:2169
+#: libs/ardour/audio_diskstream.cc:2171
msgid "%1:%2 new capture file not initialized correctly"
msgstr "%1:%2 νέα δειγματοληψία δεν εκκινήθη σωστά"
-#: libs/ardour/audio_diskstream.cc:2402
+#: libs/ardour/audio_diskstream.cc:2404
msgid "Location \"%1\" not valid for track loop (start >= end)"
msgstr "Η Τοποθεσία \"%1\" δεν είναι ικανή για track loop (αÏχή >= τέλος)"
-#: libs/ardour/audio_diskstream.cc:2483
+#: libs/ardour/audio_diskstream.cc:2485
#, fuzzy
msgid "%1: cannot restore pending capture source file %2"
msgstr "Εισαγωγή: δεν μποÏÏŽ να ανοίξω το εισαγμένο αÏχείο ήχου \"%1\""
-#: libs/ardour/audio_diskstream.cc:2505
+#: libs/ardour/audio_diskstream.cc:2507
msgid "%1: incorrect number of pending sources listed - ignoring them all"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:2521
+#: libs/ardour/audio_diskstream.cc:2523
msgid "%1: cannot create whole-file region from pending capture sources"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:2533
+#: libs/ardour/audio_diskstream.cc:2535
#, fuzzy
msgid "%1: cannot create region from pending capture sources"
msgstr "%1: δεν μπόÏεσα να δημιουÏγήσω πεÏιοχή για ολόκληÏο audio file"
-#: libs/ardour/audio_library.cc:91
+#: libs/ardour/audio_library.cc:92
msgid "channels"
msgstr ""
-#: libs/ardour/audio_library.cc:92
+#: libs/ardour/audio_library.cc:93
#, fuzzy
msgid "samplerate"
msgstr "ξεχωÏιστό"
-#: libs/ardour/audio_library.cc:93
+#: libs/ardour/audio_library.cc:94
msgid "resolution"
msgstr ""
-#: libs/ardour/audio_library.cc:94
+#: libs/ardour/audio_library.cc:95
#, fuzzy
msgid "format"
msgstr "float"
-#: libs/ardour/audio_library.cc:101
+#: libs/ardour/audio_library.cc:102
msgid "Could not open %1. Audio Library not saved"
msgstr "Δεν μπόÏεσα να ανοίξω το %1. Η Audio Library δεν αποθηκεÏθηκε"
-#: libs/ardour/audio_playlist.cc:52 libs/ardour/audio_playlist.cc:62
-#: libs/ardour/audio_playlist.cc:73 libs/ardour/audio_playlist.cc:120
+#: libs/ardour/audio_playlist.cc:53 libs/ardour/audio_playlist.cc:63
+#: libs/ardour/audio_playlist.cc:74 libs/ardour/audio_playlist.cc:121
#: libs/ardour/insert.cc:76 libs/ardour/insert.cc:95 libs/ardour/insert.cc:120
-#: libs/ardour/insert.cc:838 libs/ardour/insert.cc:846 libs/ardour/send.cc:38
-#: libs/ardour/send.cc:52 libs/ardour/send.cc:61
-#: libs/ardour/session_state.cc:1620 libs/ardour/session_state.cc:1666
+#: libs/ardour/insert.cc:838 libs/ardour/insert.cc:846 libs/ardour/send.cc:39
+#: libs/ardour/send.cc:53 libs/ardour/send.cc:62
+#: libs/ardour/session_state.cc:1621 libs/ardour/session_state.cc:1667
msgid "initial state"
msgstr "Ï€ÏωταÏχική κατάσταση"
-#: libs/ardour/audio_playlist.cc:274 libs/ardour/audio_playlist.cc:768
+#: libs/ardour/audio_playlist.cc:275 libs/ardour/audio_playlist.cc:769
msgid ""
"programming error: non-audio Region passed to remove_overlap in audio "
"playlist"
@@ -140,51 +140,51 @@ msgstr ""
"σφάλμα Ï€ÏογÏαμματισμοÏ: μη-ηχητική ΠεÏιοχή πέÏασε σε remove_overlap στην "
"audio playlist"
-#: libs/ardour/audio_playlist.cc:401
+#: libs/ardour/audio_playlist.cc:402
msgid ""
"programming error: non-audio Region tested for overlap in audio playlist"
msgstr ""
"σφάλμα Ï€ÏογÏαμματισμοÏ: μη-ηχητική ΠεÏιοχή ελέγχθη για υπεÏπήδηση(overlap) "
"στην λίστα αναπαÏ/γής του ήχου"
-#: libs/ardour/audio_playlist.cc:877
+#: libs/ardour/audio_playlist.cc:878
msgid "xfade change"
msgstr "αλλαγή xfade"
-#: libs/ardour/audio_playlist.cc:932
+#: libs/ardour/audio_playlist.cc:933
msgid "region modified"
msgstr "η πεÏιοχή μετεβλήθη"
-#: libs/ardour/audio_track.cc:132 libs/ardour/io.cc:1715
-#: libs/ardour/io.cc:1825
+#: libs/ardour/audio_track.cc:125 libs/ardour/io.cc:1716
+#: libs/ardour/io.cc:1826
msgid "Unknown connection \"%1\" listed for input of %2"
msgstr "Άγνωστη σÏνδεση \"%1\" στη λίστα εισόδου του %2"
-#: libs/ardour/audio_track.cc:134 libs/ardour/io.cc:1717
-#: libs/ardour/io.cc:1827
+#: libs/ardour/audio_track.cc:127 libs/ardour/io.cc:1718
+#: libs/ardour/io.cc:1828
#, fuzzy
msgid "in 1"
msgstr "in %lu"
-#: libs/ardour/audio_track.cc:135 libs/ardour/io.cc:1718
-#: libs/ardour/io.cc:1828
+#: libs/ardour/audio_track.cc:128 libs/ardour/io.cc:1719
+#: libs/ardour/io.cc:1829
msgid "No input connections available as a replacement"
msgstr ""
-#: libs/ardour/audio_track.cc:139 libs/ardour/io.cc:1722
-#: libs/ardour/io.cc:1832
+#: libs/ardour/audio_track.cc:132 libs/ardour/io.cc:1723
+#: libs/ardour/io.cc:1833
msgid "Connection %1 was not available - \"in 1\" used instead"
msgstr ""
-#: libs/ardour/audio_track.cc:148 libs/ardour/io.cc:1841
+#: libs/ardour/audio_track.cc:141 libs/ardour/io.cc:1842
msgid "improper input channel list in XML node (%1)"
msgstr "ακατάλληλη λίστα καναλιών εισόδου στον κόμβο XML (%1)"
-#: libs/ardour/audio_track.cc:193 libs/ardour/audio_track.cc:206
+#: libs/ardour/audio_track.cc:186 libs/ardour/audio_track.cc:199
msgid "AudioTrack: diskstream \"%1\" not known by session"
msgstr "AudioTrack: το diskstream \"%1\" είναι μή αναγνωÏίσιμο από τη συνεδÏία"
-#: libs/ardour/audio_track.cc:304
+#: libs/ardour/audio_track.cc:297
#, fuzzy
msgid ""
"MIDI rec_enable control specification for %1 is incomplete, so it has been "
@@ -193,95 +193,95 @@ msgstr ""
"Η Ï€ÏοδιαγÏαφή ελέγχου του MIDI gain για το %1 είναι ημιτελής, με αποτέλεσμα "
"να αγνοηθεί"
-#: libs/ardour/audio_track.cc:316
+#: libs/ardour/audio_track.cc:309
msgid "programming error: AudioTrack given state without diskstream!"
msgstr ""
"σφάλμα Ï€ÏογÏαμματισμοÏ: εδόθη κατάσταση στην AudioTrack δίχως diskstream!"
-#: libs/ardour/audioengine.cc:149
+#: libs/ardour/audioengine.cc:144
msgid "cannot activate JACK client"
msgstr "Ο JACK δεν μποÏεί να ενεÏγοποιηθεί"
-#: libs/ardour/audioengine.cc:400
+#: libs/ardour/audioengine.cc:395
msgid "register audio input port called before engine was started"
msgstr "η register audio input port εκλήθη Ï€Ïιν να εκκινηθεί η engine"
-#: libs/ardour/audioengine.cc:431
+#: libs/ardour/audioengine.cc:426
msgid "register audio output port called before engine was started"
msgstr "η register audio output port εκλήθη Ï€Ïίν να εκκινηθεί η engine"
-#: libs/ardour/audioengine.cc:492
+#: libs/ardour/audioengine.cc:487
msgid "connect called before engine was started"
msgstr "η σÏνδεση εκλήθη Ï€Ïιν να εκκινηθεί η engine"
-#: libs/ardour/audioengine.cc:508
+#: libs/ardour/audioengine.cc:503
msgid "AudioEngine: cannot connect %1 (%2) to %3 (%4)"
msgstr ""
-#: libs/ardour/audioengine.cc:521 libs/ardour/audioengine.cc:550
+#: libs/ardour/audioengine.cc:516 libs/ardour/audioengine.cc:545
msgid "disconnect called before engine was started"
msgstr "η αποσÏνδεση εκλήθη Ï€Ïιν να εκκινηθεί η engine"
-#: libs/ardour/audioengine.cc:608
+#: libs/ardour/audioengine.cc:603
msgid "get_port_by_name() called before engine was started"
msgstr "η Ïουτίνα get_port_by_name() εκλήθη Ï€Ïιν να εκκινηθεί η engine"
-#: libs/ardour/audioengine.cc:641
+#: libs/ardour/audioengine.cc:636
msgid "get_ports called before engine was started"
msgstr "η Ïουτίνα get_ports εκλήθη Ï€Ïιν να εκκινηθεί η engine"
-#: libs/ardour/audioengine.cc:716
+#: libs/ardour/audioengine.cc:711
msgid "get_nth_physical called before engine was started"
msgstr "η Ïουτίνα get_nth_physical εκλήθη Ï€Ïιν να εκκινηθεί η engine"
-#: libs/ardour/audioengine.cc:744
+#: libs/ardour/audioengine.cc:739
#, fuzzy
msgid "get_port_total_latency() called with no JACK client connection"
msgstr "η Ïουτίνα get_port_total_latency() εκλήθη Ï€Ïιν να εκκινηθεί η engine"
-#: libs/ardour/audioengine.cc:750
+#: libs/ardour/audioengine.cc:745
msgid "get_port_total_latency() called before engine was started"
msgstr "η Ïουτίνα get_port_total_latency() εκλήθη Ï€Ïιν να εκκινηθεί η engine"
-#: libs/ardour/audioengine.cc:874
+#: libs/ardour/audioengine.cc:869
msgid "Unable to connect to JACK server"
msgstr ""
-#: libs/ardour/audioengine.cc:877
+#: libs/ardour/audioengine.cc:872
msgid "Could not connect to JACK server as \"%1\""
msgstr ""
-#: libs/ardour/audioengine.cc:882
+#: libs/ardour/audioengine.cc:877
msgid "JACK server started"
msgstr ""
-#: libs/ardour/audioengine.cc:916
+#: libs/ardour/audioengine.cc:911
msgid "cannot shutdown connection to JACK"
msgstr ""
-#: libs/ardour/audioengine.cc:941
+#: libs/ardour/audioengine.cc:936
msgid "failed to connect to JACK"
msgstr ""
-#: libs/ardour/audioengine.cc:957
+#: libs/ardour/audioengine.cc:952
#, fuzzy
msgid "could not reregister %1"
msgstr "Σφάλμα: δεν μπόÏεσα να γÏάψω %1"
-#: libs/ardour/audioengine.cc:1014
+#: libs/ardour/audioengine.cc:1009
msgid "could not reconnect %1 and %2 (err = %3)"
msgstr ""
-#: libs/ardour/audiofilesource.cc:444 libs/ardour/session_state.cc:3094
+#: libs/ardour/audiofilesource.cc:444 libs/ardour/session_state.cc:3095
msgid ""
"there are already 1000 files with names like %1; versioning discontinued"
msgstr "ΥπάÏχουν ήδη 1000 αÏχεία με ονόματα όπως %1; μη-συνεχές versioning"
-#: libs/ardour/audiofilesource.cc:458 libs/ardour/session_state.cc:3108
+#: libs/ardour/audiofilesource.cc:458 libs/ardour/session_state.cc:3109
msgid "cannot rename audio file source from %1 to %2 (%3)"
msgstr "δεν μποÏÏŽ να μετονομάσω την πηγή του audio file από %1 σε %2 (%3)"
-#: libs/ardour/audiofilesource.cc:465 libs/ardour/session_state.cc:3123
+#: libs/ardour/audiofilesource.cc:465 libs/ardour/session_state.cc:3124
msgid "cannot remove peakfile %1 for %2 (%3)"
msgstr "δεν μποÏÏŽ να απαλοίψω το peakfile %1 για %2 (%3)"
@@ -310,23 +310,23 @@ msgstr "Filesource: δεν ευÏέθη το απαιτοÏμενο αÏχείο
msgid "Filesource: cannot check for existing file (%1): %2"
msgstr "Filesource: δεν μποÏÏŽ να ελέγξω για το υπάÏχον αÏχείο (%1): %2"
-#: libs/ardour/audiofilesource.cc:639 libs/ardour/insert.cc:525
-#: libs/ardour/sndfilesource.cc:111
+#: libs/ardour/audiofilesource.cc:636 libs/ardour/insert.cc:525
+#: libs/ardour/sndfilesource.cc:113
msgid "programming error: %1"
msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: %1"
-#: libs/ardour/audiofilesource.cc:644
+#: libs/ardour/audiofilesource.cc:641
#, fuzzy
msgid "cannot rename audio file for %1 to %2"
msgstr "δεν μποÏÏŽ να μετονομάσω την πηγή του audio file από %1 σε %2 (%3)"
-#: libs/ardour/audiofilter.cc:44
+#: libs/ardour/audiofilter.cc:45
msgid "audiofilter: error creating name for new audio file based on %1"
msgstr ""
"audiofilter: σφάλμα στη δημιουÏγία ονόματος για νέο audio file βασισμένο σε %"
"1"
-#: libs/ardour/audiofilter.cc:57
+#: libs/ardour/audiofilter.cc:58
msgid "audiofilter: error creating new audio file %1 (%2)"
msgstr "audiofilter: σφάλμα στη δημιουÏγία νέου audio file %1 (%2)"
@@ -412,152 +412,152 @@ msgstr ""
msgid "%1: could not write peak file data (%2)"
msgstr "%1: δεν μπόÏεσα να γÏάψω δεδομένα του αÏχείου peak (%2)"
-#: libs/ardour/automation_event.cc:64 libs/ardour/location.cc:344
-#: libs/ardour/tempo.cc:225
+#: libs/ardour/automation_event.cc:65 libs/ardour/location.cc:345
+#: libs/ardour/tempo.cc:226
msgid "initial"
msgstr "Ï€ÏωταÏχικό"
-#: libs/ardour/automation_event.cc:231
+#: libs/ardour/automation_event.cc:232
msgid "cleared"
msgstr "εκκαθαÏίσθη"
-#: libs/ardour/automation_event.cc:403
+#: libs/ardour/automation_event.cc:404
msgid "added event"
msgstr "συμβάν Ï€Ïοστέθηκε"
-#: libs/ardour/automation_event.cc:420
+#: libs/ardour/automation_event.cc:421
msgid "removed event"
msgstr "συμβάν απαλοίφθηκε"
-#: libs/ardour/automation_event.cc:435
+#: libs/ardour/automation_event.cc:436
msgid "removed multiple events"
msgstr "πολλαπλά συμβάντα απαλοίφθηκαν"
-#: libs/ardour/automation_event.cc:466 libs/ardour/automation_event.cc:497
+#: libs/ardour/automation_event.cc:467 libs/ardour/automation_event.cc:498
msgid "removed range"
msgstr "διάστημα απαλοίφθηκε"
-#: libs/ardour/automation_event.cc:527
+#: libs/ardour/automation_event.cc:528
msgid "event range adjusted"
msgstr "διάστημα συμβάντων Ïυθμίστηκε"
-#: libs/ardour/automation_event.cc:549
+#: libs/ardour/automation_event.cc:550
msgid "event adjusted"
msgstr "συμβάν Ïυθμίστηκε"
-#: libs/ardour/automation_event.cc:664 libs/ardour/automation_event.cc:769
+#: libs/ardour/automation_event.cc:665 libs/ardour/automation_event.cc:770
#: libs/ardour/panner.cc:1041
msgid "programming error:"
msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ:"
-#: libs/ardour/automation_event.cc:1078
+#: libs/ardour/automation_event.cc:1079
msgid "cut/copy/clear"
msgstr "κοπή/αντιγÏαφή/εκκαθάÏιση"
-#: libs/ardour/automation_event.cc:1111
+#: libs/ardour/automation_event.cc:1112
msgid "copy"
msgstr "αντιγÏαφή"
-#: libs/ardour/automation_event.cc:1179 libs/ardour/playlist.cc:939
+#: libs/ardour/automation_event.cc:1180 libs/ardour/playlist.cc:939
msgid "paste"
msgstr "επικόλληση"
-#: libs/ardour/automation_event.cc:1234
+#: libs/ardour/automation_event.cc:1235
msgid ""
"automation list: no x-coordinate stored for control point (point ignored)"
msgstr ""
"λίστα αυτοματισμοÏ: καμία x-συντεταγμένη αποθηκευμένη για σημείο ελέγχου (το "
"σημείο αγνοήθηκε)"
-#: libs/ardour/automation_event.cc:1240
+#: libs/ardour/automation_event.cc:1241
msgid ""
"automation list: no y-coordinate stored for control point (point ignored)"
msgstr ""
"λίστα αυτοματισμοÏ: καμία y-συντεταγμένη αποθηκευμένη για σημείο ελέγχου (το "
"σημείο αγνοήθηκε)"
-#: libs/ardour/configuration.cc:79
+#: libs/ardour/configuration.cc:80
#, fuzzy
msgid "loading system configuration file %1"
msgstr ""
"Ardour: δεν μποÏÏŽ να διαβάσω το αÏχείο διαÏÏυθμίσεως του συστήματος \"%1\""
-#: libs/ardour/configuration.cc:82
+#: libs/ardour/configuration.cc:83
msgid "Ardour: cannot read system configuration file \"%1\""
msgstr ""
"Ardour: δεν μποÏÏŽ να διαβάσω το αÏχείο διαÏÏυθμίσεως του συστήματος \"%1\""
-#: libs/ardour/configuration.cc:87
+#: libs/ardour/configuration.cc:88
msgid "Ardour: system configuration file \"%1\" not loaded successfully."
msgstr ""
"Ardour: το αÏχείο διαÏÏυθμίσεως του συστήματος \"%1\" δεν φοÏτώθηκε επιτυχώς."
-#: libs/ardour/configuration.cc:104
+#: libs/ardour/configuration.cc:105
#, fuzzy
msgid "loading user configuration file %1"
msgstr "Ardour: αÏχείο διαÏÏυθμίσεως μή αναγνώσιμο \"%1\""
-#: libs/ardour/configuration.cc:107
+#: libs/ardour/configuration.cc:108
msgid "Ardour: cannot read configuration file \"%1\""
msgstr "Ardour: αÏχείο διαÏÏυθμίσεως μή αναγνώσιμο \"%1\""
-#: libs/ardour/configuration.cc:112
+#: libs/ardour/configuration.cc:113
#, fuzzy
msgid "Ardour: user configuration file \"%1\" not loaded successfully."
msgstr "Ardour: αÏχείο διαÏÏυθμίσεως \"%1\" δεν φοÏτώθηκε επιτυχώς."
-#: libs/ardour/configuration.cc:136
+#: libs/ardour/configuration.cc:137
#, fuzzy
msgid "Config file %1 not saved"
msgstr "ΑÏχείο διαÏÏυθμίσεως δεν αποθηκεÏθηκε"
-#: libs/ardour/configuration.cc:209
+#: libs/ardour/configuration.cc:210
msgid "ill-formed MIDI port specification in ardour rcfile (ignored)"
msgstr "κακοσχηματισμένος καθοÏισμός MIDI θÏÏας στο ardour rcfile (αγνοήθηκε)"
-#: libs/ardour/connection.cc:182
+#: libs/ardour/connection.cc:183
msgid "Node for Connection has no \"name\" property"
msgstr "Κόμβος Ï€Ïος ΣÏνδεση δεν έχει \"όνομα\" ιδιότητα"
-#: libs/ardour/connection.cc:190
+#: libs/ardour/connection.cc:191
msgid "Node for Connection has no \"connections\" property"
msgstr "Κόμβος Ï€Ïος ΣÏνδεση δεν έχει \"συνδέσεις\" ιδιότητα"
-#: libs/ardour/connection.cc:226 libs/ardour/io.cc:1901
+#: libs/ardour/connection.cc:227 libs/ardour/io.cc:1902
msgid "IO: badly formed string in XML node for inputs \"%1\""
msgstr "IO: κακοφτιαγμένη γÏαμμή στον XML κόμβο για εισόδους \"%1\""
-#: libs/ardour/connection.cc:231 libs/ardour/io.cc:1906
+#: libs/ardour/connection.cc:232 libs/ardour/io.cc:1907
msgid "bad input string in XML node \"%1\""
msgstr "κακή γÏαμμή εισόδου στον XML κόμβο \"%1\""
-#: libs/ardour/control_protocol_manager.cc:82
+#: libs/ardour/control_protocol_manager.cc:80
msgid "control protocol name \"%1\" has no descriptor"
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:87
+#: libs/ardour/control_protocol_manager.cc:85
msgid "control protocol name \"%1\" could not be initialized"
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:143
+#: libs/ardour/control_protocol_manager.cc:141
msgid "Instantiating mandatory control protocol %1"
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:177
+#: libs/ardour/control_protocol_manager.cc:175
#, fuzzy
msgid "Control protocol %1 not usable"
msgstr "ΧωÏίς έλεγχο MMC (θÏÏα MIDI \"%1\" μη διαθέσιμη)"
-#: libs/ardour/control_protocol_manager.cc:189
+#: libs/ardour/control_protocol_manager.cc:187
msgid "Control surface protocol discovered: \"%1\""
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:207
+#: libs/ardour/control_protocol_manager.cc:205
#, fuzzy
msgid "ControlProtocolManager: cannot load module \"%1\" (%2)"
msgstr "LADSPA: δεν μποÏÏŽ να φοÏτώσω το module \"%1\" (%2)"
-#: libs/ardour/control_protocol_manager.cc:215
+#: libs/ardour/control_protocol_manager.cc:213
#, fuzzy
msgid "ControlProtocolManager: module \"%1\" has no descriptor function."
msgstr "LADSPA: το module \"%1\" δεν έχει λειτουÏγία πεÏιγÏαφής."
@@ -591,104 +591,104 @@ msgstr "αλλαγή ενεÏγοÏ"
msgid "old-style crossfade information - no position information"
msgstr "Ο κόμβος XML για την Τοποθεσία δεν έχει πληÏοφοÏίες ενάÏξεως"
-#: libs/ardour/curve.cc:111 libs/ardour/globals.cc:339
+#: libs/ardour/curve.cc:112 libs/ardour/globals.cc:340
#: libs/ardour/insert.cc:454 libs/ardour/session.cc:2466
#: libs/ardour/session.cc:2518
msgid "programming error: "
msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: "
-#: libs/ardour/cycle_timer.cc:35
+#: libs/ardour/cycle_timer.cc:37
msgid "CycleTimer::get_mhz(): can't open /proc/cpuinfo"
msgstr "CycleTimer::get_mhz(): δεν ανοίγει το /proc/cpuinfo"
-#: libs/ardour/cycle_timer.cc:47
+#: libs/ardour/cycle_timer.cc:49
msgid "CycleTimer::get_mhz(): cannot locate cpu MHz in /proc/cpuinfo"
msgstr "CycleTimer::get_mhz(): δεν ευÏέθη το cpu MHz στο /proc/cpuinfo"
-#: libs/ardour/cycle_timer.cc:70
+#: libs/ardour/cycle_timer.cc:72
msgid "cannot locate cpu MHz in /proc/cpuinfo"
msgstr "δεν ευÏέθη το cpu MHz στο /proc/cpuinfo"
-#: libs/ardour/destructive_filesource.cc:187
+#: libs/ardour/destructive_filesource.cc:188
msgid "DestructiveFileSource: \"%1\" bad read retval: %2 of %5 (%3: %4)"
msgstr ""
-#: libs/ardour/destructive_filesource.cc:200
-#: libs/ardour/destructive_filesource.cc:242
-#: libs/ardour/destructive_filesource.cc:249
+#: libs/ardour/destructive_filesource.cc:201
+#: libs/ardour/destructive_filesource.cc:243
+#: libs/ardour/destructive_filesource.cc:250
#, fuzzy
msgid "DestructiveFileSource: \"%1\" bad write (%2)"
msgstr "FileSource: \"%1\" κακή εγγÏαφή (%2)"
-#: libs/ardour/globals.cc:108
+#: libs/ardour/globals.cc:109
msgid "no MIDI ports specified: no MMC or MTC control possible"
msgstr "καμία MIDI θÏÏα δεν επελέχθη: έλεγχος MMC ή MTC αδÏνατος"
-#: libs/ardour/globals.cc:123
+#: libs/ardour/globals.cc:124
msgid "MIDI port specifications for \"%1\" are not understandable."
msgstr "Οι Ï€ÏοδιαγÏαφές της θÏÏας MIDI για το \"%1\" δεν είναι κατανοητές."
-#: libs/ardour/globals.cc:136 libs/ardour/globals.cc:140
-#: libs/ardour/globals.cc:144
+#: libs/ardour/globals.cc:137 libs/ardour/globals.cc:141
+#: libs/ardour/globals.cc:145
msgid "default"
msgstr "Ï€ÏοκαθοÏισμένο"
-#: libs/ardour/globals.cc:172
+#: libs/ardour/globals.cc:173
msgid "No MMC control (MIDI port \"%1\" not available)"
msgstr "ΧωÏίς έλεγχο MMC (θÏÏα MIDI \"%1\" μη διαθέσιμη)"
-#: libs/ardour/globals.cc:178
+#: libs/ardour/globals.cc:179
msgid "No MTC support (MIDI port \"%1\" not available)"
msgstr "ΧωÏίς έλεγχο MTC (θÏÏα MIDI \"%1\" μη διαθέσιμη)"
-#: libs/ardour/globals.cc:183
+#: libs/ardour/globals.cc:184
#, fuzzy
msgid "No MIDI parameter support (MIDI port \"%1\" not available)"
msgstr "ΧωÏίς έλεγχο MTC (θÏÏα MIDI \"%1\" μη διαθέσιμη)"
-#: libs/ardour/import.cc:74
+#: libs/ardour/import.cc:75
msgid "Import: cannot open input sound file \"%1\""
msgstr "Εισαγωγή: δεν μποÏÏŽ να ανοίξω το εισαγμένο αÏχείο ήχου \"%1\""
-#: libs/ardour/import.cc:79
+#: libs/ardour/import.cc:80
msgid "resampling audio"
msgstr "επανά-ληψη(resampling) ήχου"
-#: libs/ardour/import.cc:83
+#: libs/ardour/import.cc:84
msgid "Import: cannot open converted sound file \"%1\""
msgstr "Εισαγωγή: δεν μποÏÏŽ να ανοίξω το Ï„Ïοποποιημένο αÏχείο ήχου \"%1\""
-#: libs/ardour/import.cc:88
+#: libs/ardour/import.cc:89
msgid "Import: error while resampling sound file \"%1\""
msgstr "Εισαγωγή: σφάλμα κατά την Ï„Ïοποποίηση αÏχείου \"%1\""
-#: libs/ardour/import.cc:147
+#: libs/ardour/import.cc:148
msgid "Session::import_audiofile: cannot open new file source for channel %1"
msgstr ""
"ΣυνεδÏία::εισαγωγή_αÏχείου: δεν μποÏÏŽ να ανοίξω νέα πηγή αÏχείου για το "
"κανάλι %1"
-#: libs/ardour/import.cc:166
+#: libs/ardour/import.cc:167
msgid "converting audio"
msgstr "μετατÏοπή ήχου"
-#: libs/ardour/import.cc:198
+#: libs/ardour/import.cc:199
msgid "building region"
msgstr "χτίσιμο πεÏιοχής"
-#: libs/ardour/import.cc:200
+#: libs/ardour/import.cc:201
msgid "building regions"
msgstr "χτίσιμο πεÏιοχών"
-#: libs/ardour/import.cc:324
+#: libs/ardour/import.cc:325
msgid "Import: could not open temp file: %1"
msgstr "Εισαγωγή: δεν μπόÏεσα να ανοίξω το temp αÏχείο: %1"
-#: libs/ardour/import.cc:333
+#: libs/ardour/import.cc:334
msgid "Import: src_new() failed : %1"
msgstr "Εισαγωγή: src_new() απέτυχε : %1"
-#: libs/ardour/import.cc:361
+#: libs/ardour/import.cc:362
msgid "Import: %1"
msgstr "Εισαγωγή: %1"
@@ -747,153 +747,153 @@ msgstr "PortInsert: δεν μποÏεί να Ï€Ïοστεθεί θÏÏα εξόÎ
msgid "non-port insert XML used for port plugin insert"
msgstr "εισαγωγή μη-θÏÏας XML για χÏήση σε εισαγωγή plugin θÏÏας"
-#: libs/ardour/io.cc:597
+#: libs/ardour/io.cc:598
msgid "IO: cannot disconnect input port %1 from %2"
msgstr "IO: δεν μποÏει να αποσυνδεθεί η θÏÏα εισόδου %1 από %2"
-#: libs/ardour/io.cc:665
+#: libs/ardour/io.cc:666
msgid "IO: cannot disconnect output port %1 from %2"
msgstr "IO: δεν μποÏεί να αποσυνδεθεί η θÏÏα εξόδου %1 από %2"
-#: libs/ardour/io.cc:806 libs/ardour/io.cc:1150 libs/ardour/io.cc:1276
+#: libs/ardour/io.cc:807 libs/ardour/io.cc:1151 libs/ardour/io.cc:1277
#, c-format
msgid "%s/out"
msgstr "%s/out"
-#: libs/ardour/io.cc:808 libs/ardour/io.cc:1152 libs/ardour/io.cc:1278
-#: libs/ardour/io.cc:2848
+#: libs/ardour/io.cc:809 libs/ardour/io.cc:1153 libs/ardour/io.cc:1279
+#: libs/ardour/io.cc:2849
#, c-format
msgid "%s/out %u"
msgstr "%s/out %u"
-#: libs/ardour/io.cc:812 libs/ardour/io.cc:1157 libs/ardour/io.cc:1282
+#: libs/ardour/io.cc:813 libs/ardour/io.cc:1158 libs/ardour/io.cc:1283
msgid "IO: cannot register output port %1"
msgstr "IO: δεν μποÏει να καταχώÏηθεί η θÏÏα εξόδου %1"
-#: libs/ardour/io.cc:907 libs/ardour/io.cc:1010 libs/ardour/io.cc:1116
+#: libs/ardour/io.cc:908 libs/ardour/io.cc:1011 libs/ardour/io.cc:1117
#, c-format
msgid "%s/in"
msgstr "%s/in"
-#: libs/ardour/io.cc:909 libs/ardour/io.cc:1013 libs/ardour/io.cc:1119
-#: libs/ardour/io.cc:2818
+#: libs/ardour/io.cc:910 libs/ardour/io.cc:1014 libs/ardour/io.cc:1120
+#: libs/ardour/io.cc:2819
#, c-format
msgid "%s/in %u"
msgstr "%s/in %u"
-#: libs/ardour/io.cc:913 libs/ardour/io.cc:1019 libs/ardour/io.cc:1124
+#: libs/ardour/io.cc:914 libs/ardour/io.cc:1020 libs/ardour/io.cc:1125
msgid "IO: cannot register input port %1"
msgstr "IO: δεν μποÏεί να καταχώÏηθεί η θÏÏα εισόδου %1"
-#: libs/ardour/io.cc:1540
+#: libs/ardour/io.cc:1541
msgid "IO::connecting_became_legal() called without a pending state node"
msgstr ""
"IO::connecting_became_legal() εκλήθη χωÏίς κόμβο καταστάσεως εν αναμονή"
-#: libs/ardour/io.cc:1563
+#: libs/ardour/io.cc:1564
msgid "IO::ports_became_legal() called without a pending state node"
msgstr "IO::ports_became_legal() εκλήθη χωÏίς κόμβο καταστάσεως εν αναμονή"
-#: libs/ardour/io.cc:1593
+#: libs/ardour/io.cc:1594
msgid "incorrect XML node \"%1\" passed to IO object"
msgstr "μη-σωστός κόμβος XML \"%1\" πέÏασε στο IO αντικείμενο"
-#: libs/ardour/io.cc:1648
+#: libs/ardour/io.cc:1649
msgid ""
"MIDI gain control specification for %1 is incomplete, so it has been ignored"
msgstr ""
"Η Ï€ÏοδιαγÏαφή ελέγχου του MIDI gain για το %1 είναι ημιτελής, με αποτέλεσμα "
"να αγνοηθεί"
-#: libs/ardour/io.cc:1738 libs/ardour/io.cc:1850
+#: libs/ardour/io.cc:1739 libs/ardour/io.cc:1851
msgid "Unknown connection \"%1\" listed for output of %2"
msgstr "Άγνωστη σÏνδεση \"%1\" καταχωÏήθη για την έξοδο του %2"
-#: libs/ardour/io.cc:1740 libs/ardour/io.cc:1852
+#: libs/ardour/io.cc:1741 libs/ardour/io.cc:1853
#, fuzzy
msgid "out 1"
msgstr "out %lu"
-#: libs/ardour/io.cc:1741 libs/ardour/io.cc:1853
+#: libs/ardour/io.cc:1742 libs/ardour/io.cc:1854
msgid "No output connections available as a replacement"
msgstr ""
-#: libs/ardour/io.cc:1745 libs/ardour/io.cc:1857
+#: libs/ardour/io.cc:1746 libs/ardour/io.cc:1858
msgid "Connection %1 was not available - \"out 1\" used instead"
msgstr ""
-#: libs/ardour/io.cc:1759
+#: libs/ardour/io.cc:1760
msgid "%1: cannot create I/O ports"
msgstr "%1: θÏÏες I/O δεν μποÏοÏν να δημιουÏγηθοÏν"
-#: libs/ardour/io.cc:1866
+#: libs/ardour/io.cc:1867
msgid "improper output channel list in XML node (%1)"
msgstr "ασαφής λίστα καναλιών εξόδου στον κόμβο XML (%1)"
-#: libs/ardour/io.cc:1951
+#: libs/ardour/io.cc:1952
msgid "IO: badly formed string in XML node for outputs \"%1\""
msgstr "IO: δÏσμοÏφη γÏαμμή στον κόμβο XML για τις εξόδους \"%1\""
-#: libs/ardour/io.cc:1956
+#: libs/ardour/io.cc:1957
msgid "IO: bad output string in XML node \"%1\""
msgstr "IO: κακή γÏαμμή εξόδουστον κόμβο XML \"%1\""
-#: libs/ardour/io.cc:2524
+#: libs/ardour/io.cc:2525
msgid "%1: could not open automation event file \"%2\""
msgstr "%1: δεν μπόÏεσα να ανοίξω το αÏχείο συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï \"%2\""
-#: libs/ardour/io.cc:2563
+#: libs/ardour/io.cc:2564
msgid "%1: cannot open automation event file \"%2\""
msgstr "%1: δεν μποÏÏŽ να ανοίξω το αÏχείο συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï \"%2\""
-#: libs/ardour/io.cc:2578
+#: libs/ardour/io.cc:2579
msgid "badly formed version number in automation event file \"%1\""
msgstr "δÏσμοÏφος αÏιθμός εκδόσεως στο αÏχείο συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï \"%1\""
-#: libs/ardour/io.cc:2582
+#: libs/ardour/io.cc:2583
msgid "no version information in automation event file \"%1\""
msgstr ""
"δεν υπάÏχουν πληÏοφοÏίες πεÏί εκδόσεων στο αÏχείο συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï \"%1"
"\""
-#: libs/ardour/io.cc:2587
+#: libs/ardour/io.cc:2588
msgid "mismatched automation event file version (%1)"
msgstr "αταίÏιαστη έκδοση αÏχείου συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï (%1)"
-#: libs/ardour/io.cc:2595
+#: libs/ardour/io.cc:2596
msgid "badly formatted automation event record at line %1 of %2 (ignored)"
msgstr ""
"κακώς φοÏμαÏισμένη καταγÏαφή συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï ÏƒÏ„Î· γÏαμμή %1 of %2 "
"(αγνοήθηκε)"
-#: libs/ardour/io.cc:2615
+#: libs/ardour/io.cc:2616
msgid "dubious automation event found (and ignored)"
msgstr "αβέβαιο συμβάν Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï ÎµÏ…Ïέθηκε (και αγνοήθηκε)"
-#: libs/ardour/io.cc:2619 libs/ardour/panner.cc:438
+#: libs/ardour/io.cc:2620 libs/ardour/panner.cc:438
#: libs/ardour/redirect.cc:148
msgid "loaded from disk"
msgstr "φοÏτώθηκε από το δίσκο"
-#: libs/ardour/io.cc:2790
+#: libs/ardour/io.cc:2791
msgid "automation write/touch"
msgstr "αυτοματισμός εγγÏαφή/αφή(write/touch)"
-#: libs/ardour/ladspa_plugin.cc:86
+#: libs/ardour/ladspa_plugin.cc:87
msgid "LADSPA: module has no descriptor function."
msgstr "LADSPA: το module δεν έχει ενδεικτική λειτουÏγία."
-#: libs/ardour/ladspa_plugin.cc:91
+#: libs/ardour/ladspa_plugin.cc:92
msgid "LADSPA: plugin has gone away since discovery!"
msgstr "LADSPA: το plugin την 'κοπάνισε' μετά την ανακάλυψη του!"
-#: libs/ardour/ladspa_plugin.cc:98
+#: libs/ardour/ladspa_plugin.cc:99
msgid "LADSPA: \"%1\" cannot be used, since it cannot do inplace processing"
msgstr ""
"LADSPA: \"%1\" δεν μποÏεί να χÏησιμοποιηθεί, εφ'όσον δεν μποÏεί να κάνει επι "
"τόπου επεξεÏγασία"
-#: libs/ardour/ladspa_plugin.cc:328
+#: libs/ardour/ladspa_plugin.cc:329
msgid ""
"illegal parameter number used with plugin \"%1\". This mayindicate a change "
"in the plugin design, and presets may beinvalid"
@@ -902,20 +902,20 @@ msgstr ""
"ενδείκνυται αλλαγή στο σχεδιασμό του plugin, και οι Ïυθμίσεις ίσως να είναι "
"άκυÏες"
-#: libs/ardour/ladspa_plugin.cc:429
+#: libs/ardour/ladspa_plugin.cc:430
#, fuzzy
msgid "Bad node sent to LadspaPlugin::set_state"
msgstr "Κακή αποστολή κόμβου εστάλη στο LadspaPlugin::set_state"
-#: libs/ardour/ladspa_plugin.cc:442
+#: libs/ardour/ladspa_plugin.cc:443
msgid "LADSPA: no ladspa port number"
msgstr "LADSPA: κανείς αÏιθμός θÏÏας ladspa"
-#: libs/ardour/ladspa_plugin.cc:448
+#: libs/ardour/ladspa_plugin.cc:449
msgid "LADSPA: no ladspa port data"
msgstr "LADSPA: κανένα δεδομένο θÏÏας ladspa"
-#: libs/ardour/ladspa_plugin.cc:497
+#: libs/ardour/ladspa_plugin.cc:498
msgid ""
"LADSPA LadspaPlugin MIDI control specification for port %1 is incomplete, so "
"it has been ignored"
@@ -923,66 +923,66 @@ msgstr ""
"Ο καθοÏισμός ελέγχου LADSPA LadspaPlugin για MIDI για την θÏÏα %1 είναι "
"ημιτελής, έτσι αγνοήθηκε."
-#: libs/ardour/location.cc:268
+#: libs/ardour/location.cc:269
msgid "incorrect XML node passed to Location::set_state"
msgstr "λανθασμένος κόμβος XML πέÏασε στην Τοποθεσία::set_state"
-#: libs/ardour/location.cc:275
+#: libs/ardour/location.cc:276
msgid "XML node for Location has no name information"
msgstr "Ο κόμβος XML για την Τοποθεσία δεν έχει πληÏοφοÏίες ονόματος"
-#: libs/ardour/location.cc:282
+#: libs/ardour/location.cc:283
msgid "XML node for Location has no start information"
msgstr "Ο κόμβος XML για την Τοποθεσία δεν έχει πληÏοφοÏίες ενάÏξεως"
-#: libs/ardour/location.cc:293
+#: libs/ardour/location.cc:294
msgid "XML node for Location has no end information"
msgstr "Ο κόμβος XML για την Τοποθεσία δεν έχει πληÏοφοÏίες τέλους"
-#: libs/ardour/location.cc:302
+#: libs/ardour/location.cc:303
msgid "XML node for Location has no flags information"
msgstr "Ο κόμβος XML για την Τοποθεσία δεν έχει πληÏοφοÏίες για σημαίες(flags)"
-#: libs/ardour/location.cc:390
+#: libs/ardour/location.cc:391
msgid "Locations: attempt to use unknown location as selected location"
msgstr ""
"Τοποθεσίες: απόπειÏα να χÏησιμοποιηθεί άγνωστη τοποθεσία σαν επιλεγμένη "
"τοποθεσία"
-#: libs/ardour/location.cc:417 libs/ardour/playlist.cc:1187
+#: libs/ardour/location.cc:418 libs/ardour/playlist.cc:1187
msgid "clear"
msgstr "εκκαθάÏιση"
-#: libs/ardour/location.cc:442
+#: libs/ardour/location.cc:443
msgid "clear markers"
msgstr "εκκαθάÏιση στιγμάτων"
-#: libs/ardour/location.cc:470
+#: libs/ardour/location.cc:471
msgid "clear ranges"
msgstr "εκκαθάÏιση διαστημάτων"
-#: libs/ardour/location.cc:488
+#: libs/ardour/location.cc:489
msgid "add"
msgstr "Ï€Ïόσθεση"
-#: libs/ardour/location.cc:526
+#: libs/ardour/location.cc:527
msgid "remove"
msgstr "απαλοιφή"
-#: libs/ardour/location.cc:566
+#: libs/ardour/location.cc:567
msgid "incorrect XML mode passed to Locations::set_state"
msgstr "λανθασμένο XML mode πέÏασε στις Τοποθεσίες::set_state"
-#: libs/ardour/mtc_slave.cc:195
+#: libs/ardour/mtc_slave.cc:196
msgid "MTC Slave: atomic read of current time failed, sleeping!"
msgstr ""
"MTC Slave: ατομική ανάγνωση του Ï„Ïέχοντος χÏόνου απέτυχε, πίσω για Ïπνο!"
-#: libs/ardour/named_selection.cc:76
+#: libs/ardour/named_selection.cc:77
msgid "Chunk %1 uses an unknown playlist \"%2\""
msgstr "Το κομμάτι %1 χÏησιμοποιεί άγνωστη λίστα αναπαÏ/γής \"%2\""
-#: libs/ardour/named_selection.cc:79
+#: libs/ardour/named_selection.cc:80
msgid "Chunk %1 contains misformed playlist information"
msgstr "Το κομμάτι %1 πεÏιέχει δÏσμοÏφες πληÏοφοÏίες για τη λίστα αναπαÏ/γής"
@@ -1102,63 +1102,63 @@ msgstr "Playlist: δεν μποÏÏŽ να δημιουÏγήσω ΠεÏιοχή Î
msgid "nudged"
msgstr "νυχθέν"
-#: libs/ardour/playlist_factory.cc:26 libs/ardour/playlist_factory.cc:41
+#: libs/ardour/playlist_factory.cc:49 libs/ardour/playlist_factory.cc:64
msgid ""
"programming error: Playlist::createRegion called with unknown Region type"
msgstr ""
"σφάλμα Ï€ÏογÏαμματισμοÏ: Playlist::createRegion εκλήθη με άγνωστο Ï„Ïπο Πε"
-#: libs/ardour/playlist_factory.cc:63
+#: libs/ardour/playlist_factory.cc:86
msgid ""
"programming error: Playlist::copyPlaylist called with unknown Playlist type"
msgstr ""
"σφάλμα Ï€ÏογÏαμματισμοÏ: Playlist::copyPlaylist με άγνωστο Ï„Ïπο Playlist"
-#: libs/ardour/plugin.cc:327
+#: libs/ardour/plugin.cc:328
msgid "Could not locate HOME. Preset not saved."
msgstr "Δεν μπόÏεσα να βÏÏŽ το HOME. ΠÏο-ÏÏθμιση δεν αποθηκεÏθηκε."
-#: libs/ardour/plugin.cc:337 libs/ardour/plugin.cc:343
+#: libs/ardour/plugin.cc:338 libs/ardour/plugin.cc:344
msgid "Could not create %1. Preset not saved. (%2)"
msgstr "Δεν μπόÏεσα να δημιουÏγήσω το %1. ΠÏο-ÏÏθμιση δεν αποθηκεÏθηκε. (%2)"
-#: libs/ardour/plugin.cc:348
+#: libs/ardour/plugin.cc:349
msgid "Error saving presets file %1."
msgstr "Σφάλμα στην αποθήκευση αÏχείου Ï€Ïο-Ïυθμίσεων %1."
-#: libs/ardour/plugin_manager.cc:193
+#: libs/ardour/plugin_manager.cc:194
msgid "Could not parse rdf file: %1"
msgstr "Δεν μπόÏεσα να αναλÏσω το αÏχείο rdf: %1"
-#: libs/ardour/plugin_manager.cc:234
+#: libs/ardour/plugin_manager.cc:235
msgid "LADSPA: cannot load module \"%1\" (%2)"
msgstr "LADSPA: δεν μποÏÏŽ να φοÏτώσω το module \"%1\" (%2)"
-#: libs/ardour/plugin_manager.cc:241
+#: libs/ardour/plugin_manager.cc:242
msgid "LADSPA: module \"%1\" has no descriptor function."
msgstr "LADSPA: το module \"%1\" δεν έχει λειτουÏγία πεÏιγÏαφής."
-#: libs/ardour/plugin_manager.cc:296
+#: libs/ardour/plugin_manager.cc:297
msgid "VST: cannot load module from \"%1\""
msgstr "VST: δεν μποÏÏŽ να φοÏτώσω module από \"%1\""
-#: libs/ardour/plugin_manager.cc:301
+#: libs/ardour/plugin_manager.cc:302
msgid "You asked ardour to not use any VST plugins"
msgstr ""
-#: libs/ardour/plugin_manager.cc:304
+#: libs/ardour/plugin_manager.cc:305
msgid "This version of ardour has no support for VST plugins"
msgstr "Η παÏοÏσα έκδοση του ardour δεν υποστηÏίζει VST plugins"
-#: libs/ardour/plugin_manager.cc:311
+#: libs/ardour/plugin_manager.cc:312
msgid "LADSPA: cannot load module from \"%1\""
msgstr "LADSPA: δεν μποÏÏŽ να φοÏτώσω module από \"%1\""
-#: libs/ardour/plugin_manager.cc:373 libs/ardour/plugin_manager.cc:385
+#: libs/ardour/plugin_manager.cc:374 libs/ardour/plugin_manager.cc:386
msgid "Unknown"
msgstr "Άγνωστο"
-#: libs/ardour/plugin_manager.cc:463
+#: libs/ardour/plugin_manager.cc:464
msgid ""
"VST plugin %1 does not support processReplacing, and so cannot be used in "
"ardour at this time"
@@ -1174,11 +1174,11 @@ msgstr "δεν μποÏÏŽ να ανοίξω το Ï€Ïόσφατο αÏχείο Ï
msgid "programming error: unknown Redirect type in Redirect::Clone!\n"
msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: άγνωστος Ï„Ïπος Redirect στο Redirect::Clone!\n"
-#: libs/ardour/redirect.cc:102 libs/ardour/utils.cc:202
+#: libs/ardour/redirect.cc:102 libs/ardour/utils.cc:203
msgid "pre"
msgstr "pre"
-#: libs/ardour/redirect.cc:104 libs/ardour/utils.cc:205
+#: libs/ardour/redirect.cc:104 libs/ardour/utils.cc:206
msgid "post"
msgstr "post"
@@ -1235,11 +1235,11 @@ msgstr ""
msgid "active_changed"
msgstr "αλλαγή_ενεÏγοÏ"
-#: libs/ardour/region.cc:884
+#: libs/ardour/region.cc:885
msgid "Session: XMLNode describing a Region is incomplete (no id)"
msgstr "ΣυνεδÏία: XMLΚόμβος που πεÏιγÏάφει ΠεÏιοχή είναι ημιτελής (χωÏίς id)"
-#: libs/ardour/region.cc:891
+#: libs/ardour/region.cc:892
msgid "Session: XMLNode describing a Region is incomplete (no name)"
msgstr ""
"ΣυνεδÏία: XMLΚόμβος που πεÏιγÏάφει ΠεÏιοχή είναι ημιτελής (χωÏίς όνομα)"
@@ -1303,7 +1303,7 @@ msgstr ""
"Η Ï€ÏοδιαγÏαφή ελέγχου του MIDI gain για το %1 είναι ημιτελής, με αποτέλεσμα "
"να αγνοηθεί"
-#: libs/ardour/send.cc:98
+#: libs/ardour/send.cc:99
msgid "XML node describing a send is missing a Redirect node"
msgstr "Στον κόμβο XML όπου πεÏιγÏάφεται ένα send λείπει ένας κόμβος Redirect"
@@ -1447,11 +1447,11 @@ msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: άγνωστος Ï„Ïπος
msgid "programming error: unknown type of Redirect deleted!"
msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: άγνωστος Ï„Ïπος of Redirect διεγÏάφη!"
-#: libs/ardour/session.cc:3634
+#: libs/ardour/session.cc:3636
msgid "too many bounced versions of playlist \"%1\""
msgstr "πάÏα πολλές bounced εκδόσεις της Playlist \"%1\""
-#: libs/ardour/session.cc:3647
+#: libs/ardour/session.cc:3649
msgid "cannot create new audio file \"%1\" for %2"
msgstr "δεν μποÏÏŽ να δημιουÏγήσω νέο αÏχείο ήχου \"%1\" για %2"
@@ -1486,19 +1486,19 @@ msgstr "Αποτυχία Ï€Ïοανάγνωσης Butler στο dstream %1"
msgid "Butler write-behind failure on dstream %1"
msgstr "Αποτυχία οπισθεγγÏαφής Butler στο dstream %1"
-#: libs/ardour/session_click.cc:157
+#: libs/ardour/session_click.cc:158
msgid "cannot open click soundfile %1 (%2)"
msgstr "δεν μποÏÏŽ να ανοίξω τοsoundfile μετÏονόμου%1 (%2)"
-#: libs/ardour/session_click.cc:166
+#: libs/ardour/session_click.cc:167
msgid "cannot read data from click soundfile"
msgstr "δεν μποÏÏŽ να διαβάσω δεδομένα από το soundfile μετÏονόμου"
-#: libs/ardour/session_click.cc:191
+#: libs/ardour/session_click.cc:192
msgid "cannot open click emphasis soundfile %1 (%2)"
msgstr "δεν μποÏÏŽ να ανοίξω το soundfile εμφάσεως μετÏονόμου %1 (%2)"
-#: libs/ardour/session_click.cc:199
+#: libs/ardour/session_click.cc:200
msgid "cannot read data from click emphasis soundfile"
msgstr "δεν μποÏÏŽ να διαβάσω δεδομένα από το soundfile εμφάσεως μετÏονόμου"
@@ -1607,168 +1607,168 @@ msgstr "Σφάλμα στην ανάγνωση από transport request pipe"
msgid "Session: error in no roll for %1"
msgstr "ΣυνεδÏία: σφάλμα στο no roll για %1"
-#: libs/ardour/session_state.cc:100
+#: libs/ardour/session_state.cc:101
#, fuzzy
msgid "Could not use path %1 (%s)"
msgstr "Source: δεν μποÏÏŽ να ανοίξω το peakpath \"%1\" (%2)"
-#: libs/ardour/session_state.cc:128
+#: libs/ardour/session_state.cc:129
msgid "end"
msgstr "τέλος"
-#: libs/ardour/session_state.cc:129
+#: libs/ardour/session_state.cc:130
#, fuzzy
msgid "start"
msgstr "ξεχωÏιστό"
-#: libs/ardour/session_state.cc:501
+#: libs/ardour/session_state.cc:502
msgid "Session: cannot create session dir \"%1\" (%2)"
msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω φάκελο συνεδÏίας \"%1\" (%2)"
-#: libs/ardour/session_state.cc:512
+#: libs/ardour/session_state.cc:513
#, fuzzy
msgid "Session: cannot create session peakfile dir \"%1\" (%2)"
msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω φάκελο συνεδÏίας \"%1\" (%2)"
-#: libs/ardour/session_state.cc:521
+#: libs/ardour/session_state.cc:522
msgid "Session: cannot create session sounds dir \"%1\" (%2)"
msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω φάκελο ήχων συνεδÏίας \"%1\" (%2)"
-#: libs/ardour/session_state.cc:530
+#: libs/ardour/session_state.cc:531
#, fuzzy
msgid "Session: cannot create session tape dir \"%1\" (%2)"
msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω φάκελο συνεδÏίας \"%1\" (%2)"
-#: libs/ardour/session_state.cc:539
+#: libs/ardour/session_state.cc:540
msgid "Session: cannot create session dead sounds dir \"%1\" (%2)"
msgstr ""
"ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω φάκελο 'νεκÏών' ήχων συνεδÏίας \"%1\" (%2)"
-#: libs/ardour/session_state.cc:548
+#: libs/ardour/session_state.cc:549
msgid "Session: cannot create session automation dir \"%1\" (%2)"
msgstr ""
"ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω φάκελο αυτοματισμών της συνεδÏίας \"%1"
"\" (%2)"
-#: libs/ardour/session_state.cc:579
+#: libs/ardour/session_state.cc:580
msgid "Could not open %1 for writing mix template"
msgstr "Δεν μπόÏεσα να ανοίξω %1 για γÏάψιμο του Ï€Ïοσχεδίου μίξεως"
-#: libs/ardour/session_state.cc:585
+#: libs/ardour/session_state.cc:586
msgid "Could not open mix template %1 for reading"
msgstr "Δεν μπόÏεσα να ανοίξω Ï€Ïοσχέδιο μίξεως %1 για ανάγνωση"
-#: libs/ardour/session_state.cc:592
+#: libs/ardour/session_state.cc:593
msgid "Session already exists. Not overwriting"
msgstr "Η ΣυνεδÏία ήδη υπάÏχει. ΑκÏÏωση overwriting"
-#: libs/ardour/session_state.cc:635
+#: libs/ardour/session_state.cc:636
msgid "Session: could not load diskstream via XML state"
msgstr "ΣυνεδÏία: δεν μπόÏεσα να φοÏτώσω diskstream μέσω καταστάσεως XML"
-#: libs/ardour/session_state.cc:684
+#: libs/ardour/session_state.cc:685
msgid "could not backup old state file, current state not saved."
msgstr ""
"δεν μπόÏεσα να διασώσω το παλαιό αÏχείο καταστάσεως, η Ï„Ïέχουσα κατάσταση "
"δεν αποθηκεÏτηκε."
-#: libs/ardour/session_state.cc:697
+#: libs/ardour/session_state.cc:698
msgid "state could not be saved to %1"
msgstr "η κατάσταση δεν μποÏοÏσε να σωθεί στο %1"
-#: libs/ardour/session_state.cc:704
+#: libs/ardour/session_state.cc:705
#, fuzzy
msgid "could not remove corrupt state file %1"
msgstr "Δεν μπόÏεσα να αναλÏσω το αÏχείο rdf: %1"
-#: libs/ardour/session_state.cc:708
+#: libs/ardour/session_state.cc:709
#, fuzzy
msgid "could not restore state file from backup %1"
msgstr "Σφάλμα: δεν μπόÏεσα να γÏάψω %1"
-#: libs/ardour/session_state.cc:777
+#: libs/ardour/session_state.cc:778
msgid "%1: session state information file \"%2\" doesn't exist!"
msgstr "%1: το αÏχείο πληÏοφοÏιών καταστάσεως συνεδÏίας \"%2\" δεν υπάÏχει!"
-#: libs/ardour/session_state.cc:788
+#: libs/ardour/session_state.cc:789
msgid "Could not understand ardour file %1"
msgstr "Δεν μπόÏεσα να κατανοήσω το ardour αÏχείο %1"
-#: libs/ardour/session_state.cc:1492
+#: libs/ardour/session_state.cc:1493
msgid "programming error: Session: incorrect XML node sent to set_state()"
msgstr ""
"σφάλμα Ï€ÏογÏαμματισμοÏ: ΣυνεδÏία: λανθασμένος κόμβος XML εστάλη στην "
"set_state()"
-#: libs/ardour/session_state.cc:1538
+#: libs/ardour/session_state.cc:1539
msgid "Session: XML state has no options section"
msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα επιλογών(options)"
-#: libs/ardour/session_state.cc:1543
+#: libs/ardour/session_state.cc:1544
msgid "Session: XML state has no sources section"
msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα πηγών"
-#: libs/ardour/session_state.cc:1550
+#: libs/ardour/session_state.cc:1551
msgid "Session: XML state has no Regions section"
msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα ΠεÏιοχών"
-#: libs/ardour/session_state.cc:1557
+#: libs/ardour/session_state.cc:1558
msgid "Session: XML state has no playlists section"
msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα playlists"
-#: libs/ardour/session_state.cc:1576
+#: libs/ardour/session_state.cc:1577
msgid "Session: XML state has no diskstreams section"
msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα diskstreams"
-#: libs/ardour/session_state.cc:1583
+#: libs/ardour/session_state.cc:1584
msgid "Session: XML state has no connections section"
msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα συνδέσεων"
-#: libs/ardour/session_state.cc:1590
+#: libs/ardour/session_state.cc:1591
msgid "Session: XML state has no locations section"
msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα τοποθεσιών"
-#: libs/ardour/session_state.cc:1623
+#: libs/ardour/session_state.cc:1624
msgid "Session: XML state has no edit groups section"
msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα επεξεÏ/σίας ομάδων"
-#: libs/ardour/session_state.cc:1630
+#: libs/ardour/session_state.cc:1631
msgid "Session: XML state has no mix groups section"
msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα μίξεως ομάδων"
-#: libs/ardour/session_state.cc:1637
+#: libs/ardour/session_state.cc:1638
msgid "Session: XML state has no Tempo Map section"
msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα Tempo Map"
-#: libs/ardour/session_state.cc:1644
+#: libs/ardour/session_state.cc:1645
msgid "Session: XML state has no routes section"
msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα διαδÏομών"
-#: libs/ardour/session_state.cc:1651
+#: libs/ardour/session_state.cc:1652
msgid "Session: XML state has no click section"
msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα μετÏονόμου"
-#: libs/ardour/session_state.cc:1696
+#: libs/ardour/session_state.cc:1697
msgid "Session: cannot create Route from XML description."
msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω ΔιαδÏομή από XML πεÏιγÏαφή."
-#: libs/ardour/session_state.cc:1734
+#: libs/ardour/session_state.cc:1735
msgid "Session: cannot create Region from XML description."
msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω ΠεÏιοχή από XML πεÏιγÏαφή."
-#: libs/ardour/session_state.cc:1763
+#: libs/ardour/session_state.cc:1764
msgid "Session: XMLNode describing a AudioRegion is incomplete (no source)"
msgstr ""
"ΣυνεδÏία: Ο XMLΚόμβος που πεÏιγÏάφει AudioΠεÏιοχή είναι ημιτελής (δίχως πηγή)"
-#: libs/ardour/session_state.cc:1771 libs/ardour/session_state.cc:1791
+#: libs/ardour/session_state.cc:1772 libs/ardour/session_state.cc:1792
msgid ""
"Session: XMLNode describing a AudioRegion references an unknown source id =%1"
msgstr ""
"ΣυνεδÏία: Ο XMLΚόμβος που πεÏιγÏάφει AudioΠεÏιοχή αναφέÏει άγνωστο id πηγής ="
"%1"
-#: libs/ardour/session_state.cc:1777 libs/ardour/session_state.cc:1797
+#: libs/ardour/session_state.cc:1778 libs/ardour/session_state.cc:1798
#, fuzzy
msgid ""
"Session: XMLNode describing a AudioRegion references a non-audio source id =%"
@@ -1777,11 +1777,11 @@ msgstr ""
"ΣυνεδÏία: Ο XMLΚόμβος που πεÏιγÏάφει AudioΠεÏιοχή αναφέÏει άγνωστο id πηγής ="
"%1"
-#: libs/ardour/session_state.cc:1867
+#: libs/ardour/session_state.cc:1868
msgid "Session: cannot create Source from XML description."
msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω Πηγή από XML πεÏιγÏαφή."
-#: libs/ardour/session_state.cc:1888
+#: libs/ardour/session_state.cc:1889
#, fuzzy
msgid ""
"Found a sound file that cannot be used by Ardour. Talk to the progammers."
@@ -1789,85 +1789,85 @@ msgstr ""
"Î’Ïήκα ένα sound file που δεν μποÏεί να χÏησιμοποιηθεί από τον Ardour. "
"Επικοινωνήστε με τους Ï€ÏογÏαμματιστές."
-#: libs/ardour/session_state.cc:1912
+#: libs/ardour/session_state.cc:1913
msgid "Could not create mix templates directory \"%1\" (%2)"
msgstr "Δεν μπόÏεσα να δημιουÏγήσω φάκελο Ï€Ïοσχεδίων μίξεως \"%1\" (%2)"
-#: libs/ardour/session_state.cc:1926
+#: libs/ardour/session_state.cc:1927
msgid "Template \"%1\" already exists - new version not created"
msgstr "Το Ï€Ïοσχέδιο \"%1\" ήδη υπάÏχει - νέα έκδοση δεν δημιουÏγήθηκε"
-#: libs/ardour/session_state.cc:1933
+#: libs/ardour/session_state.cc:1934
msgid "mix template not saved"
msgstr "Ï€Ïοσχέδιο μίξεως δεν αποθηκεÏτηκε"
-#: libs/ardour/session_state.cc:1993
+#: libs/ardour/session_state.cc:1994
msgid "cannot create session directory \"%1\"; ignored"
msgstr "δεν μποÏÏŽ να δημιουÏγήσω φάκελο συνεδÏίας \"%1\"; αγνοήθηκε"
-#: libs/ardour/session_state.cc:2006
+#: libs/ardour/session_state.cc:2007
msgid "cannot create sounds directory \"%1\"; ignored"
msgstr "δεν μποÏÏŽ να δημιουÏγήσω τον φάκελο 'sounds' \"%1\"; αγνοήθηκε"
-#: libs/ardour/session_state.cc:2017
+#: libs/ardour/session_state.cc:2018
msgid "cannot create dead sounds directory \"%1\"; ignored"
msgstr "δεν μποÏÏŽ να δημιουÏγήσω τον φάκελο 'dead sounds' \"%1\"; αγνοήθηκε"
-#: libs/ardour/session_state.cc:2028
+#: libs/ardour/session_state.cc:2029
#, fuzzy
msgid "cannot create peak file directory \"%1\"; ignored"
msgstr "δεν μποÏÏŽ να δημιουÏγήσω φάκελο συνεδÏίας \"%1\"; αγνοήθηκε"
-#: libs/ardour/session_state.cc:2167 libs/ardour/session_state.cc:2188
+#: libs/ardour/session_state.cc:2168 libs/ardour/session_state.cc:2189
msgid "Session: cannot create Playlist from XML description."
msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω την Playlist από την XML πεÏιγÏαφή."
-#: libs/ardour/session_state.cc:2227
+#: libs/ardour/session_state.cc:2228
msgid "Session: cannot create Named Selection from XML description."
msgstr ""
"ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω την ονομασμένη επιλογή από την XML "
"πεÏιγÏαφή."
-#: libs/ardour/session_state.cc:2359
+#: libs/ardour/session_state.cc:2360
msgid "Unknown node \"%1\" found in Connections list from state file"
msgstr ""
"Άγνωστος κόμβος \"%1\" ευÏέθη στη λίστα 'Συνδέσεις' από το αÏχείο καταστάσεως"
-#: libs/ardour/session_state.cc:3196
+#: libs/ardour/session_state.cc:3197
msgid "cannot remove dead sound file %1 (%2)"
msgstr "δεν μποÏÏŽ να απαλοίψω το 'νεκÏο' ηχο-αÏχείο %1 (%2)"
-#: libs/ardour/session_time.cc:375
+#: libs/ardour/session_time.cc:374
msgid "Unknown JACK transport state %1 in sync callback"
msgstr "Άγνωστη κατάσταση του JACK transport %1 στην ανάκληση sync"
-#: libs/ardour/session_timefx.cc:76
+#: libs/ardour/session_timefx.cc:77
msgid "tempoize: error creating name for new audio file based on %1"
msgstr ""
"tempoize: σφάλμα στη δημιουÏγία ονόματος για νέο αÏχείο ήχου βασισμένο σε %1"
-#: libs/ardour/session_timefx.cc:87
+#: libs/ardour/session_timefx.cc:88
msgid "tempoize: error creating new audio file %1 (%2)"
msgstr "tempoize: σφάλμα στη δημιουÏγία νέου αÏχείου ήχου %1 (%2)"
-#: libs/ardour/session_timefx.cc:113
+#: libs/ardour/session_timefx.cc:114
msgid "tempoize: error reading data from %1"
msgstr "tempoize: σφάλμα στην ανάγνωση δεδομένων από %1"
-#: libs/ardour/session_timefx.cc:126 libs/ardour/session_timefx.cc:138
+#: libs/ardour/session_timefx.cc:127 libs/ardour/session_timefx.cc:139
msgid "error writing tempo-adjusted data to %1"
msgstr "σφάλμα στην εγγÏαφή χÏονο-Ïυθμισμένων δεδομένων στο %1"
-#: libs/ardour/session_timefx.cc:144
+#: libs/ardour/session_timefx.cc:145
msgid "timefx code failure. please notify ardour-developers."
msgstr ""
"αποτυχία κώδικα timefx. παÏακαλώ ειδοποιήστε τους Ï€ÏογÏαμματιστές του ardour."
-#: libs/ardour/session_transport.cc:116
+#: libs/ardour/session_transport.cc:117
msgid "Cannot loop - no loop range defined"
msgstr "Δεν γίνεται loop - κανένα διάστημα loop δεν Ï€ÏοσδιοÏίστηκε"
-#: libs/ardour/session_transport.cc:478
+#: libs/ardour/session_transport.cc:479
msgid ""
"Seamless looping cannot be supported while Ardour is using JACK transport.\n"
"Recommend changing the configured options"
@@ -1876,7 +1876,7 @@ msgstr ""
"transport.\n"
"ΣυνιστοÏμε την αλλαγή των διαμοÏφωμένων Ïυθμίσεων"
-#: libs/ardour/session_transport.cc:754
+#: libs/ardour/session_transport.cc:755
msgid ""
"Global varispeed cannot be supported while Ardour is connected to JACK "
"transport control"
@@ -1884,12 +1884,12 @@ msgstr ""
"Η Global varispeed δεν μποÏεί να υποστηÏιχθεί ενώ ο Ardour είναι "
"συνδεδεμένος με τον JACK transport control"
-#: libs/ardour/session_transport.cc:954
+#: libs/ardour/session_transport.cc:955
msgid "please stop the transport before adjusting slave settings"
msgstr ""
"παÏακαλώ σταματήστε το transport Ï€Ïιν την ÏÏθμιση των επιλογων εξαÏτήσεως"
-#: libs/ardour/session_transport.cc:990
+#: libs/ardour/session_transport.cc:991
msgid "No MTC port defined: MTC slaving is impossible."
msgstr ""
"Καμμία θÏÏα MTC δεν Ï€ÏοσδιοÏίστηκε: η εξάÏτηση του MTC (slaving) είναι "
@@ -1979,24 +1979,24 @@ msgstr "Little-endian (Intel)"
msgid "Big-endian (Mac)"
msgstr "Big-endian (Mac)"
-#: libs/ardour/sndfilesource.cc:145
+#: libs/ardour/sndfilesource.cc:147
msgid "FileSource: cannot get host information for BWF header (%1)"
msgstr ""
"FileSource: δεν μποÏÏŽ να βÏÏŽ πληÏοφοÏίες οικοδεσπότη(host) για επικεφαλίδα "
"BWF (%1)"
-#: libs/ardour/sndfilesource.cc:167
+#: libs/ardour/sndfilesource.cc:169
msgid ""
"cannot set broadcast info for audio file %1 (%2); dropping broadcast info "
"for this file"
msgstr ""
-#: libs/ardour/sndfilesource.cc:223
+#: libs/ardour/sndfilesource.cc:220
#, fuzzy
msgid "SndFileSource: cannot open file \"%1\" for %2 (%3)"
msgstr "SndFileSource: δεν μποÏÏŽ να ανοίξω το αÏχείο \"%1\" (%2)"
-#: libs/ardour/sndfilesource.cc:229
+#: libs/ardour/sndfilesource.cc:226
msgid ""
"SndFileSource: file only contains %1 channels; %2 is invalid as a channel "
"number"
@@ -2004,32 +2004,32 @@ msgstr ""
"SndFileSource: το αÏχείο πεÏιέχει μόνο %1 κανάλια; %2 δεν έχει αξία σαν "
"κανάλι number"
-#: libs/ardour/sndfilesource.cc:306
+#: libs/ardour/sndfilesource.cc:327
msgid "SndFileSource: could not seek to frame %1 within %2 (%3)"
msgstr "SndFileSource: δεν μποÏοÏσα να αναζητήσω στο frame %1 μέσα στο %2 (%3)"
-#: libs/ardour/sndfilesource.cc:357
+#: libs/ardour/sndfilesource.cc:378
#, fuzzy
msgid "programming error: %1 %2"
msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: %1"
-#: libs/ardour/sndfilesource.cc:457
+#: libs/ardour/sndfilesource.cc:487 libs/ardour/sndfilesource.cc:533
msgid ""
"cannot set broadcast info for audio file %1; Dropping broadcast info for "
"this file"
msgstr ""
-#: libs/ardour/sndfilesource.cc:499
+#: libs/ardour/sndfilesource.cc:544
#, fuzzy
msgid "%1: cannot seek to %2"
msgstr "%1: δεν μποÏÏŽ να αναζητήσω στο %2 για εξαγωγή"
-#: libs/ardour/state_manager.cc:46
+#: libs/ardour/state_manager.cc:47
#, fuzzy
msgid "cleared history"
msgstr "εκκαθαÏίσθη"
-#: libs/ardour/state_manager.cc:59
+#: libs/ardour/state_manager.cc:60
#, fuzzy
msgid ""
"programming error: illegal state ID (%1) passed to StateManager::set_state() "
@@ -2038,135 +2038,135 @@ msgstr ""
"σφάλμα Ï€ÏογÏαμματισμοÏ: αθέμιτη κατάσταση ID (%1) πέÏασε στον StateManager::"
"set_state() (range = 0-%3)"
-#: libs/ardour/stateful.cc:100
+#: libs/ardour/stateful.cc:102
msgid "Error: could not write %1"
msgstr "Σφάλμα: δεν μπόÏεσα να γÏάψω %1"
-#: libs/ardour/stateful.cc:114
+#: libs/ardour/stateful.cc:116
msgid "Could not understand XML file %1"
msgstr "Δεν μπόÏεσα να κατανοήσω το XML αÏχείο %1"
-#: libs/ardour/tempo.cc:66
+#: libs/ardour/tempo.cc:67
msgid "TempoSection XML node has no \"start\" property"
msgstr "Κόμβος του TempoSection XML δεν έχει ιδιότητα \"έναÏξη\""
-#: libs/ardour/tempo.cc:74
+#: libs/ardour/tempo.cc:75
msgid "TempoSection XML node has an illegal \"start\" value"
msgstr "Κόμβος του TempoSection XML έχει αθέμιτη αξία \"έναÏξη\""
-#: libs/ardour/tempo.cc:81
+#: libs/ardour/tempo.cc:82
msgid "TempoSection XML node has no \"beats-per-minute\" property"
msgstr "Κόμβος του TempoSection XML δεν έχει \"κτÏπων-ανά-λεπτό\" ιδιότητα"
-#: libs/ardour/tempo.cc:86
+#: libs/ardour/tempo.cc:87
msgid "TempoSection XML node has an illegal \"beats_per_minute\" value"
msgstr "Κόμβος του TempoSection XML έχει αθέμιτη \"κτÏπων_ανά_λεπτό\" αξία"
-#: libs/ardour/tempo.cc:91
+#: libs/ardour/tempo.cc:92
msgid "TempoSection XML node has no \"movable\" property"
msgstr "Κόμβος του TempoSection XML δεν έχει \"κινητή\" ιδιότητα"
-#: libs/ardour/tempo.cc:130
+#: libs/ardour/tempo.cc:131
msgid "MeterSection XML node has no \"start\" property"
msgstr "Κόμβος του MeterSection XML δεν έχει \"έναÏξη\" ιδιότητα"
-#: libs/ardour/tempo.cc:138
+#: libs/ardour/tempo.cc:139
msgid "MeterSection XML node has an illegal \"start\" value"
msgstr "Κόμβος του MeterSection XML έχει αθέμιτη \"έναÏξη\" αξία"
-#: libs/ardour/tempo.cc:145
+#: libs/ardour/tempo.cc:146
msgid "MeterSection XML node has no \"beats-per-bar\" property"
msgstr "Κόμβος του MeterSection XML δεν έχει \"κτÏπων-ανά-μπάÏα\" ιδιότητα"
-#: libs/ardour/tempo.cc:150
+#: libs/ardour/tempo.cc:151
msgid "MeterSection XML node has an illegal \"beats-per-bar\" value"
msgstr "Κόμβος του MeterSection XML έχει αθέμιτη \"κτÏπων-ανά-μπάÏα\" αξία"
-#: libs/ardour/tempo.cc:155
+#: libs/ardour/tempo.cc:156
msgid "MeterSection XML node has no \"note-type\" property"
msgstr "Κόμβος του MeterSection XML δεν έχει \"Ï„Ïπος-νότας\" ιδιότητα"
-#: libs/ardour/tempo.cc:160
+#: libs/ardour/tempo.cc:161
msgid "MeterSection XML node has an illegal \"note-type\" value"
msgstr "Κόμβος του MeterSection XML έχει αθέμιτη \"Ï„Ïπος-νότας\" αξία"
-#: libs/ardour/tempo.cc:165
+#: libs/ardour/tempo.cc:166
msgid "MeterSection XML node has no \"movable\" property"
msgstr "Κόμβος του MeterSection XML δεν έχει \"κινητή\" ιδιότητα"
-#: libs/ardour/tempo.cc:258
+#: libs/ardour/tempo.cc:259
msgid "move metric"
msgstr "μετακίνηση μετÏικοÏ"
-#: libs/ardour/tempo.cc:329
+#: libs/ardour/tempo.cc:330
msgid "metric removed"
msgstr "μετÏικό απεσÏÏθη"
-#: libs/ardour/tempo.cc:372
+#: libs/ardour/tempo.cc:373
msgid "add tempo"
msgstr "Ï€Ïόσθεση ÏυθμοÏ"
-#: libs/ardour/tempo.cc:401
+#: libs/ardour/tempo.cc:402
msgid "replace tempo"
msgstr "αντικατάσταση ÏυθμοÏ"
-#: libs/ardour/tempo.cc:434
+#: libs/ardour/tempo.cc:435
msgid "add meter"
msgstr "Ï€Ïόσθεση μετÏητή"
-#: libs/ardour/tempo.cc:462
+#: libs/ardour/tempo.cc:463
msgid "replaced meter"
msgstr "αντικατεστημένος μετÏητής"
-#: libs/ardour/tempo.cc:482 libs/ardour/tempo.cc:498
+#: libs/ardour/tempo.cc:483 libs/ardour/tempo.cc:499
msgid "programming error: no tempo section in tempo map!"
msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: κανένας τομέας ÏÏ…Î¸Î¼Î¿Ï ÏƒÏ„Î¿ χάÏτη Ïυθμών!"
-#: libs/ardour/tempo.cc:537
+#: libs/ardour/tempo.cc:538
msgid "programming error: unhandled MetricSection type"
msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: αχείÏιστος Ï„Ïπος MetricSection"
-#: libs/ardour/tempo.cc:1225 libs/ardour/tempo.cc:1237
+#: libs/ardour/tempo.cc:1226 libs/ardour/tempo.cc:1238
msgid "Tempo map: could not set new state, restoring old one."
msgstr ""
"ΧάÏτης Ïυθμών: δεν μπόÏεσα να θέσω νέα κατάσταση, επιστÏοφή Ï€ÏοηγοÏμενης."
-#: libs/ardour/tempo.cc:1261
+#: libs/ardour/tempo.cc:1262
msgid "load XML data"
msgstr ""
-#: libs/ardour/utils.cc:245
+#: libs/ardour/utils.cc:246
#, fuzzy
msgid "illegal or badly-formed string used for path (%1)"
msgstr "παÏάνομη ή κακοσχηματισμένη γÏαμμή για το μονοπάτι RAID"
-#: libs/ardour/utils.cc:250
+#: libs/ardour/utils.cc:251
#, fuzzy
msgid "path (%1) is ambiguous"
msgstr "Το μονοπάτι αναζήτησης του RAID είναι αμφίβολο"
-#: libs/ardour/vst_plugin.cc:186
+#: libs/ardour/vst_plugin.cc:187
msgid "cannot create VST chunk directory: %1"
msgstr "δεν μποÏÏŽ να δημιουÏγήσω φάκελο κομματιών VST: %1"
-#: libs/ardour/vst_plugin.cc:194
+#: libs/ardour/vst_plugin.cc:195
msgid "cannot check VST chunk directory: %1"
msgstr "δεν μποÏÏŽ να ελέγξω το φάκελο κομματιών VST: %1"
-#: libs/ardour/vst_plugin.cc:201
+#: libs/ardour/vst_plugin.cc:202
msgid "%1 exists but is not a directory"
msgstr "%1 υπάÏχει αλλά δεν είναι φάκελος"
-#: libs/ardour/vst_plugin.cc:239
+#: libs/ardour/vst_plugin.cc:240
msgid "Bad node sent to VSTPlugin::set_state"
msgstr "Κακός κόμβος εστάλη στο VSTPlugin::set_state"
-#: libs/ardour/vst_plugin.cc:342 libs/ardour/vst_plugin.cc:353
+#: libs/ardour/vst_plugin.cc:343 libs/ardour/vst_plugin.cc:354
msgid "no support for presets using chunks at this time"
msgstr ""
"καμμία υποστήÏιξη αυτή τη στιγμή για Ïυθμίσεις που χÏησιμοποιοÏν κομμάτια"
-#: libs/ardour/coreaudio_source.cc:98
+#: libs/ardour/coreaudiosource.cc:97
#, fuzzy
msgid ""
"CoreAudioSource: file only contains %1 channels; %2 is invalid as a channel "
@@ -2175,7 +2175,7 @@ msgstr ""
"SndFileSource: το αÏχείο πεÏιέχει μόνο %1 κανάλια; %2 δεν έχει αξία σαν "
"κανάλι number"
-#: libs/ardour/coreaudio_source.cc:163
+#: libs/ardour/coreaudiosource.cc:162
#, fuzzy
msgid "CoreAudioSource: could not seek to frame %1 within %2 (%3)"
msgstr "SndFileSource: δεν μποÏοÏσα να αναζητήσω στο frame %1 μέσα στο %2 (%3)"
diff --git a/libs/ardour/po/it_IT.po b/libs/ardour/po/it_IT.po
index 708a965a4c..2ce02827bd 100644
--- a/libs/ardour/po/it_IT.po
+++ b/libs/ardour/po/it_IT.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libardour 0.664.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-06-20 16:23-0400\n"
+"POT-Creation-Date: 2006-06-29 21:03-0400\n"
"PO-Revision-Date: 2003-05-21 12:50+0500\n"
"Last-Translator: Filippo Pappalardo <filippo@email.it>\n"
"Language-Team: Italian\n"
@@ -15,270 +15,270 @@ msgstr ""
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: libs/ardour/audio_diskstream.cc:336
+#: libs/ardour/audio_diskstream.cc:337
#, fuzzy
msgid "AudioDiskstream: Session doesn't know about a Playlist called \"%1\""
msgstr "DiskStream: La sessione non riconosce la Playlist chiamata \"%1\""
-#: libs/ardour/audio_diskstream.cc:341
+#: libs/ardour/audio_diskstream.cc:342
msgid "AudioDiskstream: Playlist \"%1\" isn't an audio playlist"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:432
+#: libs/ardour/audio_diskstream.cc:433
#, fuzzy
msgid "AudioDiskstream %1: there is no existing playlist to make a copy of!"
msgstr "DiskStream %1: non esiste alcuna playlist di cui fare una copia!"
-#: libs/ardour/audio_diskstream.cc:1113 libs/ardour/audio_diskstream.cc:1124
+#: libs/ardour/audio_diskstream.cc:1114 libs/ardour/audio_diskstream.cc:1125
#, fuzzy
msgid ""
"AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3"
msgstr "DiskStream %1: impossibile leggere %2 dalla playlista al frame %3"
-#: libs/ardour/audio_diskstream.cc:1253
+#: libs/ardour/audio_diskstream.cc:1254
#, fuzzy
msgid "AudioDiskstream %1: cannot read %2 from playlist at frame %3"
msgstr "DiskStream %1: impossibile leggere %2 dalla playlista al frame %3"
-#: libs/ardour/audio_diskstream.cc:1620 libs/ardour/audio_diskstream.cc:1637
+#: libs/ardour/audio_diskstream.cc:1621 libs/ardour/audio_diskstream.cc:1638
#, fuzzy
msgid "AudioDiskstream %1: cannot write to disk"
msgstr "DiskStream %1: impossibile scrivere sul disco"
-#: libs/ardour/audio_diskstream.cc:1697
+#: libs/ardour/audio_diskstream.cc:1698
#, fuzzy
msgid "AudioDiskstream \"%1\": cannot flush captured data to disk!"
msgstr "DiskStream \"%1\": impossibile scaricare i dati acquisiti sul disco!"
-#: libs/ardour/audio_diskstream.cc:1794
+#: libs/ardour/audio_diskstream.cc:1796
msgid "%1: could not create region for complete audio file"
msgstr "%1: impossibile creare una regione per il file audio completo"
-#: libs/ardour/audio_diskstream.cc:1817
+#: libs/ardour/audio_diskstream.cc:1819
#, fuzzy
msgid "AudioDiskstream: could not create region for captured audio!"
msgstr "DiskStream: impossibile creare una regione per l'audio registrato!"
-#: libs/ardour/audio_diskstream.cc:1872
+#: libs/ardour/audio_diskstream.cc:1874
#, fuzzy
msgid "programmer error: %1"
msgstr "errore di programmazione: %1"
-#: libs/ardour/audio_diskstream.cc:2144
+#: libs/ardour/audio_diskstream.cc:2146
#, fuzzy
msgid "AudioDiskstream: channel %1 out of range"
msgstr "DiskStream: canale fuori margine"
-#: libs/ardour/audio_diskstream.cc:2169
+#: libs/ardour/audio_diskstream.cc:2171
msgid "%1:%2 new capture file not initialized correctly"
msgstr "%1:%2 nuovo file di registrazione non è stato avviato correttamente"
-#: libs/ardour/audio_diskstream.cc:2402
+#: libs/ardour/audio_diskstream.cc:2404
msgid "Location \"%1\" not valid for track loop (start >= end)"
msgstr "La Location \"%1\" non valida per il loop (inizio >= fine)"
-#: libs/ardour/audio_diskstream.cc:2483
+#: libs/ardour/audio_diskstream.cc:2485
#, fuzzy
msgid "%1: cannot restore pending capture source file %2"
msgstr "Import: impossibile aprire il file audio di input \"%1\""
-#: libs/ardour/audio_diskstream.cc:2505
+#: libs/ardour/audio_diskstream.cc:2507
msgid "%1: incorrect number of pending sources listed - ignoring them all"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:2521
+#: libs/ardour/audio_diskstream.cc:2523
#, fuzzy
msgid "%1: cannot create whole-file region from pending capture sources"
msgstr "Playlist: impossibile creare la Regione dal file di stato"
-#: libs/ardour/audio_diskstream.cc:2533
+#: libs/ardour/audio_diskstream.cc:2535
#, fuzzy
msgid "%1: cannot create region from pending capture sources"
msgstr "Playlist: impossibile creare la Regione dal file di stato"
-#: libs/ardour/audio_library.cc:91
+#: libs/ardour/audio_library.cc:92
msgid "channels"
msgstr ""
-#: libs/ardour/audio_library.cc:92
+#: libs/ardour/audio_library.cc:93
#, fuzzy
msgid "samplerate"
msgstr "separa"
-#: libs/ardour/audio_library.cc:93
+#: libs/ardour/audio_library.cc:94
msgid "resolution"
msgstr ""
-#: libs/ardour/audio_library.cc:94
+#: libs/ardour/audio_library.cc:95
msgid "format"
msgstr ""
-#: libs/ardour/audio_library.cc:101
+#: libs/ardour/audio_library.cc:102
msgid "Could not open %1. Audio Library not saved"
msgstr "Impossibile accedere a %1. Libreria Audio non salvata"
-#: libs/ardour/audio_playlist.cc:52 libs/ardour/audio_playlist.cc:62
-#: libs/ardour/audio_playlist.cc:73 libs/ardour/audio_playlist.cc:120
+#: libs/ardour/audio_playlist.cc:53 libs/ardour/audio_playlist.cc:63
+#: libs/ardour/audio_playlist.cc:74 libs/ardour/audio_playlist.cc:121
#: libs/ardour/insert.cc:76 libs/ardour/insert.cc:95 libs/ardour/insert.cc:120
-#: libs/ardour/insert.cc:838 libs/ardour/insert.cc:846 libs/ardour/send.cc:38
-#: libs/ardour/send.cc:52 libs/ardour/send.cc:61
-#: libs/ardour/session_state.cc:1620 libs/ardour/session_state.cc:1666
+#: libs/ardour/insert.cc:838 libs/ardour/insert.cc:846 libs/ardour/send.cc:39
+#: libs/ardour/send.cc:53 libs/ardour/send.cc:62
+#: libs/ardour/session_state.cc:1621 libs/ardour/session_state.cc:1667
msgid "initial state"
msgstr "stato iniziale"
-#: libs/ardour/audio_playlist.cc:274 libs/ardour/audio_playlist.cc:768
+#: libs/ardour/audio_playlist.cc:275 libs/ardour/audio_playlist.cc:769
msgid ""
"programming error: non-audio Region passed to remove_overlap in audio "
"playlist"
msgstr ""
-#: libs/ardour/audio_playlist.cc:401
+#: libs/ardour/audio_playlist.cc:402
msgid ""
"programming error: non-audio Region tested for overlap in audio playlist"
msgstr ""
-#: libs/ardour/audio_playlist.cc:877
+#: libs/ardour/audio_playlist.cc:878
msgid "xfade change"
msgstr "cambio dello smorzamento incrociato"
-#: libs/ardour/audio_playlist.cc:932
+#: libs/ardour/audio_playlist.cc:933
msgid "region modified"
msgstr "regione modificata"
-#: libs/ardour/audio_track.cc:132 libs/ardour/io.cc:1715
-#: libs/ardour/io.cc:1825
+#: libs/ardour/audio_track.cc:125 libs/ardour/io.cc:1716
+#: libs/ardour/io.cc:1826
msgid "Unknown connection \"%1\" listed for input of %2"
msgstr "Connessione sconosciuta \"%1\" come input di %2"
-#: libs/ardour/audio_track.cc:134 libs/ardour/io.cc:1717
-#: libs/ardour/io.cc:1827
+#: libs/ardour/audio_track.cc:127 libs/ardour/io.cc:1718
+#: libs/ardour/io.cc:1828
msgid "in 1"
msgstr ""
-#: libs/ardour/audio_track.cc:135 libs/ardour/io.cc:1718
-#: libs/ardour/io.cc:1828
+#: libs/ardour/audio_track.cc:128 libs/ardour/io.cc:1719
+#: libs/ardour/io.cc:1829
msgid "No input connections available as a replacement"
msgstr ""
-#: libs/ardour/audio_track.cc:139 libs/ardour/io.cc:1722
-#: libs/ardour/io.cc:1832
+#: libs/ardour/audio_track.cc:132 libs/ardour/io.cc:1723
+#: libs/ardour/io.cc:1833
msgid "Connection %1 was not available - \"in 1\" used instead"
msgstr ""
-#: libs/ardour/audio_track.cc:148 libs/ardour/io.cc:1841
+#: libs/ardour/audio_track.cc:141 libs/ardour/io.cc:1842
msgid "improper input channel list in XML node (%1)"
msgstr ""
-#: libs/ardour/audio_track.cc:193 libs/ardour/audio_track.cc:206
+#: libs/ardour/audio_track.cc:186 libs/ardour/audio_track.cc:199
msgid "AudioTrack: diskstream \"%1\" not known by session"
msgstr "AudioTrack: diskstream \"%1\" non riconosciuto dalla sessione"
-#: libs/ardour/audio_track.cc:304
+#: libs/ardour/audio_track.cc:297
msgid ""
"MIDI rec_enable control specification for %1 is incomplete, so it has been "
"ignored"
msgstr ""
-#: libs/ardour/audio_track.cc:316
+#: libs/ardour/audio_track.cc:309
msgid "programming error: AudioTrack given state without diskstream!"
msgstr ""
-#: libs/ardour/audioengine.cc:149
+#: libs/ardour/audioengine.cc:144
msgid "cannot activate JACK client"
msgstr "impossibile attivare il client JACK"
-#: libs/ardour/audioengine.cc:400
+#: libs/ardour/audioengine.cc:395
msgid "register audio input port called before engine was started"
msgstr ""
"la richiesta di registrazione di una porta di entrata avvenuta prima "
"dell'avvio dell'applicazione"
-#: libs/ardour/audioengine.cc:431
+#: libs/ardour/audioengine.cc:426
msgid "register audio output port called before engine was started"
msgstr ""
"la richiesta di registrazione di una porta di uscita avvenuta prima "
"dell'avvio dell'applicazione"
-#: libs/ardour/audioengine.cc:492
+#: libs/ardour/audioengine.cc:487
msgid "connect called before engine was started"
msgstr "richiesta di connessione avvenuta prima dell'avvio dell'applicazione"
-#: libs/ardour/audioengine.cc:508
+#: libs/ardour/audioengine.cc:503
msgid "AudioEngine: cannot connect %1 (%2) to %3 (%4)"
msgstr ""
-#: libs/ardour/audioengine.cc:521 libs/ardour/audioengine.cc:550
+#: libs/ardour/audioengine.cc:516 libs/ardour/audioengine.cc:545
msgid "disconnect called before engine was started"
msgstr ""
"richiesta di disconnessione avvenuta prima dell'avvio dell'applicazione"
-#: libs/ardour/audioengine.cc:608
+#: libs/ardour/audioengine.cc:603
msgid "get_port_by_name() called before engine was started"
msgstr ""
"richiesta get_port_by_name() avvenuta prima dell'avvio dell'applicazione"
-#: libs/ardour/audioengine.cc:641
+#: libs/ardour/audioengine.cc:636
msgid "get_ports called before engine was started"
msgstr "richiesta di get_ports avvenuta prima dell'avvio dell'applicazione"
-#: libs/ardour/audioengine.cc:716
+#: libs/ardour/audioengine.cc:711
msgid "get_nth_physical called before engine was started"
msgstr ""
"richiesta di get_nth_physical avvenuta prima dell'avvio dell'applicazione"
-#: libs/ardour/audioengine.cc:744
+#: libs/ardour/audioengine.cc:739
#, fuzzy
msgid "get_port_total_latency() called with no JACK client connection"
msgstr ""
"richiesta di get_port_total_latency() avvenuta prima dell'avvio "
"dell'applicazione"
-#: libs/ardour/audioengine.cc:750
+#: libs/ardour/audioengine.cc:745
msgid "get_port_total_latency() called before engine was started"
msgstr ""
"richiesta di get_port_total_latency() avvenuta prima dell'avvio "
"dell'applicazione"
-#: libs/ardour/audioengine.cc:874
+#: libs/ardour/audioengine.cc:869
msgid "Unable to connect to JACK server"
msgstr ""
-#: libs/ardour/audioengine.cc:877
+#: libs/ardour/audioengine.cc:872
msgid "Could not connect to JACK server as \"%1\""
msgstr ""
-#: libs/ardour/audioengine.cc:882
+#: libs/ardour/audioengine.cc:877
msgid "JACK server started"
msgstr ""
-#: libs/ardour/audioengine.cc:916
+#: libs/ardour/audioengine.cc:911
msgid "cannot shutdown connection to JACK"
msgstr ""
-#: libs/ardour/audioengine.cc:941
+#: libs/ardour/audioengine.cc:936
msgid "failed to connect to JACK"
msgstr ""
-#: libs/ardour/audioengine.cc:957
+#: libs/ardour/audioengine.cc:952
#, fuzzy
msgid "could not reregister %1"
msgstr "Esportazione: impossibile scrivere dati sul file di output (%1)"
-#: libs/ardour/audioengine.cc:1014
+#: libs/ardour/audioengine.cc:1009
msgid "could not reconnect %1 and %2 (err = %3)"
msgstr ""
-#: libs/ardour/audiofilesource.cc:444 libs/ardour/session_state.cc:3094
+#: libs/ardour/audiofilesource.cc:444 libs/ardour/session_state.cc:3095
msgid ""
"there are already 1000 files with names like %1; versioning discontinued"
msgstr ""
"ci sono gia' 1000 file con nomi come %1; tracciamento di versione interrotto"
-#: libs/ardour/audiofilesource.cc:458 libs/ardour/session_state.cc:3108
+#: libs/ardour/audiofilesource.cc:458 libs/ardour/session_state.cc:3109
msgid "cannot rename audio file source from %1 to %2 (%3)"
msgstr "impossibile rinominare file audio sorgente da %1 a %2 (%3)"
-#: libs/ardour/audiofilesource.cc:465 libs/ardour/session_state.cc:3123
+#: libs/ardour/audiofilesource.cc:465 libs/ardour/session_state.cc:3124
msgid "cannot remove peakfile %1 for %2 (%3)"
msgstr "impossibile eliminare il peakfile %1 per %2 (%3)"
@@ -307,22 +307,22 @@ msgstr "FileSource: impossibile trovare il file richiesto (%1): %2"
msgid "Filesource: cannot check for existing file (%1): %2"
msgstr "FileSource: impossibile controllare il file esistente (%1): %2"
-#: libs/ardour/audiofilesource.cc:639 libs/ardour/insert.cc:525
-#: libs/ardour/sndfilesource.cc:111
+#: libs/ardour/audiofilesource.cc:636 libs/ardour/insert.cc:525
+#: libs/ardour/sndfilesource.cc:113
msgid "programming error: %1"
msgstr "errore di programmazione: %1"
-#: libs/ardour/audiofilesource.cc:644
+#: libs/ardour/audiofilesource.cc:641
#, fuzzy
msgid "cannot rename audio file for %1 to %2"
msgstr "impossibile rinominare file audio sorgente da %1 a %2 (%3)"
-#: libs/ardour/audiofilter.cc:44
+#: libs/ardour/audiofilter.cc:45
msgid "audiofilter: error creating name for new audio file based on %1"
msgstr ""
"audiofilter: errore nel creare il nome per il nuovo file audio basato su %1"
-#: libs/ardour/audiofilter.cc:57
+#: libs/ardour/audiofilter.cc:58
msgid "audiofilter: error creating new audio file %1 (%2)"
msgstr "audiofilter: errore nel creare un nuovo file audio %1 (%2)"
@@ -401,155 +401,155 @@ msgstr ""
msgid "%1: could not write peak file data (%2)"
msgstr ""
-#: libs/ardour/automation_event.cc:64 libs/ardour/location.cc:344
-#: libs/ardour/tempo.cc:225
+#: libs/ardour/automation_event.cc:65 libs/ardour/location.cc:345
+#: libs/ardour/tempo.cc:226
msgid "initial"
msgstr "iniziale"
-#: libs/ardour/automation_event.cc:231
+#: libs/ardour/automation_event.cc:232
msgid "cleared"
msgstr "pulito"
-#: libs/ardour/automation_event.cc:403
+#: libs/ardour/automation_event.cc:404
msgid "added event"
msgstr "aggiunto evento"
-#: libs/ardour/automation_event.cc:420
+#: libs/ardour/automation_event.cc:421
msgid "removed event"
msgstr "rimosso evento"
-#: libs/ardour/automation_event.cc:435
+#: libs/ardour/automation_event.cc:436
msgid "removed multiple events"
msgstr "rimossi molteplici eventi"
-#: libs/ardour/automation_event.cc:466 libs/ardour/automation_event.cc:497
+#: libs/ardour/automation_event.cc:467 libs/ardour/automation_event.cc:498
msgid "removed range"
msgstr "rimosso intervallo"
-#: libs/ardour/automation_event.cc:527
+#: libs/ardour/automation_event.cc:528
msgid "event range adjusted"
msgstr ""
-#: libs/ardour/automation_event.cc:549
+#: libs/ardour/automation_event.cc:550
msgid "event adjusted"
msgstr ""
-#: libs/ardour/automation_event.cc:664 libs/ardour/automation_event.cc:769
+#: libs/ardour/automation_event.cc:665 libs/ardour/automation_event.cc:770
#: libs/ardour/panner.cc:1041
msgid "programming error:"
msgstr "errore di programmazione:"
-#: libs/ardour/automation_event.cc:1078
+#: libs/ardour/automation_event.cc:1079
msgid "cut/copy/clear"
msgstr "taglia/copia/pulisci"
-#: libs/ardour/automation_event.cc:1111
+#: libs/ardour/automation_event.cc:1112
msgid "copy"
msgstr "copia"
-#: libs/ardour/automation_event.cc:1179 libs/ardour/playlist.cc:939
+#: libs/ardour/automation_event.cc:1180 libs/ardour/playlist.cc:939
msgid "paste"
msgstr "incolla"
-#: libs/ardour/automation_event.cc:1234
+#: libs/ardour/automation_event.cc:1235
msgid ""
"automation list: no x-coordinate stored for control point (point ignored)"
msgstr ""
"lista automazione: nessuna coordinata X salvata per punto di controllo "
"(ignorato)"
-#: libs/ardour/automation_event.cc:1240
+#: libs/ardour/automation_event.cc:1241
msgid ""
"automation list: no y-coordinate stored for control point (point ignored)"
msgstr ""
"lista automazione: nessuna coordinata Y salvata per punto di controllo "
"(ignorato)"
-#: libs/ardour/configuration.cc:79
+#: libs/ardour/configuration.cc:80
#, fuzzy
msgid "loading system configuration file %1"
msgstr ""
"Ardour: impossibile leggere il file di configurazione di sistema \"%1\""
-#: libs/ardour/configuration.cc:82
+#: libs/ardour/configuration.cc:83
msgid "Ardour: cannot read system configuration file \"%1\""
msgstr ""
"Ardour: impossibile leggere il file di configurazione di sistema \"%1\""
-#: libs/ardour/configuration.cc:87
+#: libs/ardour/configuration.cc:88
msgid "Ardour: system configuration file \"%1\" not loaded successfully."
msgstr ""
"Ardour: il file di configurazione di sistema \"%1\" non stato caricato con "
"successo"
-#: libs/ardour/configuration.cc:104
+#: libs/ardour/configuration.cc:105
#, fuzzy
msgid "loading user configuration file %1"
msgstr "Ardour: impossibile la lettura del file di configurazione \"%1\""
-#: libs/ardour/configuration.cc:107
+#: libs/ardour/configuration.cc:108
msgid "Ardour: cannot read configuration file \"%1\""
msgstr "Ardour: impossibile la lettura del file di configurazione \"%1\""
-#: libs/ardour/configuration.cc:112
+#: libs/ardour/configuration.cc:113
#, fuzzy
msgid "Ardour: user configuration file \"%1\" not loaded successfully."
msgstr ""
"Ardour: il file di configurazione \"%1\" non stato caricato con successo"
-#: libs/ardour/configuration.cc:136
+#: libs/ardour/configuration.cc:137
#, fuzzy
msgid "Config file %1 not saved"
msgstr "File di configurazione non salvato"
-#: libs/ardour/configuration.cc:209
+#: libs/ardour/configuration.cc:210
msgid "ill-formed MIDI port specification in ardour rcfile (ignored)"
msgstr ""
"porta MIDI mal configurata nel file di configurazione di ardour (ignorato)"
-#: libs/ardour/connection.cc:182
+#: libs/ardour/connection.cc:183
msgid "Node for Connection has no \"name\" property"
msgstr "Il nodo per la connessione non possiede l'attributo \"nome\""
-#: libs/ardour/connection.cc:190
+#: libs/ardour/connection.cc:191
msgid "Node for Connection has no \"connections\" property"
msgstr "Il nodo per la connessione non ha l'attributo \"connessioni\""
-#: libs/ardour/connection.cc:226 libs/ardour/io.cc:1901
+#: libs/ardour/connection.cc:227 libs/ardour/io.cc:1902
msgid "IO: badly formed string in XML node for inputs \"%1\""
msgstr "IO: stringa malformata nel nodo XML per le entrate \"%1\""
-#: libs/ardour/connection.cc:231 libs/ardour/io.cc:1906
+#: libs/ardour/connection.cc:232 libs/ardour/io.cc:1907
msgid "bad input string in XML node \"%1\""
msgstr "stringa malformata nel nodo XML \"%1\""
-#: libs/ardour/control_protocol_manager.cc:82
+#: libs/ardour/control_protocol_manager.cc:80
msgid "control protocol name \"%1\" has no descriptor"
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:87
+#: libs/ardour/control_protocol_manager.cc:85
msgid "control protocol name \"%1\" could not be initialized"
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:143
+#: libs/ardour/control_protocol_manager.cc:141
msgid "Instantiating mandatory control protocol %1"
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:177
+#: libs/ardour/control_protocol_manager.cc:175
#, fuzzy
msgid "Control protocol %1 not usable"
msgstr "La porta MIDI \"%1\" non disponibile: nessun controllo MTC possibile"
-#: libs/ardour/control_protocol_manager.cc:189
+#: libs/ardour/control_protocol_manager.cc:187
msgid "Control surface protocol discovered: \"%1\""
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:207
+#: libs/ardour/control_protocol_manager.cc:205
#, fuzzy
msgid "ControlProtocolManager: cannot load module \"%1\" (%2)"
msgstr "LADSPA: impossibile caricare il modulo \"%1\" (%2)"
-#: libs/ardour/control_protocol_manager.cc:215
+#: libs/ardour/control_protocol_manager.cc:213
#, fuzzy
msgid "ControlProtocolManager: module \"%1\" has no descriptor function."
msgstr "LADSPA: il modulo \"%1\" non ha alcuna funzione descriptor."
@@ -580,103 +580,103 @@ msgstr "livello cambiato"
msgid "old-style crossfade information - no position information"
msgstr "il nodo XML per la Location non ha informazioni sull'inizio"
-#: libs/ardour/curve.cc:111 libs/ardour/globals.cc:339
+#: libs/ardour/curve.cc:112 libs/ardour/globals.cc:340
#: libs/ardour/insert.cc:454 libs/ardour/session.cc:2466
#: libs/ardour/session.cc:2518
msgid "programming error: "
msgstr "errore di programmazione: "
-#: libs/ardour/cycle_timer.cc:35
+#: libs/ardour/cycle_timer.cc:37
msgid "CycleTimer::get_mhz(): can't open /proc/cpuinfo"
msgstr "CycleTimer::get_mhz(): impossibile accedere a /proc/cpuinfo"
-#: libs/ardour/cycle_timer.cc:47
+#: libs/ardour/cycle_timer.cc:49
msgid "CycleTimer::get_mhz(): cannot locate cpu MHz in /proc/cpuinfo"
msgstr ""
"CycleTimer::get_mhz(): impossibile localizzare \"cpu MHz\" in /proc/cpuinfo"
-#: libs/ardour/cycle_timer.cc:70
+#: libs/ardour/cycle_timer.cc:72
msgid "cannot locate cpu MHz in /proc/cpuinfo"
msgstr "impossibile localizzare \"cpu MHz\" in /proc/cpuinfo"
-#: libs/ardour/destructive_filesource.cc:187
+#: libs/ardour/destructive_filesource.cc:188
msgid "DestructiveFileSource: \"%1\" bad read retval: %2 of %5 (%3: %4)"
msgstr ""
-#: libs/ardour/destructive_filesource.cc:200
-#: libs/ardour/destructive_filesource.cc:242
-#: libs/ardour/destructive_filesource.cc:249
+#: libs/ardour/destructive_filesource.cc:201
+#: libs/ardour/destructive_filesource.cc:243
+#: libs/ardour/destructive_filesource.cc:250
msgid "DestructiveFileSource: \"%1\" bad write (%2)"
msgstr ""
-#: libs/ardour/globals.cc:108
+#: libs/ardour/globals.cc:109
msgid "no MIDI ports specified: no MMC or MTC control possible"
msgstr "Nessuna porta MIDI specificata: impossibile alcun controllo MMC o MTC"
-#: libs/ardour/globals.cc:123
+#: libs/ardour/globals.cc:124
msgid "MIDI port specifications for \"%1\" are not understandable."
msgstr "Le specifiche per la porta MIDI \"%1\" non sono state capite"
-#: libs/ardour/globals.cc:136 libs/ardour/globals.cc:140
-#: libs/ardour/globals.cc:144
+#: libs/ardour/globals.cc:137 libs/ardour/globals.cc:141
+#: libs/ardour/globals.cc:145
msgid "default"
msgstr ""
-#: libs/ardour/globals.cc:172
+#: libs/ardour/globals.cc:173
msgid "No MMC control (MIDI port \"%1\" not available)"
msgstr "La porta MIDI \"%1\" non disponibile: nessun controllo MTC possibile"
-#: libs/ardour/globals.cc:178
+#: libs/ardour/globals.cc:179
msgid "No MTC support (MIDI port \"%1\" not available)"
msgstr "La porta MIDI \"%1\" non disponibile: nessun controllo MTC possibile"
-#: libs/ardour/globals.cc:183
+#: libs/ardour/globals.cc:184
#, fuzzy
msgid "No MIDI parameter support (MIDI port \"%1\" not available)"
msgstr "La porta MIDI \"%1\" non disponibile: nessun controllo MTC possibile"
-#: libs/ardour/import.cc:74
+#: libs/ardour/import.cc:75
msgid "Import: cannot open input sound file \"%1\""
msgstr "Import: impossibile aprire il file audio di input \"%1\""
-#: libs/ardour/import.cc:79
+#: libs/ardour/import.cc:80
msgid "resampling audio"
msgstr ""
-#: libs/ardour/import.cc:83
+#: libs/ardour/import.cc:84
msgid "Import: cannot open converted sound file \"%1\""
msgstr "Import: impossibile aprire il file audio convertito \"%1\""
-#: libs/ardour/import.cc:88
+#: libs/ardour/import.cc:89
msgid "Import: error while resampling sound file \"%1\""
msgstr "Import: errore nel resampling deil file audio \"%1\""
-#: libs/ardour/import.cc:147
+#: libs/ardour/import.cc:148
msgid "Session::import_audiofile: cannot open new file source for channel %1"
msgstr ""
"Session::import_audiofile: impossibile aprire il nuovo file per il canale %1"
-#: libs/ardour/import.cc:166
+#: libs/ardour/import.cc:167
msgid "converting audio"
msgstr "conversione dell'audio"
-#: libs/ardour/import.cc:198
+#: libs/ardour/import.cc:199
msgid "building region"
msgstr "costruzione della regione"
-#: libs/ardour/import.cc:200
+#: libs/ardour/import.cc:201
msgid "building regions"
msgstr "costruzione delle regioni"
-#: libs/ardour/import.cc:324
+#: libs/ardour/import.cc:325
msgid "Import: could not open temp file: %1"
msgstr "Import: impossibile aprire il file audio temporaneo \"%1\""
-#: libs/ardour/import.cc:333
+#: libs/ardour/import.cc:334
msgid "Import: src_new() failed : %1"
msgstr ""
-#: libs/ardour/import.cc:361
+#: libs/ardour/import.cc:362
msgid "Import: %1"
msgstr ""
@@ -733,223 +733,223 @@ msgstr "PortInsert: impossibile aggiungere una porta d'uscita"
msgid "non-port insert XML used for port plugin insert"
msgstr "insert non-port XML usato per insert di plugin di porta"
-#: libs/ardour/io.cc:597
+#: libs/ardour/io.cc:598
msgid "IO: cannot disconnect input port %1 from %2"
msgstr "IO: impossibile disconnettere la porta d'entrata %1 da %2"
-#: libs/ardour/io.cc:665
+#: libs/ardour/io.cc:666
msgid "IO: cannot disconnect output port %1 from %2"
msgstr "IO: impossibile disconnettere la porta d'uscita %1 da %2"
-#: libs/ardour/io.cc:806 libs/ardour/io.cc:1150 libs/ardour/io.cc:1276
+#: libs/ardour/io.cc:807 libs/ardour/io.cc:1151 libs/ardour/io.cc:1277
#, c-format
msgid "%s/out"
msgstr ""
-#: libs/ardour/io.cc:808 libs/ardour/io.cc:1152 libs/ardour/io.cc:1278
-#: libs/ardour/io.cc:2848
+#: libs/ardour/io.cc:809 libs/ardour/io.cc:1153 libs/ardour/io.cc:1279
+#: libs/ardour/io.cc:2849
#, c-format
msgid "%s/out %u"
msgstr ""
-#: libs/ardour/io.cc:812 libs/ardour/io.cc:1157 libs/ardour/io.cc:1282
+#: libs/ardour/io.cc:813 libs/ardour/io.cc:1158 libs/ardour/io.cc:1283
msgid "IO: cannot register output port %1"
msgstr "IO: impossibile registrare la porta %1"
-#: libs/ardour/io.cc:907 libs/ardour/io.cc:1010 libs/ardour/io.cc:1116
+#: libs/ardour/io.cc:908 libs/ardour/io.cc:1011 libs/ardour/io.cc:1117
#, c-format
msgid "%s/in"
msgstr ""
-#: libs/ardour/io.cc:909 libs/ardour/io.cc:1013 libs/ardour/io.cc:1119
-#: libs/ardour/io.cc:2818
+#: libs/ardour/io.cc:910 libs/ardour/io.cc:1014 libs/ardour/io.cc:1120
+#: libs/ardour/io.cc:2819
#, c-format
msgid "%s/in %u"
msgstr ""
-#: libs/ardour/io.cc:913 libs/ardour/io.cc:1019 libs/ardour/io.cc:1124
+#: libs/ardour/io.cc:914 libs/ardour/io.cc:1020 libs/ardour/io.cc:1125
msgid "IO: cannot register input port %1"
msgstr "IO: impossibile registrare la porta %1"
-#: libs/ardour/io.cc:1540
+#: libs/ardour/io.cc:1541
msgid "IO::connecting_became_legal() called without a pending state node"
msgstr ""
-#: libs/ardour/io.cc:1563
+#: libs/ardour/io.cc:1564
msgid "IO::ports_became_legal() called without a pending state node"
msgstr ""
-#: libs/ardour/io.cc:1593
+#: libs/ardour/io.cc:1594
msgid "incorrect XML node \"%1\" passed to IO object"
msgstr ""
-#: libs/ardour/io.cc:1648
+#: libs/ardour/io.cc:1649
msgid ""
"MIDI gain control specification for %1 is incomplete, so it has been ignored"
msgstr ""
-#: libs/ardour/io.cc:1738 libs/ardour/io.cc:1850
+#: libs/ardour/io.cc:1739 libs/ardour/io.cc:1851
msgid "Unknown connection \"%1\" listed for output of %2"
msgstr ""
-#: libs/ardour/io.cc:1740 libs/ardour/io.cc:1852
+#: libs/ardour/io.cc:1741 libs/ardour/io.cc:1853
msgid "out 1"
msgstr ""
-#: libs/ardour/io.cc:1741 libs/ardour/io.cc:1853
+#: libs/ardour/io.cc:1742 libs/ardour/io.cc:1854
msgid "No output connections available as a replacement"
msgstr ""
-#: libs/ardour/io.cc:1745 libs/ardour/io.cc:1857
+#: libs/ardour/io.cc:1746 libs/ardour/io.cc:1858
msgid "Connection %1 was not available - \"out 1\" used instead"
msgstr ""
-#: libs/ardour/io.cc:1759
+#: libs/ardour/io.cc:1760
msgid "%1: cannot create I/O ports"
msgstr ""
-#: libs/ardour/io.cc:1866
+#: libs/ardour/io.cc:1867
msgid "improper output channel list in XML node (%1)"
msgstr ""
-#: libs/ardour/io.cc:1951
+#: libs/ardour/io.cc:1952
msgid "IO: badly formed string in XML node for outputs \"%1\""
msgstr "IO: stringa mal formata nel nodo XML per le uscite \"%1\""
-#: libs/ardour/io.cc:1956
+#: libs/ardour/io.cc:1957
msgid "IO: bad output string in XML node \"%1\""
msgstr "IO: stringa mal formata nel nodo XML \"%1\""
-#: libs/ardour/io.cc:2524
+#: libs/ardour/io.cc:2525
msgid "%1: could not open automation event file \"%2\""
msgstr ""
-#: libs/ardour/io.cc:2563
+#: libs/ardour/io.cc:2564
msgid "%1: cannot open automation event file \"%2\""
msgstr ""
-#: libs/ardour/io.cc:2578
+#: libs/ardour/io.cc:2579
msgid "badly formed version number in automation event file \"%1\""
msgstr ""
-#: libs/ardour/io.cc:2582
+#: libs/ardour/io.cc:2583
msgid "no version information in automation event file \"%1\""
msgstr ""
-#: libs/ardour/io.cc:2587
+#: libs/ardour/io.cc:2588
msgid "mismatched automation event file version (%1)"
msgstr ""
-#: libs/ardour/io.cc:2595
+#: libs/ardour/io.cc:2596
msgid "badly formatted automation event record at line %1 of %2 (ignored)"
msgstr ""
-#: libs/ardour/io.cc:2615
+#: libs/ardour/io.cc:2616
msgid "dubious automation event found (and ignored)"
msgstr ""
-#: libs/ardour/io.cc:2619 libs/ardour/panner.cc:438
+#: libs/ardour/io.cc:2620 libs/ardour/panner.cc:438
#: libs/ardour/redirect.cc:148
msgid "loaded from disk"
msgstr ""
-#: libs/ardour/io.cc:2790
+#: libs/ardour/io.cc:2791
msgid "automation write/touch"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:86
+#: libs/ardour/ladspa_plugin.cc:87
msgid "LADSPA: module has no descriptor function."
msgstr "LADSPA: il modulo non ha alcuna funzione descriptor."
-#: libs/ardour/ladspa_plugin.cc:91
+#: libs/ardour/ladspa_plugin.cc:92
msgid "LADSPA: plugin has gone away since discovery!"
msgstr "LADSPA: il plugin è stato rimosso"
-#: libs/ardour/ladspa_plugin.cc:98
+#: libs/ardour/ladspa_plugin.cc:99
msgid "LADSPA: \"%1\" cannot be used, since it cannot do inplace processing"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:328
+#: libs/ardour/ladspa_plugin.cc:329
msgid ""
"illegal parameter number used with plugin \"%1\". This mayindicate a change "
"in the plugin design, and presets may beinvalid"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:429
+#: libs/ardour/ladspa_plugin.cc:430
msgid "Bad node sent to LadspaPlugin::set_state"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:442
+#: libs/ardour/ladspa_plugin.cc:443
msgid "LADSPA: no ladspa port number"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:448
+#: libs/ardour/ladspa_plugin.cc:449
msgid "LADSPA: no ladspa port data"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:497
+#: libs/ardour/ladspa_plugin.cc:498
msgid ""
"LADSPA LadspaPlugin MIDI control specification for port %1 is incomplete, so "
"it has been ignored"
msgstr ""
-#: libs/ardour/location.cc:268
+#: libs/ardour/location.cc:269
msgid "incorrect XML node passed to Location::set_state"
msgstr ""
-#: libs/ardour/location.cc:275
+#: libs/ardour/location.cc:276
msgid "XML node for Location has no name information"
msgstr "il nodo XML per la Location non ha informazioni sul nome"
-#: libs/ardour/location.cc:282
+#: libs/ardour/location.cc:283
msgid "XML node for Location has no start information"
msgstr "il nodo XML per la Location non ha informazioni sull'inizio"
-#: libs/ardour/location.cc:293
+#: libs/ardour/location.cc:294
msgid "XML node for Location has no end information"
msgstr "il nodo XML per la Location non ha informazioni sulla fine"
-#: libs/ardour/location.cc:302
+#: libs/ardour/location.cc:303
msgid "XML node for Location has no flags information"
msgstr "il nodo XML per la Location non ha informazioni sui flags"
-#: libs/ardour/location.cc:390
+#: libs/ardour/location.cc:391
msgid "Locations: attempt to use unknown location as selected location"
msgstr ""
-#: libs/ardour/location.cc:417 libs/ardour/playlist.cc:1187
+#: libs/ardour/location.cc:418 libs/ardour/playlist.cc:1187
msgid "clear"
msgstr "pulisci"
-#: libs/ardour/location.cc:442
+#: libs/ardour/location.cc:443
msgid "clear markers"
msgstr ""
-#: libs/ardour/location.cc:470
+#: libs/ardour/location.cc:471
msgid "clear ranges"
msgstr ""
-#: libs/ardour/location.cc:488
+#: libs/ardour/location.cc:489
msgid "add"
msgstr ""
-#: libs/ardour/location.cc:526
+#: libs/ardour/location.cc:527
msgid "remove"
msgstr "rimuovi"
-#: libs/ardour/location.cc:566
+#: libs/ardour/location.cc:567
msgid "incorrect XML mode passed to Locations::set_state"
msgstr ""
-#: libs/ardour/mtc_slave.cc:195
+#: libs/ardour/mtc_slave.cc:196
msgid "MTC Slave: atomic read of current time failed, sleeping!"
msgstr ""
-#: libs/ardour/named_selection.cc:76
+#: libs/ardour/named_selection.cc:77
msgid "Chunk %1 uses an unknown playlist \"%2\""
msgstr "Lo spezzone %1 usa una playlist sconosciuta \"%2\""
-#: libs/ardour/named_selection.cc:79
+#: libs/ardour/named_selection.cc:80
msgid "Chunk %1 contains misformed playlist information"
msgstr "Lo spezzone %1 contiene informazioni sulla playlist mal formate"
@@ -1060,63 +1060,63 @@ msgstr "Playlist: impossibile creare la Regione dal file di stato"
msgid "nudged"
msgstr "spostato"
-#: libs/ardour/playlist_factory.cc:26 libs/ardour/playlist_factory.cc:41
+#: libs/ardour/playlist_factory.cc:49 libs/ardour/playlist_factory.cc:64
msgid ""
"programming error: Playlist::createRegion called with unknown Region type"
msgstr ""
-#: libs/ardour/playlist_factory.cc:63
+#: libs/ardour/playlist_factory.cc:86
msgid ""
"programming error: Playlist::copyPlaylist called with unknown Playlist type"
msgstr ""
-#: libs/ardour/plugin.cc:327
+#: libs/ardour/plugin.cc:328
msgid "Could not locate HOME. Preset not saved."
msgstr "impossibile localizzare HOME. Preset non salvato."
-#: libs/ardour/plugin.cc:337 libs/ardour/plugin.cc:343
+#: libs/ardour/plugin.cc:338 libs/ardour/plugin.cc:344
msgid "Could not create %1. Preset not saved. (%2)"
msgstr "Impossibile creare %1 . Preset non salvato. (%2)"
-#: libs/ardour/plugin.cc:348
+#: libs/ardour/plugin.cc:349
msgid "Error saving presets file %1."
msgstr "Errore nel salvare il file di preset %1."
-#: libs/ardour/plugin_manager.cc:193
+#: libs/ardour/plugin_manager.cc:194
#, fuzzy
msgid "Could not parse rdf file: %1"
msgstr "IO: impossibile registrare la porta %1"
-#: libs/ardour/plugin_manager.cc:234
+#: libs/ardour/plugin_manager.cc:235
msgid "LADSPA: cannot load module \"%1\" (%2)"
msgstr "LADSPA: impossibile caricare il modulo \"%1\" (%2)"
-#: libs/ardour/plugin_manager.cc:241
+#: libs/ardour/plugin_manager.cc:242
msgid "LADSPA: module \"%1\" has no descriptor function."
msgstr "LADSPA: il modulo \"%1\" non ha alcuna funzione descriptor."
-#: libs/ardour/plugin_manager.cc:296
+#: libs/ardour/plugin_manager.cc:297
#, fuzzy
msgid "VST: cannot load module from \"%1\""
msgstr "LADPSA: impossibile caricare il modulo da \"%1\""
-#: libs/ardour/plugin_manager.cc:301
+#: libs/ardour/plugin_manager.cc:302
msgid "You asked ardour to not use any VST plugins"
msgstr ""
-#: libs/ardour/plugin_manager.cc:304
+#: libs/ardour/plugin_manager.cc:305
msgid "This version of ardour has no support for VST plugins"
msgstr ""
-#: libs/ardour/plugin_manager.cc:311
+#: libs/ardour/plugin_manager.cc:312
msgid "LADSPA: cannot load module from \"%1\""
msgstr "LADPSA: impossibile caricare il modulo da \"%1\""
-#: libs/ardour/plugin_manager.cc:373 libs/ardour/plugin_manager.cc:385
+#: libs/ardour/plugin_manager.cc:374 libs/ardour/plugin_manager.cc:386
msgid "Unknown"
msgstr ""
-#: libs/ardour/plugin_manager.cc:463
+#: libs/ardour/plugin_manager.cc:464
msgid ""
"VST plugin %1 does not support processReplacing, and so cannot be used in "
"ardour at this time"
@@ -1131,11 +1131,11 @@ msgstr "impossibile accedere al file di sessione recente %1 (%2)"
msgid "programming error: unknown Redirect type in Redirect::Clone!\n"
msgstr ""
-#: libs/ardour/redirect.cc:102 libs/ardour/utils.cc:202
+#: libs/ardour/redirect.cc:102 libs/ardour/utils.cc:203
msgid "pre"
msgstr ""
-#: libs/ardour/redirect.cc:104 libs/ardour/utils.cc:205
+#: libs/ardour/redirect.cc:104 libs/ardour/utils.cc:206
#, fuzzy
msgid "post"
msgstr "incolla"
@@ -1190,11 +1190,11 @@ msgstr ""
msgid "active_changed"
msgstr "livello cambiato"
-#: libs/ardour/region.cc:884
+#: libs/ardour/region.cc:885
msgid "Session: XMLNode describing a Region is incomplete (no id)"
msgstr ""
-#: libs/ardour/region.cc:891
+#: libs/ardour/region.cc:892
msgid "Session: XMLNode describing a Region is incomplete (no name)"
msgstr ""
@@ -1248,7 +1248,7 @@ msgid ""
"MIDI mute control specification for %1 is incomplete, so it has been ignored"
msgstr ""
-#: libs/ardour/send.cc:98
+#: libs/ardour/send.cc:99
msgid "XML node describing a send is missing a Redirect node"
msgstr ""
@@ -1394,11 +1394,11 @@ msgstr ""
msgid "programming error: unknown type of Redirect deleted!"
msgstr ""
-#: libs/ardour/session.cc:3634
+#: libs/ardour/session.cc:3636
msgid "too many bounced versions of playlist \"%1\""
msgstr ""
-#: libs/ardour/session.cc:3647
+#: libs/ardour/session.cc:3649
msgid "cannot create new audio file \"%1\" for %2"
msgstr "impossibile creare un nuovo file audio \"%1\" per %2"
@@ -1431,19 +1431,19 @@ msgstr ""
msgid "Butler write-behind failure on dstream %1"
msgstr ""
-#: libs/ardour/session_click.cc:157
+#: libs/ardour/session_click.cc:158
msgid "cannot open click soundfile %1 (%2)"
msgstr "impossibile accedere al file audio per il click %1 (%2)"
-#: libs/ardour/session_click.cc:166
+#: libs/ardour/session_click.cc:167
msgid "cannot read data from click soundfile"
msgstr "impossibile leggere dati dal file audio per il click"
-#: libs/ardour/session_click.cc:191
+#: libs/ardour/session_click.cc:192
msgid "cannot open click emphasis soundfile %1 (%2)"
msgstr "impossibile accedere al file audio di enfasi per il click %1 (%2)"
-#: libs/ardour/session_click.cc:199
+#: libs/ardour/session_click.cc:200
msgid "cannot read data from click emphasis soundfile"
msgstr "impossibile leggere dati dal file audio di enfasi per il click"
@@ -1547,168 +1547,168 @@ msgstr ""
msgid "Session: error in no roll for %1"
msgstr ""
-#: libs/ardour/session_state.cc:100
+#: libs/ardour/session_state.cc:101
#, fuzzy
msgid "Could not use path %1 (%s)"
msgstr "impossibile controllare il percorso %1 (%2)"
-#: libs/ardour/session_state.cc:128
+#: libs/ardour/session_state.cc:129
msgid "end"
msgstr ""
-#: libs/ardour/session_state.cc:129
+#: libs/ardour/session_state.cc:130
#, fuzzy
msgid "start"
msgstr "separa"
-#: libs/ardour/session_state.cc:501
+#: libs/ardour/session_state.cc:502
msgid "Session: cannot create session dir \"%1\" (%2)"
msgstr "Sessione: impossibile creare la cartella per la sessione \"%1\" (%2)"
-#: libs/ardour/session_state.cc:512
+#: libs/ardour/session_state.cc:513
#, fuzzy
msgid "Session: cannot create session peakfile dir \"%1\" (%2)"
msgstr "Sessione: impossibile creare la cartella per la sessione \"%1\" (%2)"
-#: libs/ardour/session_state.cc:521
+#: libs/ardour/session_state.cc:522
msgid "Session: cannot create session sounds dir \"%1\" (%2)"
msgstr ""
"Sessione: impossibile creare la cartella sounds per la sessione \"%1\" (%2)"
-#: libs/ardour/session_state.cc:530
+#: libs/ardour/session_state.cc:531
#, fuzzy
msgid "Session: cannot create session tape dir \"%1\" (%2)"
msgstr "Sessione: impossibile creare la cartella per la sessione \"%1\" (%2)"
-#: libs/ardour/session_state.cc:539
+#: libs/ardour/session_state.cc:540
#, fuzzy
msgid "Session: cannot create session dead sounds dir \"%1\" (%2)"
msgstr ""
"Sessione: impossibile creare la cartella sounds per la sessione \"%1\" (%2)"
-#: libs/ardour/session_state.cc:548
+#: libs/ardour/session_state.cc:549
msgid "Session: cannot create session automation dir \"%1\" (%2)"
msgstr ""
"Sessione: impossibile creare la cartella automation per la sessione \"%1\" (%"
"2)"
-#: libs/ardour/session_state.cc:579
+#: libs/ardour/session_state.cc:580
#, fuzzy
msgid "Could not open %1 for writing mix template"
msgstr "Impossibile accedere a %1 per scrivere il modello di mixaggio"
-#: libs/ardour/session_state.cc:585
+#: libs/ardour/session_state.cc:586
#, fuzzy
msgid "Could not open mix template %1 for reading"
msgstr "Impossibile aprire il modello di mixaggio %1 per leggere"
-#: libs/ardour/session_state.cc:592
+#: libs/ardour/session_state.cc:593
msgid "Session already exists. Not overwriting"
msgstr "La sessione esiste già. Non sovrascrivo"
-#: libs/ardour/session_state.cc:635
+#: libs/ardour/session_state.cc:636
msgid "Session: could not load diskstream via XML state"
msgstr ""
-#: libs/ardour/session_state.cc:684
+#: libs/ardour/session_state.cc:685
msgid "could not backup old state file, current state not saved."
msgstr ""
"impossibile fare copia di sicurezza del file di stato, stato attuale non "
"salvato"
-#: libs/ardour/session_state.cc:697
+#: libs/ardour/session_state.cc:698
#, fuzzy
msgid "state could not be saved to %1"
msgstr "stato non salvato"
-#: libs/ardour/session_state.cc:704
+#: libs/ardour/session_state.cc:705
#, fuzzy
msgid "could not remove corrupt state file %1"
msgstr "IO: impossibile registrare la porta %1"
-#: libs/ardour/session_state.cc:708
+#: libs/ardour/session_state.cc:709
#, fuzzy
msgid "could not restore state file from backup %1"
msgstr "Esportazione: impossibile scrivere dati sul file di output (%1)"
-#: libs/ardour/session_state.cc:777
+#: libs/ardour/session_state.cc:778
msgid "%1: session state information file \"%2\" doesn't exist!"
msgstr ""
"%1: il file di informazioni sullo stato della sessione \"%2\" non esiste!"
-#: libs/ardour/session_state.cc:788
+#: libs/ardour/session_state.cc:789
#, fuzzy
msgid "Could not understand ardour file %1"
msgstr "IO: impossibile registrare la porta %1"
-#: libs/ardour/session_state.cc:1492
+#: libs/ardour/session_state.cc:1493
msgid "programming error: Session: incorrect XML node sent to set_state()"
msgstr ""
-#: libs/ardour/session_state.cc:1538
+#: libs/ardour/session_state.cc:1539
msgid "Session: XML state has no options section"
msgstr "Sessione: il file di stato XML non ha alcuna sezione option"
-#: libs/ardour/session_state.cc:1543
+#: libs/ardour/session_state.cc:1544
msgid "Session: XML state has no sources section"
msgstr "Sessione: il file di stato XML non ha alcuna sezione sources"
-#: libs/ardour/session_state.cc:1550
+#: libs/ardour/session_state.cc:1551
msgid "Session: XML state has no Regions section"
msgstr "Sessione: il file di stato XML non ha alcuna sezione Regions"
-#: libs/ardour/session_state.cc:1557
+#: libs/ardour/session_state.cc:1558
msgid "Session: XML state has no playlists section"
msgstr "Sessione: il file di stato XML non ha alcuna sezione playlist"
-#: libs/ardour/session_state.cc:1576
+#: libs/ardour/session_state.cc:1577
msgid "Session: XML state has no diskstreams section"
msgstr "Sessione: il file di stato XML non ha alcuna sezione diskstream"
-#: libs/ardour/session_state.cc:1583
+#: libs/ardour/session_state.cc:1584
msgid "Session: XML state has no connections section"
msgstr "Sessione: il file di stato XML non ha alcuna sezione connections"
-#: libs/ardour/session_state.cc:1590
+#: libs/ardour/session_state.cc:1591
msgid "Session: XML state has no locations section"
msgstr "Sessione: il file di stato XML non ha alcuna sezione locations"
-#: libs/ardour/session_state.cc:1623
+#: libs/ardour/session_state.cc:1624
msgid "Session: XML state has no edit groups section"
msgstr "Sessione: il file di stato XML non ha alcuna sezione edit groups"
-#: libs/ardour/session_state.cc:1630
+#: libs/ardour/session_state.cc:1631
msgid "Session: XML state has no mix groups section"
msgstr "Sessione: il file di stato XML non ha alcuna sezione mix groups"
-#: libs/ardour/session_state.cc:1637
+#: libs/ardour/session_state.cc:1638
msgid "Session: XML state has no Tempo Map section"
msgstr "Sessione: il file di stato XML non ha alcuna sezione Tempo Map"
-#: libs/ardour/session_state.cc:1644
+#: libs/ardour/session_state.cc:1645
msgid "Session: XML state has no routes section"
msgstr "Sessione: il file di stato XML non ha alcuna sezione routes"
-#: libs/ardour/session_state.cc:1651
+#: libs/ardour/session_state.cc:1652
#, fuzzy
msgid "Session: XML state has no click section"
msgstr "Sessione: il file di stato XML non ha alcuna sezione click"
-#: libs/ardour/session_state.cc:1696
+#: libs/ardour/session_state.cc:1697
msgid "Session: cannot create Route from XML description."
msgstr "Sessione: impossibile creare Route dalla descrizione XML"
-#: libs/ardour/session_state.cc:1734
+#: libs/ardour/session_state.cc:1735
msgid "Session: cannot create Region from XML description."
msgstr "Sessione: impossibile creare regione dalla descrizione XML"
-#: libs/ardour/session_state.cc:1763
+#: libs/ardour/session_state.cc:1764
#, fuzzy
msgid "Session: XMLNode describing a AudioRegion is incomplete (no source)"
msgstr ""
"Sessione: il nodo XML descrivente una Regione è incompleto (nessun source)"
-#: libs/ardour/session_state.cc:1771 libs/ardour/session_state.cc:1791
+#: libs/ardour/session_state.cc:1772 libs/ardour/session_state.cc:1792
#, fuzzy
msgid ""
"Session: XMLNode describing a AudioRegion references an unknown source id =%1"
@@ -1716,7 +1716,7 @@ msgstr ""
"Sessione: il nodo XML descrivente una Regione fa riferimento ad un source "
"con id sconosciuto =%1"
-#: libs/ardour/session_state.cc:1777 libs/ardour/session_state.cc:1797
+#: libs/ardour/session_state.cc:1778 libs/ardour/session_state.cc:1798
#, fuzzy
msgid ""
"Session: XMLNode describing a AudioRegion references a non-audio source id =%"
@@ -1725,109 +1725,109 @@ msgstr ""
"Sessione: il nodo XML descrivente una Regione fa riferimento ad un source "
"con id sconosciuto =%1"
-#: libs/ardour/session_state.cc:1867
+#: libs/ardour/session_state.cc:1868
msgid "Session: cannot create Source from XML description."
msgstr "Sessione: impossibile creare Source dalla descrizione XML"
-#: libs/ardour/session_state.cc:1888
+#: libs/ardour/session_state.cc:1889
#, fuzzy
msgid ""
"Found a sound file that cannot be used by Ardour. Talk to the progammers."
msgstr "E' stato trovato un file audio che non può essere usato da Ardour."
-#: libs/ardour/session_state.cc:1912
+#: libs/ardour/session_state.cc:1913
msgid "Could not create mix templates directory \"%1\" (%2)"
msgstr "Impossibile creare la cartella per i modelli di mixaggio \"%1\" (%2)"
-#: libs/ardour/session_state.cc:1926
+#: libs/ardour/session_state.cc:1927
msgid "Template \"%1\" already exists - new version not created"
msgstr "Il modello \"%1\" esiste già - non è stata creata una nuova versione"
-#: libs/ardour/session_state.cc:1933
+#: libs/ardour/session_state.cc:1934
msgid "mix template not saved"
msgstr "modello di mixaggio non salvato"
-#: libs/ardour/session_state.cc:1993
+#: libs/ardour/session_state.cc:1994
msgid "cannot create session directory \"%1\"; ignored"
msgstr "impossibile creare la cartella per la sessione %1; ignorato"
-#: libs/ardour/session_state.cc:2006
+#: libs/ardour/session_state.cc:2007
msgid "cannot create sounds directory \"%1\"; ignored"
msgstr "impossibile creare la cartella sounds \"%1\"; ignorato"
-#: libs/ardour/session_state.cc:2017
+#: libs/ardour/session_state.cc:2018
#, fuzzy
msgid "cannot create dead sounds directory \"%1\"; ignored"
msgstr "impossibile creare la cartella sounds \"%1\"; ignorato"
-#: libs/ardour/session_state.cc:2028
+#: libs/ardour/session_state.cc:2029
#, fuzzy
msgid "cannot create peak file directory \"%1\"; ignored"
msgstr "impossibile creare la cartella per la sessione %1; ignorato"
-#: libs/ardour/session_state.cc:2167 libs/ardour/session_state.cc:2188
+#: libs/ardour/session_state.cc:2168 libs/ardour/session_state.cc:2189
msgid "Session: cannot create Playlist from XML description."
msgstr "Sessione: impossibile creare Playlist dalla descrizione XML"
-#: libs/ardour/session_state.cc:2227
+#: libs/ardour/session_state.cc:2228
msgid "Session: cannot create Named Selection from XML description."
msgstr "Sessione: impossibile creare Named Selection dalla descizione XML"
-#: libs/ardour/session_state.cc:2359
+#: libs/ardour/session_state.cc:2360
msgid "Unknown node \"%1\" found in Connections list from state file"
msgstr "Nodo sconosciuto \"%1\" trovato in Connections list dal file di stato"
-#: libs/ardour/session_state.cc:3196
+#: libs/ardour/session_state.cc:3197
#, fuzzy
msgid "cannot remove dead sound file %1 (%2)"
msgstr "impossibile accedere al file audio per il click %1 (%2)"
-#: libs/ardour/session_time.cc:375
+#: libs/ardour/session_time.cc:374
msgid "Unknown JACK transport state %1 in sync callback"
msgstr ""
-#: libs/ardour/session_timefx.cc:76
+#: libs/ardour/session_timefx.cc:77
msgid "tempoize: error creating name for new audio file based on %1"
msgstr ""
"tempoize: errore nel creare il nome per il nuovo file audio basato su %1"
-#: libs/ardour/session_timefx.cc:87
+#: libs/ardour/session_timefx.cc:88
msgid "tempoize: error creating new audio file %1 (%2)"
msgstr "tempoize: errore nel creare un nuovo file audio %1 (%2)"
-#: libs/ardour/session_timefx.cc:113
+#: libs/ardour/session_timefx.cc:114
msgid "tempoize: error reading data from %1"
msgstr "tempoize: errore nel leggere dati da %1"
-#: libs/ardour/session_timefx.cc:126 libs/ardour/session_timefx.cc:138
+#: libs/ardour/session_timefx.cc:127 libs/ardour/session_timefx.cc:139
msgid "error writing tempo-adjusted data to %1"
msgstr ""
-#: libs/ardour/session_timefx.cc:144
+#: libs/ardour/session_timefx.cc:145
msgid "timefx code failure. please notify ardour-developers."
msgstr ""
-#: libs/ardour/session_transport.cc:116
+#: libs/ardour/session_transport.cc:117
msgid "Cannot loop - no loop range defined"
msgstr ""
-#: libs/ardour/session_transport.cc:478
+#: libs/ardour/session_transport.cc:479
msgid ""
"Seamless looping cannot be supported while Ardour is using JACK transport.\n"
"Recommend changing the configured options"
msgstr ""
-#: libs/ardour/session_transport.cc:754
+#: libs/ardour/session_transport.cc:755
msgid ""
"Global varispeed cannot be supported while Ardour is connected to JACK "
"transport control"
msgstr ""
-#: libs/ardour/session_transport.cc:954
+#: libs/ardour/session_transport.cc:955
msgid "please stop the transport before adjusting slave settings"
msgstr ""
-#: libs/ardour/session_transport.cc:990
+#: libs/ardour/session_transport.cc:991
msgid "No MTC port defined: MTC slaving is impossible."
msgstr ""
@@ -1915,22 +1915,22 @@ msgstr ""
msgid "Big-endian (Mac)"
msgstr ""
-#: libs/ardour/sndfilesource.cc:145
+#: libs/ardour/sndfilesource.cc:147
msgid "FileSource: cannot get host information for BWF header (%1)"
msgstr "FileSource: impossibile ottenere info sull'host dall'header BWF (%1)"
-#: libs/ardour/sndfilesource.cc:167
+#: libs/ardour/sndfilesource.cc:169
msgid ""
"cannot set broadcast info for audio file %1 (%2); dropping broadcast info "
"for this file"
msgstr ""
-#: libs/ardour/sndfilesource.cc:223
+#: libs/ardour/sndfilesource.cc:220
#, fuzzy
msgid "SndFileSource: cannot open file \"%1\" for %2 (%3)"
msgstr "SndFileSource: impossibile accedere al file \"%1\" (%2)"
-#: libs/ardour/sndfilesource.cc:229
+#: libs/ardour/sndfilesource.cc:226
msgid ""
"SndFileSource: file only contains %1 channels; %2 is invalid as a channel "
"number"
@@ -1938,169 +1938,169 @@ msgstr ""
"SndFileSource: il file contiene solo %1 canali; %2 non è valido come numero "
"di canale"
-#: libs/ardour/sndfilesource.cc:306
+#: libs/ardour/sndfilesource.cc:327
msgid "SndFileSource: could not seek to frame %1 within %2 (%3)"
msgstr ""
-#: libs/ardour/sndfilesource.cc:357
+#: libs/ardour/sndfilesource.cc:378
#, fuzzy
msgid "programming error: %1 %2"
msgstr "errore di programmazione: %1"
-#: libs/ardour/sndfilesource.cc:457
+#: libs/ardour/sndfilesource.cc:487 libs/ardour/sndfilesource.cc:533
msgid ""
"cannot set broadcast info for audio file %1; Dropping broadcast info for "
"this file"
msgstr ""
-#: libs/ardour/sndfilesource.cc:499
+#: libs/ardour/sndfilesource.cc:544
msgid "%1: cannot seek to %2"
msgstr ""
-#: libs/ardour/state_manager.cc:46
+#: libs/ardour/state_manager.cc:47
#, fuzzy
msgid "cleared history"
msgstr "pulito"
-#: libs/ardour/state_manager.cc:59
+#: libs/ardour/state_manager.cc:60
msgid ""
"programming error: illegal state ID (%1) passed to StateManager::set_state() "
"(range = 0-%2)"
msgstr ""
-#: libs/ardour/stateful.cc:100
+#: libs/ardour/stateful.cc:102
#, fuzzy
msgid "Error: could not write %1"
msgstr "Esportazione: impossibile scrivere dati sul file di output (%1)"
-#: libs/ardour/stateful.cc:114
+#: libs/ardour/stateful.cc:116
msgid "Could not understand XML file %1"
msgstr ""
-#: libs/ardour/tempo.cc:66
+#: libs/ardour/tempo.cc:67
msgid "TempoSection XML node has no \"start\" property"
msgstr ""
-#: libs/ardour/tempo.cc:74
+#: libs/ardour/tempo.cc:75
msgid "TempoSection XML node has an illegal \"start\" value"
msgstr ""
-#: libs/ardour/tempo.cc:81
+#: libs/ardour/tempo.cc:82
msgid "TempoSection XML node has no \"beats-per-minute\" property"
msgstr ""
-#: libs/ardour/tempo.cc:86
+#: libs/ardour/tempo.cc:87
msgid "TempoSection XML node has an illegal \"beats_per_minute\" value"
msgstr ""
-#: libs/ardour/tempo.cc:91
+#: libs/ardour/tempo.cc:92
msgid "TempoSection XML node has no \"movable\" property"
msgstr ""
-#: libs/ardour/tempo.cc:130
+#: libs/ardour/tempo.cc:131
msgid "MeterSection XML node has no \"start\" property"
msgstr ""
-#: libs/ardour/tempo.cc:138
+#: libs/ardour/tempo.cc:139
msgid "MeterSection XML node has an illegal \"start\" value"
msgstr ""
-#: libs/ardour/tempo.cc:145
+#: libs/ardour/tempo.cc:146
msgid "MeterSection XML node has no \"beats-per-bar\" property"
msgstr ""
-#: libs/ardour/tempo.cc:150
+#: libs/ardour/tempo.cc:151
msgid "MeterSection XML node has an illegal \"beats-per-bar\" value"
msgstr ""
-#: libs/ardour/tempo.cc:155
+#: libs/ardour/tempo.cc:156
msgid "MeterSection XML node has no \"note-type\" property"
msgstr ""
-#: libs/ardour/tempo.cc:160
+#: libs/ardour/tempo.cc:161
msgid "MeterSection XML node has an illegal \"note-type\" value"
msgstr ""
-#: libs/ardour/tempo.cc:165
+#: libs/ardour/tempo.cc:166
msgid "MeterSection XML node has no \"movable\" property"
msgstr ""
-#: libs/ardour/tempo.cc:258
+#: libs/ardour/tempo.cc:259
msgid "move metric"
msgstr ""
-#: libs/ardour/tempo.cc:329
+#: libs/ardour/tempo.cc:330
msgid "metric removed"
msgstr ""
-#: libs/ardour/tempo.cc:372
+#: libs/ardour/tempo.cc:373
#, fuzzy
msgid "add tempo"
msgstr "aggiungi regione"
-#: libs/ardour/tempo.cc:401
+#: libs/ardour/tempo.cc:402
#, fuzzy
msgid "replace tempo"
msgstr "sostituisci la regione"
-#: libs/ardour/tempo.cc:434
+#: libs/ardour/tempo.cc:435
msgid "add meter"
msgstr ""
-#: libs/ardour/tempo.cc:462
+#: libs/ardour/tempo.cc:463
#, fuzzy
msgid "replaced meter"
msgstr "sostituisci la regione"
-#: libs/ardour/tempo.cc:482 libs/ardour/tempo.cc:498
+#: libs/ardour/tempo.cc:483 libs/ardour/tempo.cc:499
msgid "programming error: no tempo section in tempo map!"
msgstr ""
-#: libs/ardour/tempo.cc:537
+#: libs/ardour/tempo.cc:538
msgid "programming error: unhandled MetricSection type"
msgstr ""
-#: libs/ardour/tempo.cc:1225 libs/ardour/tempo.cc:1237
+#: libs/ardour/tempo.cc:1226 libs/ardour/tempo.cc:1238
msgid "Tempo map: could not set new state, restoring old one."
msgstr ""
-#: libs/ardour/tempo.cc:1261
+#: libs/ardour/tempo.cc:1262
msgid "load XML data"
msgstr ""
-#: libs/ardour/utils.cc:245
+#: libs/ardour/utils.cc:246
#, fuzzy
msgid "illegal or badly-formed string used for path (%1)"
msgstr "il percorso indicato per il RAID è non valido o malformato"
-#: libs/ardour/utils.cc:250
+#: libs/ardour/utils.cc:251
#, fuzzy
msgid "path (%1) is ambiguous"
msgstr "il percorso indicato per la ricerca RAID è ambiguo"
-#: libs/ardour/vst_plugin.cc:186
+#: libs/ardour/vst_plugin.cc:187
#, fuzzy
msgid "cannot create VST chunk directory: %1"
msgstr "impossibile creare la cartella sounds \"%1\"; ignorato"
-#: libs/ardour/vst_plugin.cc:194
+#: libs/ardour/vst_plugin.cc:195
#, fuzzy
msgid "cannot check VST chunk directory: %1"
msgstr "impossibile determinare la cartella di lavoro corrente (%1)"
-#: libs/ardour/vst_plugin.cc:201
+#: libs/ardour/vst_plugin.cc:202
msgid "%1 exists but is not a directory"
msgstr ""
-#: libs/ardour/vst_plugin.cc:239
+#: libs/ardour/vst_plugin.cc:240
msgid "Bad node sent to VSTPlugin::set_state"
msgstr ""
-#: libs/ardour/vst_plugin.cc:342 libs/ardour/vst_plugin.cc:353
+#: libs/ardour/vst_plugin.cc:343 libs/ardour/vst_plugin.cc:354
msgid "no support for presets using chunks at this time"
msgstr ""
-#: libs/ardour/coreaudio_source.cc:98
+#: libs/ardour/coreaudiosource.cc:97
#, fuzzy
msgid ""
"CoreAudioSource: file only contains %1 channels; %2 is invalid as a channel "
@@ -2109,7 +2109,7 @@ msgstr ""
"SndFileSource: il file contiene solo %1 canali; %2 non è valido come numero "
"di canale"
-#: libs/ardour/coreaudio_source.cc:163
+#: libs/ardour/coreaudiosource.cc:162
msgid "CoreAudioSource: could not seek to frame %1 within %2 (%3)"
msgstr ""
diff --git a/libs/ardour/po/ru_RU.po b/libs/ardour/po/ru_RU.po
index be5221722a..aeeb1bf547 100644
--- a/libs/ardour/po/ru_RU.po
+++ b/libs/ardour/po/ru_RU.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libardour 0.716.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-06-20 16:23-0400\n"
+"POT-Creation-Date: 2006-06-29 21:03-0400\n"
"PO-Revision-Date: 2004-03-31 00:55+0300\n"
"Last-Translator: Igor Blinov pitstop@nm.ru\n"
"Language-Team: Russian\n"
@@ -14,245 +14,245 @@ msgstr ""
"Content-Type: text/plain; charset=koi8-r\n"
"Content-Transfer-Encoding: 8bit\n"
-#: libs/ardour/audio_diskstream.cc:336
+#: libs/ardour/audio_diskstream.cc:337
msgid "AudioDiskstream: Session doesn't know about a Playlist called \"%1\""
msgstr ""
-#: libs/ardour/audio_diskstream.cc:341
+#: libs/ardour/audio_diskstream.cc:342
msgid "AudioDiskstream: Playlist \"%1\" isn't an audio playlist"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:432
+#: libs/ardour/audio_diskstream.cc:433
msgid "AudioDiskstream %1: there is no existing playlist to make a copy of!"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:1113 libs/ardour/audio_diskstream.cc:1124
+#: libs/ardour/audio_diskstream.cc:1114 libs/ardour/audio_diskstream.cc:1125
msgid ""
"AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:1253
+#: libs/ardour/audio_diskstream.cc:1254
msgid "AudioDiskstream %1: cannot read %2 from playlist at frame %3"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:1620 libs/ardour/audio_diskstream.cc:1637
+#: libs/ardour/audio_diskstream.cc:1621 libs/ardour/audio_diskstream.cc:1638
msgid "AudioDiskstream %1: cannot write to disk"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:1697
+#: libs/ardour/audio_diskstream.cc:1698
msgid "AudioDiskstream \"%1\": cannot flush captured data to disk!"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:1794
+#: libs/ardour/audio_diskstream.cc:1796
msgid "%1: could not create region for complete audio file"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:1817
+#: libs/ardour/audio_diskstream.cc:1819
msgid "AudioDiskstream: could not create region for captured audio!"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:1872
+#: libs/ardour/audio_diskstream.cc:1874
#, fuzzy
msgid "programmer error: %1"
msgstr "ÏÛÉÂËÁ ÐÒÏÇÒÁÍÍÙ: "
-#: libs/ardour/audio_diskstream.cc:2144
+#: libs/ardour/audio_diskstream.cc:2146
msgid "AudioDiskstream: channel %1 out of range"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:2169
+#: libs/ardour/audio_diskstream.cc:2171
msgid "%1:%2 new capture file not initialized correctly"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:2402
+#: libs/ardour/audio_diskstream.cc:2404
msgid "Location \"%1\" not valid for track loop (start >= end)"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:2483
+#: libs/ardour/audio_diskstream.cc:2485
msgid "%1: cannot restore pending capture source file %2"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:2505
+#: libs/ardour/audio_diskstream.cc:2507
msgid "%1: incorrect number of pending sources listed - ignoring them all"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:2521
+#: libs/ardour/audio_diskstream.cc:2523
msgid "%1: cannot create whole-file region from pending capture sources"
msgstr ""
-#: libs/ardour/audio_diskstream.cc:2533
+#: libs/ardour/audio_diskstream.cc:2535
msgid "%1: cannot create region from pending capture sources"
msgstr ""
-#: libs/ardour/audio_library.cc:91
+#: libs/ardour/audio_library.cc:92
msgid "channels"
msgstr ""
-#: libs/ardour/audio_library.cc:92
+#: libs/ardour/audio_library.cc:93
#, fuzzy
msgid "samplerate"
msgstr "ÒÁÚÄÅÌÉÔØ"
-#: libs/ardour/audio_library.cc:93
+#: libs/ardour/audio_library.cc:94
msgid "resolution"
msgstr ""
-#: libs/ardour/audio_library.cc:94
+#: libs/ardour/audio_library.cc:95
msgid "format"
msgstr ""
-#: libs/ardour/audio_library.cc:101
+#: libs/ardour/audio_library.cc:102
msgid "Could not open %1. Audio Library not saved"
msgstr ""
-#: libs/ardour/audio_playlist.cc:52 libs/ardour/audio_playlist.cc:62
-#: libs/ardour/audio_playlist.cc:73 libs/ardour/audio_playlist.cc:120
+#: libs/ardour/audio_playlist.cc:53 libs/ardour/audio_playlist.cc:63
+#: libs/ardour/audio_playlist.cc:74 libs/ardour/audio_playlist.cc:121
#: libs/ardour/insert.cc:76 libs/ardour/insert.cc:95 libs/ardour/insert.cc:120
-#: libs/ardour/insert.cc:838 libs/ardour/insert.cc:846 libs/ardour/send.cc:38
-#: libs/ardour/send.cc:52 libs/ardour/send.cc:61
-#: libs/ardour/session_state.cc:1620 libs/ardour/session_state.cc:1666
+#: libs/ardour/insert.cc:838 libs/ardour/insert.cc:846 libs/ardour/send.cc:39
+#: libs/ardour/send.cc:53 libs/ardour/send.cc:62
+#: libs/ardour/session_state.cc:1621 libs/ardour/session_state.cc:1667
msgid "initial state"
msgstr ""
-#: libs/ardour/audio_playlist.cc:274 libs/ardour/audio_playlist.cc:768
+#: libs/ardour/audio_playlist.cc:275 libs/ardour/audio_playlist.cc:769
msgid ""
"programming error: non-audio Region passed to remove_overlap in audio "
"playlist"
msgstr ""
-#: libs/ardour/audio_playlist.cc:401
+#: libs/ardour/audio_playlist.cc:402
msgid ""
"programming error: non-audio Region tested for overlap in audio playlist"
msgstr ""
-#: libs/ardour/audio_playlist.cc:877
+#: libs/ardour/audio_playlist.cc:878
msgid "xfade change"
msgstr ""
-#: libs/ardour/audio_playlist.cc:932
+#: libs/ardour/audio_playlist.cc:933
msgid "region modified"
msgstr ""
-#: libs/ardour/audio_track.cc:132 libs/ardour/io.cc:1715
-#: libs/ardour/io.cc:1825
+#: libs/ardour/audio_track.cc:125 libs/ardour/io.cc:1716
+#: libs/ardour/io.cc:1826
msgid "Unknown connection \"%1\" listed for input of %2"
msgstr ""
-#: libs/ardour/audio_track.cc:134 libs/ardour/io.cc:1717
-#: libs/ardour/io.cc:1827
+#: libs/ardour/audio_track.cc:127 libs/ardour/io.cc:1718
+#: libs/ardour/io.cc:1828
msgid "in 1"
msgstr ""
-#: libs/ardour/audio_track.cc:135 libs/ardour/io.cc:1718
-#: libs/ardour/io.cc:1828
+#: libs/ardour/audio_track.cc:128 libs/ardour/io.cc:1719
+#: libs/ardour/io.cc:1829
msgid "No input connections available as a replacement"
msgstr ""
-#: libs/ardour/audio_track.cc:139 libs/ardour/io.cc:1722
-#: libs/ardour/io.cc:1832
+#: libs/ardour/audio_track.cc:132 libs/ardour/io.cc:1723
+#: libs/ardour/io.cc:1833
msgid "Connection %1 was not available - \"in 1\" used instead"
msgstr ""
-#: libs/ardour/audio_track.cc:148 libs/ardour/io.cc:1841
+#: libs/ardour/audio_track.cc:141 libs/ardour/io.cc:1842
msgid "improper input channel list in XML node (%1)"
msgstr ""
-#: libs/ardour/audio_track.cc:193 libs/ardour/audio_track.cc:206
+#: libs/ardour/audio_track.cc:186 libs/ardour/audio_track.cc:199
msgid "AudioTrack: diskstream \"%1\" not known by session"
msgstr ""
-#: libs/ardour/audio_track.cc:304
+#: libs/ardour/audio_track.cc:297
msgid ""
"MIDI rec_enable control specification for %1 is incomplete, so it has been "
"ignored"
msgstr ""
-#: libs/ardour/audio_track.cc:316
+#: libs/ardour/audio_track.cc:309
msgid "programming error: AudioTrack given state without diskstream!"
msgstr ""
-#: libs/ardour/audioengine.cc:149
+#: libs/ardour/audioengine.cc:144
msgid "cannot activate JACK client"
msgstr "ÎÅ ÕÄÁÌÏÓØ ÁËÔÉ×ÉÒÏ×ÁÔØ ËÌÉÅÎÔÁ JACK ÓÅÒ×ÅÒÁ"
-#: libs/ardour/audioengine.cc:400
+#: libs/ardour/audioengine.cc:395
msgid "register audio input port called before engine was started"
msgstr ""
-#: libs/ardour/audioengine.cc:431
+#: libs/ardour/audioengine.cc:426
msgid "register audio output port called before engine was started"
msgstr ""
-#: libs/ardour/audioengine.cc:492
+#: libs/ardour/audioengine.cc:487
msgid "connect called before engine was started"
msgstr ""
-#: libs/ardour/audioengine.cc:508
+#: libs/ardour/audioengine.cc:503
msgid "AudioEngine: cannot connect %1 (%2) to %3 (%4)"
msgstr ""
-#: libs/ardour/audioengine.cc:521 libs/ardour/audioengine.cc:550
+#: libs/ardour/audioengine.cc:516 libs/ardour/audioengine.cc:545
msgid "disconnect called before engine was started"
msgstr ""
-#: libs/ardour/audioengine.cc:608
+#: libs/ardour/audioengine.cc:603
msgid "get_port_by_name() called before engine was started"
msgstr ""
-#: libs/ardour/audioengine.cc:641
+#: libs/ardour/audioengine.cc:636
msgid "get_ports called before engine was started"
msgstr ""
-#: libs/ardour/audioengine.cc:716
+#: libs/ardour/audioengine.cc:711
msgid "get_nth_physical called before engine was started"
msgstr ""
-#: libs/ardour/audioengine.cc:744
+#: libs/ardour/audioengine.cc:739
msgid "get_port_total_latency() called with no JACK client connection"
msgstr ""
-#: libs/ardour/audioengine.cc:750
+#: libs/ardour/audioengine.cc:745
msgid "get_port_total_latency() called before engine was started"
msgstr ""
-#: libs/ardour/audioengine.cc:874
+#: libs/ardour/audioengine.cc:869
msgid "Unable to connect to JACK server"
msgstr ""
-#: libs/ardour/audioengine.cc:877
+#: libs/ardour/audioengine.cc:872
msgid "Could not connect to JACK server as \"%1\""
msgstr ""
-#: libs/ardour/audioengine.cc:882
+#: libs/ardour/audioengine.cc:877
msgid "JACK server started"
msgstr ""
-#: libs/ardour/audioengine.cc:916
+#: libs/ardour/audioengine.cc:911
msgid "cannot shutdown connection to JACK"
msgstr ""
-#: libs/ardour/audioengine.cc:941
+#: libs/ardour/audioengine.cc:936
msgid "failed to connect to JACK"
msgstr ""
-#: libs/ardour/audioengine.cc:957
+#: libs/ardour/audioengine.cc:952
msgid "could not reregister %1"
msgstr ""
-#: libs/ardour/audioengine.cc:1014
+#: libs/ardour/audioengine.cc:1009
msgid "could not reconnect %1 and %2 (err = %3)"
msgstr ""
-#: libs/ardour/audiofilesource.cc:444 libs/ardour/session_state.cc:3094
+#: libs/ardour/audiofilesource.cc:444 libs/ardour/session_state.cc:3095
msgid ""
"there are already 1000 files with names like %1; versioning discontinued"
msgstr ""
-#: libs/ardour/audiofilesource.cc:458 libs/ardour/session_state.cc:3108
+#: libs/ardour/audiofilesource.cc:458 libs/ardour/session_state.cc:3109
msgid "cannot rename audio file source from %1 to %2 (%3)"
msgstr ""
-#: libs/ardour/audiofilesource.cc:465 libs/ardour/session_state.cc:3123
+#: libs/ardour/audiofilesource.cc:465 libs/ardour/session_state.cc:3124
msgid "cannot remove peakfile %1 for %2 (%3)"
msgstr ""
@@ -278,21 +278,21 @@ msgstr ""
msgid "Filesource: cannot check for existing file (%1): %2"
msgstr ""
-#: libs/ardour/audiofilesource.cc:639 libs/ardour/insert.cc:525
-#: libs/ardour/sndfilesource.cc:111
+#: libs/ardour/audiofilesource.cc:636 libs/ardour/insert.cc:525
+#: libs/ardour/sndfilesource.cc:113
#, fuzzy
msgid "programming error: %1"
msgstr "ÏÛÉÂËÁ ÐÒÏÇÒÁÍÍÙ: "
-#: libs/ardour/audiofilesource.cc:644
+#: libs/ardour/audiofilesource.cc:641
msgid "cannot rename audio file for %1 to %2"
msgstr ""
-#: libs/ardour/audiofilter.cc:44
+#: libs/ardour/audiofilter.cc:45
msgid "audiofilter: error creating name for new audio file based on %1"
msgstr ""
-#: libs/ardour/audiofilter.cc:57
+#: libs/ardour/audiofilter.cc:58
msgid "audiofilter: error creating new audio file %1 (%2)"
msgstr ""
@@ -365,147 +365,147 @@ msgstr ""
msgid "%1: could not write peak file data (%2)"
msgstr ""
-#: libs/ardour/automation_event.cc:64 libs/ardour/location.cc:344
-#: libs/ardour/tempo.cc:225
+#: libs/ardour/automation_event.cc:65 libs/ardour/location.cc:345
+#: libs/ardour/tempo.cc:226
msgid "initial"
msgstr ""
-#: libs/ardour/automation_event.cc:231
+#: libs/ardour/automation_event.cc:232
msgid "cleared"
msgstr ""
-#: libs/ardour/automation_event.cc:403
+#: libs/ardour/automation_event.cc:404
msgid "added event"
msgstr ""
-#: libs/ardour/automation_event.cc:420
+#: libs/ardour/automation_event.cc:421
#, fuzzy
msgid "removed event"
msgstr "ÕÄÁÌÉÔØ ÏÂÌÁÓÔØ"
-#: libs/ardour/automation_event.cc:435
+#: libs/ardour/automation_event.cc:436
msgid "removed multiple events"
msgstr ""
-#: libs/ardour/automation_event.cc:466 libs/ardour/automation_event.cc:497
+#: libs/ardour/automation_event.cc:467 libs/ardour/automation_event.cc:498
#, fuzzy
msgid "removed range"
msgstr "ÕÄÁÌÉÔØ ÏÂÌÁÓÔØ"
-#: libs/ardour/automation_event.cc:527
+#: libs/ardour/automation_event.cc:528
msgid "event range adjusted"
msgstr ""
-#: libs/ardour/automation_event.cc:549
+#: libs/ardour/automation_event.cc:550
msgid "event adjusted"
msgstr ""
-#: libs/ardour/automation_event.cc:664 libs/ardour/automation_event.cc:769
+#: libs/ardour/automation_event.cc:665 libs/ardour/automation_event.cc:770
#: libs/ardour/panner.cc:1041
#, fuzzy
msgid "programming error:"
msgstr "ÏÛÉÂËÁ ÐÒÏÇÒÁÍÍÙ: "
-#: libs/ardour/automation_event.cc:1078
+#: libs/ardour/automation_event.cc:1079
msgid "cut/copy/clear"
msgstr ""
-#: libs/ardour/automation_event.cc:1111
+#: libs/ardour/automation_event.cc:1112
msgid "copy"
msgstr ""
-#: libs/ardour/automation_event.cc:1179 libs/ardour/playlist.cc:939
+#: libs/ardour/automation_event.cc:1180 libs/ardour/playlist.cc:939
msgid "paste"
msgstr "×ÓÔÁ×ÉÔØ"
-#: libs/ardour/automation_event.cc:1234
+#: libs/ardour/automation_event.cc:1235
msgid ""
"automation list: no x-coordinate stored for control point (point ignored)"
msgstr ""
-#: libs/ardour/automation_event.cc:1240
+#: libs/ardour/automation_event.cc:1241
msgid ""
"automation list: no y-coordinate stored for control point (point ignored)"
msgstr ""
-#: libs/ardour/configuration.cc:79
+#: libs/ardour/configuration.cc:80
#, fuzzy
msgid "loading system configuration file %1"
msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÐÒÏÞÉÔÁÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÒÏÇÒÁÍÍÙ \"%1\""
-#: libs/ardour/configuration.cc:82
+#: libs/ardour/configuration.cc:83
msgid "Ardour: cannot read system configuration file \"%1\""
msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÐÒÏÞÉÔÁÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÒÏÇÒÁÍÍÙ \"%1\""
-#: libs/ardour/configuration.cc:87
+#: libs/ardour/configuration.cc:88
msgid "Ardour: system configuration file \"%1\" not loaded successfully."
msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÚÁÇÒÕÚÉÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÒÏÇÒÁÍÍÙ \"%1\"."
-#: libs/ardour/configuration.cc:104
+#: libs/ardour/configuration.cc:105
#, fuzzy
msgid "loading user configuration file %1"
msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÐÒÏÞÉÔÁÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÏÌØÚÏ×ÁÔÅÌÑ \"%1\""
-#: libs/ardour/configuration.cc:107
+#: libs/ardour/configuration.cc:108
msgid "Ardour: cannot read configuration file \"%1\""
msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÐÒÏÞÉÔÁÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÏÌØÚÏ×ÁÔÅÌÑ \"%1\""
-#: libs/ardour/configuration.cc:112
+#: libs/ardour/configuration.cc:113
#, fuzzy
msgid "Ardour: user configuration file \"%1\" not loaded successfully."
msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÚÁÇÒÕÚÉÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÏÌØÚÏ×ÁÔÅÌÑ \"%1\"."
-#: libs/ardour/configuration.cc:136
+#: libs/ardour/configuration.cc:137
#, fuzzy
msgid "Config file %1 not saved"
msgstr "æÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÎÅ ÓÏÈÒÁΣÎ"
-#: libs/ardour/configuration.cc:209
+#: libs/ardour/configuration.cc:210
msgid "ill-formed MIDI port specification in ardour rcfile (ignored)"
msgstr ""
-#: libs/ardour/connection.cc:182
+#: libs/ardour/connection.cc:183
msgid "Node for Connection has no \"name\" property"
msgstr ""
-#: libs/ardour/connection.cc:190
+#: libs/ardour/connection.cc:191
msgid "Node for Connection has no \"connections\" property"
msgstr ""
-#: libs/ardour/connection.cc:226 libs/ardour/io.cc:1901
+#: libs/ardour/connection.cc:227 libs/ardour/io.cc:1902
msgid "IO: badly formed string in XML node for inputs \"%1\""
msgstr ""
-#: libs/ardour/connection.cc:231 libs/ardour/io.cc:1906
+#: libs/ardour/connection.cc:232 libs/ardour/io.cc:1907
msgid "bad input string in XML node \"%1\""
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:82
+#: libs/ardour/control_protocol_manager.cc:80
msgid "control protocol name \"%1\" has no descriptor"
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:87
+#: libs/ardour/control_protocol_manager.cc:85
msgid "control protocol name \"%1\" could not be initialized"
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:143
+#: libs/ardour/control_protocol_manager.cc:141
msgid "Instantiating mandatory control protocol %1"
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:177
+#: libs/ardour/control_protocol_manager.cc:175
msgid "Control protocol %1 not usable"
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:189
+#: libs/ardour/control_protocol_manager.cc:187
msgid "Control surface protocol discovered: \"%1\""
msgstr ""
-#: libs/ardour/control_protocol_manager.cc:207
+#: libs/ardour/control_protocol_manager.cc:205
#, fuzzy
msgid "ControlProtocolManager: cannot load module \"%1\" (%2)"
msgstr "LADSPA: ÎÅ ÕÄÁÌÏÓØ ÚÁÇÒÕÚÉÔØ ÍÏÄÕÌØ \"%1\" (%2)"
-#: libs/ardour/control_protocol_manager.cc:215
+#: libs/ardour/control_protocol_manager.cc:213
msgid "ControlProtocolManager: module \"%1\" has no descriptor function."
msgstr ""
@@ -533,100 +533,100 @@ msgstr ""
msgid "old-style crossfade information - no position information"
msgstr ""
-#: libs/ardour/curve.cc:111 libs/ardour/globals.cc:339
+#: libs/ardour/curve.cc:112 libs/ardour/globals.cc:340
#: libs/ardour/insert.cc:454 libs/ardour/session.cc:2466
#: libs/ardour/session.cc:2518
msgid "programming error: "
msgstr "ÏÛÉÂËÁ ÐÒÏÇÒÁÍÍÙ: "
-#: libs/ardour/cycle_timer.cc:35
+#: libs/ardour/cycle_timer.cc:37
msgid "CycleTimer::get_mhz(): can't open /proc/cpuinfo"
msgstr ""
-#: libs/ardour/cycle_timer.cc:47
+#: libs/ardour/cycle_timer.cc:49
msgid "CycleTimer::get_mhz(): cannot locate cpu MHz in /proc/cpuinfo"
msgstr ""
-#: libs/ardour/cycle_timer.cc:70
+#: libs/ardour/cycle_timer.cc:72
msgid "cannot locate cpu MHz in /proc/cpuinfo"
msgstr ""
-#: libs/ardour/destructive_filesource.cc:187
+#: libs/ardour/destructive_filesource.cc:188
msgid "DestructiveFileSource: \"%1\" bad read retval: %2 of %5 (%3: %4)"
msgstr ""
-#: libs/ardour/destructive_filesource.cc:200
-#: libs/ardour/destructive_filesource.cc:242
-#: libs/ardour/destructive_filesource.cc:249
+#: libs/ardour/destructive_filesource.cc:201
+#: libs/ardour/destructive_filesource.cc:243
+#: libs/ardour/destructive_filesource.cc:250
msgid "DestructiveFileSource: \"%1\" bad write (%2)"
msgstr ""
-#: libs/ardour/globals.cc:108
+#: libs/ardour/globals.cc:109
msgid "no MIDI ports specified: no MMC or MTC control possible"
msgstr ""
-#: libs/ardour/globals.cc:123
+#: libs/ardour/globals.cc:124
msgid "MIDI port specifications for \"%1\" are not understandable."
msgstr ""
-#: libs/ardour/globals.cc:136 libs/ardour/globals.cc:140
-#: libs/ardour/globals.cc:144
+#: libs/ardour/globals.cc:137 libs/ardour/globals.cc:141
+#: libs/ardour/globals.cc:145
msgid "default"
msgstr ""
-#: libs/ardour/globals.cc:172
+#: libs/ardour/globals.cc:173
msgid "No MMC control (MIDI port \"%1\" not available)"
msgstr ""
-#: libs/ardour/globals.cc:178
+#: libs/ardour/globals.cc:179
msgid "No MTC support (MIDI port \"%1\" not available)"
msgstr ""
-#: libs/ardour/globals.cc:183
+#: libs/ardour/globals.cc:184
msgid "No MIDI parameter support (MIDI port \"%1\" not available)"
msgstr ""
-#: libs/ardour/import.cc:74
+#: libs/ardour/import.cc:75
msgid "Import: cannot open input sound file \"%1\""
msgstr ""
-#: libs/ardour/import.cc:79
+#: libs/ardour/import.cc:80
msgid "resampling audio"
msgstr ""
-#: libs/ardour/import.cc:83
+#: libs/ardour/import.cc:84
msgid "Import: cannot open converted sound file \"%1\""
msgstr ""
-#: libs/ardour/import.cc:88
+#: libs/ardour/import.cc:89
msgid "Import: error while resampling sound file \"%1\""
msgstr ""
-#: libs/ardour/import.cc:147
+#: libs/ardour/import.cc:148
msgid "Session::import_audiofile: cannot open new file source for channel %1"
msgstr ""
-#: libs/ardour/import.cc:166
+#: libs/ardour/import.cc:167
msgid "converting audio"
msgstr ""
-#: libs/ardour/import.cc:198
+#: libs/ardour/import.cc:199
msgid "building region"
msgstr ""
-#: libs/ardour/import.cc:200
+#: libs/ardour/import.cc:201
msgid "building regions"
msgstr ""
-#: libs/ardour/import.cc:324
+#: libs/ardour/import.cc:325
msgid "Import: could not open temp file: %1"
msgstr ""
-#: libs/ardour/import.cc:333
+#: libs/ardour/import.cc:334
msgid "Import: src_new() failed : %1"
msgstr ""
-#: libs/ardour/import.cc:361
+#: libs/ardour/import.cc:362
msgid "Import: %1"
msgstr "éÍÐÏÒÔ: %1"
@@ -680,223 +680,223 @@ msgstr ""
msgid "non-port insert XML used for port plugin insert"
msgstr ""
-#: libs/ardour/io.cc:597
+#: libs/ardour/io.cc:598
msgid "IO: cannot disconnect input port %1 from %2"
msgstr ""
-#: libs/ardour/io.cc:665
+#: libs/ardour/io.cc:666
msgid "IO: cannot disconnect output port %1 from %2"
msgstr ""
-#: libs/ardour/io.cc:806 libs/ardour/io.cc:1150 libs/ardour/io.cc:1276
+#: libs/ardour/io.cc:807 libs/ardour/io.cc:1151 libs/ardour/io.cc:1277
#, c-format
msgid "%s/out"
msgstr ""
-#: libs/ardour/io.cc:808 libs/ardour/io.cc:1152 libs/ardour/io.cc:1278
-#: libs/ardour/io.cc:2848
+#: libs/ardour/io.cc:809 libs/ardour/io.cc:1153 libs/ardour/io.cc:1279
+#: libs/ardour/io.cc:2849
#, c-format
msgid "%s/out %u"
msgstr ""
-#: libs/ardour/io.cc:812 libs/ardour/io.cc:1157 libs/ardour/io.cc:1282
+#: libs/ardour/io.cc:813 libs/ardour/io.cc:1158 libs/ardour/io.cc:1283
msgid "IO: cannot register output port %1"
msgstr ""
-#: libs/ardour/io.cc:907 libs/ardour/io.cc:1010 libs/ardour/io.cc:1116
+#: libs/ardour/io.cc:908 libs/ardour/io.cc:1011 libs/ardour/io.cc:1117
#, c-format
msgid "%s/in"
msgstr ""
-#: libs/ardour/io.cc:909 libs/ardour/io.cc:1013 libs/ardour/io.cc:1119
-#: libs/ardour/io.cc:2818
+#: libs/ardour/io.cc:910 libs/ardour/io.cc:1014 libs/ardour/io.cc:1120
+#: libs/ardour/io.cc:2819
#, c-format
msgid "%s/in %u"
msgstr ""
-#: libs/ardour/io.cc:913 libs/ardour/io.cc:1019 libs/ardour/io.cc:1124
+#: libs/ardour/io.cc:914 libs/ardour/io.cc:1020 libs/ardour/io.cc:1125
msgid "IO: cannot register input port %1"
msgstr ""
-#: libs/ardour/io.cc:1540
+#: libs/ardour/io.cc:1541
msgid "IO::connecting_became_legal() called without a pending state node"
msgstr ""
-#: libs/ardour/io.cc:1563
+#: libs/ardour/io.cc:1564
msgid "IO::ports_became_legal() called without a pending state node"
msgstr ""
-#: libs/ardour/io.cc:1593
+#: libs/ardour/io.cc:1594
msgid "incorrect XML node \"%1\" passed to IO object"
msgstr ""
-#: libs/ardour/io.cc:1648
+#: libs/ardour/io.cc:1649
msgid ""
"MIDI gain control specification for %1 is incomplete, so it has been ignored"
msgstr ""
-#: libs/ardour/io.cc:1738 libs/ardour/io.cc:1850
+#: libs/ardour/io.cc:1739 libs/ardour/io.cc:1851
msgid "Unknown connection \"%1\" listed for output of %2"
msgstr ""
-#: libs/ardour/io.cc:1740 libs/ardour/io.cc:1852
+#: libs/ardour/io.cc:1741 libs/ardour/io.cc:1853
msgid "out 1"
msgstr ""
-#: libs/ardour/io.cc:1741 libs/ardour/io.cc:1853
+#: libs/ardour/io.cc:1742 libs/ardour/io.cc:1854
msgid "No output connections available as a replacement"
msgstr ""
-#: libs/ardour/io.cc:1745 libs/ardour/io.cc:1857
+#: libs/ardour/io.cc:1746 libs/ardour/io.cc:1858
msgid "Connection %1 was not available - \"out 1\" used instead"
msgstr ""
-#: libs/ardour/io.cc:1759
+#: libs/ardour/io.cc:1760
msgid "%1: cannot create I/O ports"
msgstr ""
-#: libs/ardour/io.cc:1866
+#: libs/ardour/io.cc:1867
msgid "improper output channel list in XML node (%1)"
msgstr ""
-#: libs/ardour/io.cc:1951
+#: libs/ardour/io.cc:1952
msgid "IO: badly formed string in XML node for outputs \"%1\""
msgstr ""
-#: libs/ardour/io.cc:1956
+#: libs/ardour/io.cc:1957
msgid "IO: bad output string in XML node \"%1\""
msgstr ""
-#: libs/ardour/io.cc:2524
+#: libs/ardour/io.cc:2525
msgid "%1: could not open automation event file \"%2\""
msgstr ""
-#: libs/ardour/io.cc:2563
+#: libs/ardour/io.cc:2564
msgid "%1: cannot open automation event file \"%2\""
msgstr ""
-#: libs/ardour/io.cc:2578
+#: libs/ardour/io.cc:2579
msgid "badly formed version number in automation event file \"%1\""
msgstr ""
-#: libs/ardour/io.cc:2582
+#: libs/ardour/io.cc:2583
msgid "no version information in automation event file \"%1\""
msgstr ""
-#: libs/ardour/io.cc:2587
+#: libs/ardour/io.cc:2588
msgid "mismatched automation event file version (%1)"
msgstr ""
-#: libs/ardour/io.cc:2595
+#: libs/ardour/io.cc:2596
msgid "badly formatted automation event record at line %1 of %2 (ignored)"
msgstr ""
-#: libs/ardour/io.cc:2615
+#: libs/ardour/io.cc:2616
msgid "dubious automation event found (and ignored)"
msgstr ""
-#: libs/ardour/io.cc:2619 libs/ardour/panner.cc:438
+#: libs/ardour/io.cc:2620 libs/ardour/panner.cc:438
#: libs/ardour/redirect.cc:148
msgid "loaded from disk"
msgstr ""
-#: libs/ardour/io.cc:2790
+#: libs/ardour/io.cc:2791
msgid "automation write/touch"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:86
+#: libs/ardour/ladspa_plugin.cc:87
msgid "LADSPA: module has no descriptor function."
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:91
+#: libs/ardour/ladspa_plugin.cc:92
msgid "LADSPA: plugin has gone away since discovery!"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:98
+#: libs/ardour/ladspa_plugin.cc:99
msgid "LADSPA: \"%1\" cannot be used, since it cannot do inplace processing"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:328
+#: libs/ardour/ladspa_plugin.cc:329
msgid ""
"illegal parameter number used with plugin \"%1\". This mayindicate a change "
"in the plugin design, and presets may beinvalid"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:429
+#: libs/ardour/ladspa_plugin.cc:430
msgid "Bad node sent to LadspaPlugin::set_state"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:442
+#: libs/ardour/ladspa_plugin.cc:443
msgid "LADSPA: no ladspa port number"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:448
+#: libs/ardour/ladspa_plugin.cc:449
msgid "LADSPA: no ladspa port data"
msgstr ""
-#: libs/ardour/ladspa_plugin.cc:497
+#: libs/ardour/ladspa_plugin.cc:498
msgid ""
"LADSPA LadspaPlugin MIDI control specification for port %1 is incomplete, so "
"it has been ignored"
msgstr ""
-#: libs/ardour/location.cc:268
+#: libs/ardour/location.cc:269
msgid "incorrect XML node passed to Location::set_state"
msgstr ""
-#: libs/ardour/location.cc:275
+#: libs/ardour/location.cc:276
msgid "XML node for Location has no name information"
msgstr ""
-#: libs/ardour/location.cc:282
+#: libs/ardour/location.cc:283
msgid "XML node for Location has no start information"
msgstr ""
-#: libs/ardour/location.cc:293
+#: libs/ardour/location.cc:294
msgid "XML node for Location has no end information"
msgstr ""
-#: libs/ardour/location.cc:302
+#: libs/ardour/location.cc:303
msgid "XML node for Location has no flags information"
msgstr ""
-#: libs/ardour/location.cc:390
+#: libs/ardour/location.cc:391
msgid "Locations: attempt to use unknown location as selected location"
msgstr ""
-#: libs/ardour/location.cc:417 libs/ardour/playlist.cc:1187
+#: libs/ardour/location.cc:418 libs/ardour/playlist.cc:1187
msgid "clear"
msgstr ""
-#: libs/ardour/location.cc:442
+#: libs/ardour/location.cc:443
msgid "clear markers"
msgstr ""
-#: libs/ardour/location.cc:470
+#: libs/ardour/location.cc:471
msgid "clear ranges"
msgstr ""
-#: libs/ardour/location.cc:488
+#: libs/ardour/location.cc:489
msgid "add"
msgstr "ÄÏÂÁ×ÉÔØ"
-#: libs/ardour/location.cc:526
+#: libs/ardour/location.cc:527
msgid "remove"
msgstr "ÕÄÁÌÉÔØ"
-#: libs/ardour/location.cc:566
+#: libs/ardour/location.cc:567
msgid "incorrect XML mode passed to Locations::set_state"
msgstr ""
-#: libs/ardour/mtc_slave.cc:195
+#: libs/ardour/mtc_slave.cc:196
msgid "MTC Slave: atomic read of current time failed, sleeping!"
msgstr ""
-#: libs/ardour/named_selection.cc:76
+#: libs/ardour/named_selection.cc:77
msgid "Chunk %1 uses an unknown playlist \"%2\""
msgstr ""
-#: libs/ardour/named_selection.cc:79
+#: libs/ardour/named_selection.cc:80
msgid "Chunk %1 contains misformed playlist information"
msgstr ""
@@ -1003,62 +1003,62 @@ msgstr ""
msgid "nudged"
msgstr ""
-#: libs/ardour/playlist_factory.cc:26 libs/ardour/playlist_factory.cc:41
+#: libs/ardour/playlist_factory.cc:49 libs/ardour/playlist_factory.cc:64
msgid ""
"programming error: Playlist::createRegion called with unknown Region type"
msgstr ""
-#: libs/ardour/playlist_factory.cc:63
+#: libs/ardour/playlist_factory.cc:86
msgid ""
"programming error: Playlist::copyPlaylist called with unknown Playlist type"
msgstr ""
-#: libs/ardour/plugin.cc:327
+#: libs/ardour/plugin.cc:328
msgid "Could not locate HOME. Preset not saved."
msgstr ""
-#: libs/ardour/plugin.cc:337 libs/ardour/plugin.cc:343
+#: libs/ardour/plugin.cc:338 libs/ardour/plugin.cc:344
msgid "Could not create %1. Preset not saved. (%2)"
msgstr ""
-#: libs/ardour/plugin.cc:348
+#: libs/ardour/plugin.cc:349
msgid "Error saving presets file %1."
msgstr ""
-#: libs/ardour/plugin_manager.cc:193
+#: libs/ardour/plugin_manager.cc:194
msgid "Could not parse rdf file: %1"
msgstr ""
-#: libs/ardour/plugin_manager.cc:234
+#: libs/ardour/plugin_manager.cc:235
msgid "LADSPA: cannot load module \"%1\" (%2)"
msgstr "LADSPA: ÎÅ ÕÄÁÌÏÓØ ÚÁÇÒÕÚÉÔØ ÍÏÄÕÌØ \"%1\" (%2)"
-#: libs/ardour/plugin_manager.cc:241
+#: libs/ardour/plugin_manager.cc:242
msgid "LADSPA: module \"%1\" has no descriptor function."
msgstr ""
-#: libs/ardour/plugin_manager.cc:296
+#: libs/ardour/plugin_manager.cc:297
#, fuzzy
msgid "VST: cannot load module from \"%1\""
msgstr "LADSPA: ÎÅ ÕÄÁÌÏÓØ ÚÁÇÒÕÚÉÔØ ÍÏÄÕÌØ \"%1\" (%2)"
-#: libs/ardour/plugin_manager.cc:301
+#: libs/ardour/plugin_manager.cc:302
msgid "You asked ardour to not use any VST plugins"
msgstr ""
-#: libs/ardour/plugin_manager.cc:304
+#: libs/ardour/plugin_manager.cc:305
msgid "This version of ardour has no support for VST plugins"
msgstr ""
-#: libs/ardour/plugin_manager.cc:311
+#: libs/ardour/plugin_manager.cc:312
msgid "LADSPA: cannot load module from \"%1\""
msgstr ""
-#: libs/ardour/plugin_manager.cc:373 libs/ardour/plugin_manager.cc:385
+#: libs/ardour/plugin_manager.cc:374 libs/ardour/plugin_manager.cc:386
msgid "Unknown"
msgstr ""
-#: libs/ardour/plugin_manager.cc:463
+#: libs/ardour/plugin_manager.cc:464
msgid ""
"VST plugin %1 does not support processReplacing, and so cannot be used in "
"ardour at this time"
@@ -1072,11 +1072,11 @@ msgstr ""
msgid "programming error: unknown Redirect type in Redirect::Clone!\n"
msgstr ""
-#: libs/ardour/redirect.cc:102 libs/ardour/utils.cc:202
+#: libs/ardour/redirect.cc:102 libs/ardour/utils.cc:203
msgid "pre"
msgstr "ÐÒÅ"
-#: libs/ardour/redirect.cc:104 libs/ardour/utils.cc:205
+#: libs/ardour/redirect.cc:104 libs/ardour/utils.cc:206
msgid "post"
msgstr "ÐÏÓÔ"
@@ -1128,11 +1128,11 @@ msgstr ""
msgid "active_changed"
msgstr ""
-#: libs/ardour/region.cc:884
+#: libs/ardour/region.cc:885
msgid "Session: XMLNode describing a Region is incomplete (no id)"
msgstr ""
-#: libs/ardour/region.cc:891
+#: libs/ardour/region.cc:892
msgid "Session: XMLNode describing a Region is incomplete (no name)"
msgstr ""
@@ -1186,7 +1186,7 @@ msgid ""
"MIDI mute control specification for %1 is incomplete, so it has been ignored"
msgstr ""
-#: libs/ardour/send.cc:98
+#: libs/ardour/send.cc:99
msgid "XML node describing a send is missing a Redirect node"
msgstr ""
@@ -1327,11 +1327,11 @@ msgstr ""
msgid "programming error: unknown type of Redirect deleted!"
msgstr ""
-#: libs/ardour/session.cc:3634
+#: libs/ardour/session.cc:3636
msgid "too many bounced versions of playlist \"%1\""
msgstr ""
-#: libs/ardour/session.cc:3647
+#: libs/ardour/session.cc:3649
msgid "cannot create new audio file \"%1\" for %2"
msgstr ""
@@ -1363,19 +1363,19 @@ msgstr ""
msgid "Butler write-behind failure on dstream %1"
msgstr ""
-#: libs/ardour/session_click.cc:157
+#: libs/ardour/session_click.cc:158
msgid "cannot open click soundfile %1 (%2)"
msgstr ""
-#: libs/ardour/session_click.cc:166
+#: libs/ardour/session_click.cc:167
msgid "cannot read data from click soundfile"
msgstr ""
-#: libs/ardour/session_click.cc:191
+#: libs/ardour/session_click.cc:192
msgid "cannot open click emphasis soundfile %1 (%2)"
msgstr ""
-#: libs/ardour/session_click.cc:199
+#: libs/ardour/session_click.cc:200
msgid "cannot read data from click emphasis soundfile"
msgstr ""
@@ -1479,256 +1479,256 @@ msgstr ""
msgid "Session: error in no roll for %1"
msgstr ""
-#: libs/ardour/session_state.cc:100
+#: libs/ardour/session_state.cc:101
msgid "Could not use path %1 (%s)"
msgstr ""
-#: libs/ardour/session_state.cc:128
+#: libs/ardour/session_state.cc:129
msgid "end"
msgstr ""
-#: libs/ardour/session_state.cc:129
+#: libs/ardour/session_state.cc:130
#, fuzzy
msgid "start"
msgstr "ÒÁÚÄÅÌÉÔØ"
-#: libs/ardour/session_state.cc:501
+#: libs/ardour/session_state.cc:502
msgid "Session: cannot create session dir \"%1\" (%2)"
msgstr ""
-#: libs/ardour/session_state.cc:512
+#: libs/ardour/session_state.cc:513
msgid "Session: cannot create session peakfile dir \"%1\" (%2)"
msgstr ""
-#: libs/ardour/session_state.cc:521
+#: libs/ardour/session_state.cc:522
msgid "Session: cannot create session sounds dir \"%1\" (%2)"
msgstr ""
-#: libs/ardour/session_state.cc:530
+#: libs/ardour/session_state.cc:531
msgid "Session: cannot create session tape dir \"%1\" (%2)"
msgstr ""
-#: libs/ardour/session_state.cc:539
+#: libs/ardour/session_state.cc:540
msgid "Session: cannot create session dead sounds dir \"%1\" (%2)"
msgstr ""
-#: libs/ardour/session_state.cc:548
+#: libs/ardour/session_state.cc:549
msgid "Session: cannot create session automation dir \"%1\" (%2)"
msgstr ""
-#: libs/ardour/session_state.cc:579
+#: libs/ardour/session_state.cc:580
msgid "Could not open %1 for writing mix template"
msgstr ""
-#: libs/ardour/session_state.cc:585
+#: libs/ardour/session_state.cc:586
msgid "Could not open mix template %1 for reading"
msgstr ""
-#: libs/ardour/session_state.cc:592
+#: libs/ardour/session_state.cc:593
msgid "Session already exists. Not overwriting"
msgstr ""
-#: libs/ardour/session_state.cc:635
+#: libs/ardour/session_state.cc:636
msgid "Session: could not load diskstream via XML state"
msgstr ""
-#: libs/ardour/session_state.cc:684
+#: libs/ardour/session_state.cc:685
msgid "could not backup old state file, current state not saved."
msgstr ""
-#: libs/ardour/session_state.cc:697
+#: libs/ardour/session_state.cc:698
msgid "state could not be saved to %1"
msgstr ""
-#: libs/ardour/session_state.cc:704
+#: libs/ardour/session_state.cc:705
msgid "could not remove corrupt state file %1"
msgstr ""
-#: libs/ardour/session_state.cc:708
+#: libs/ardour/session_state.cc:709
msgid "could not restore state file from backup %1"
msgstr ""
-#: libs/ardour/session_state.cc:777
+#: libs/ardour/session_state.cc:778
msgid "%1: session state information file \"%2\" doesn't exist!"
msgstr ""
-#: libs/ardour/session_state.cc:788
+#: libs/ardour/session_state.cc:789
msgid "Could not understand ardour file %1"
msgstr ""
-#: libs/ardour/session_state.cc:1492
+#: libs/ardour/session_state.cc:1493
msgid "programming error: Session: incorrect XML node sent to set_state()"
msgstr ""
-#: libs/ardour/session_state.cc:1538
+#: libs/ardour/session_state.cc:1539
msgid "Session: XML state has no options section"
msgstr ""
-#: libs/ardour/session_state.cc:1543
+#: libs/ardour/session_state.cc:1544
msgid "Session: XML state has no sources section"
msgstr ""
-#: libs/ardour/session_state.cc:1550
+#: libs/ardour/session_state.cc:1551
msgid "Session: XML state has no Regions section"
msgstr ""
-#: libs/ardour/session_state.cc:1557
+#: libs/ardour/session_state.cc:1558
msgid "Session: XML state has no playlists section"
msgstr ""
-#: libs/ardour/session_state.cc:1576
+#: libs/ardour/session_state.cc:1577
msgid "Session: XML state has no diskstreams section"
msgstr ""
-#: libs/ardour/session_state.cc:1583
+#: libs/ardour/session_state.cc:1584
msgid "Session: XML state has no connections section"
msgstr ""
-#: libs/ardour/session_state.cc:1590
+#: libs/ardour/session_state.cc:1591
msgid "Session: XML state has no locations section"
msgstr ""
-#: libs/ardour/session_state.cc:1623
+#: libs/ardour/session_state.cc:1624
msgid "Session: XML state has no edit groups section"
msgstr ""
-#: libs/ardour/session_state.cc:1630
+#: libs/ardour/session_state.cc:1631
msgid "Session: XML state has no mix groups section"
msgstr ""
-#: libs/ardour/session_state.cc:1637
+#: libs/ardour/session_state.cc:1638
msgid "Session: XML state has no Tempo Map section"
msgstr ""
-#: libs/ardour/session_state.cc:1644
+#: libs/ardour/session_state.cc:1645
msgid "Session: XML state has no routes section"
msgstr ""
-#: libs/ardour/session_state.cc:1651
+#: libs/ardour/session_state.cc:1652
msgid "Session: XML state has no click section"
msgstr ""
-#: libs/ardour/session_state.cc:1696
+#: libs/ardour/session_state.cc:1697
msgid "Session: cannot create Route from XML description."
msgstr ""
-#: libs/ardour/session_state.cc:1734
+#: libs/ardour/session_state.cc:1735
msgid "Session: cannot create Region from XML description."
msgstr ""
-#: libs/ardour/session_state.cc:1763
+#: libs/ardour/session_state.cc:1764
msgid "Session: XMLNode describing a AudioRegion is incomplete (no source)"
msgstr ""
-#: libs/ardour/session_state.cc:1771 libs/ardour/session_state.cc:1791
+#: libs/ardour/session_state.cc:1772 libs/ardour/session_state.cc:1792
msgid ""
"Session: XMLNode describing a AudioRegion references an unknown source id =%1"
msgstr ""
-#: libs/ardour/session_state.cc:1777 libs/ardour/session_state.cc:1797
+#: libs/ardour/session_state.cc:1778 libs/ardour/session_state.cc:1798
msgid ""
"Session: XMLNode describing a AudioRegion references a non-audio source id =%"
"1"
msgstr ""
-#: libs/ardour/session_state.cc:1867
+#: libs/ardour/session_state.cc:1868
msgid "Session: cannot create Source from XML description."
msgstr ""
-#: libs/ardour/session_state.cc:1888
+#: libs/ardour/session_state.cc:1889
msgid ""
"Found a sound file that cannot be used by Ardour. Talk to the progammers."
msgstr ""
-#: libs/ardour/session_state.cc:1912
+#: libs/ardour/session_state.cc:1913
msgid "Could not create mix templates directory \"%1\" (%2)"
msgstr ""
-#: libs/ardour/session_state.cc:1926
+#: libs/ardour/session_state.cc:1927
msgid "Template \"%1\" already exists - new version not created"
msgstr ""
-#: libs/ardour/session_state.cc:1933
+#: libs/ardour/session_state.cc:1934
msgid "mix template not saved"
msgstr ""
-#: libs/ardour/session_state.cc:1993
+#: libs/ardour/session_state.cc:1994
msgid "cannot create session directory \"%1\"; ignored"
msgstr ""
-#: libs/ardour/session_state.cc:2006
+#: libs/ardour/session_state.cc:2007
msgid "cannot create sounds directory \"%1\"; ignored"
msgstr ""
-#: libs/ardour/session_state.cc:2017
+#: libs/ardour/session_state.cc:2018
msgid "cannot create dead sounds directory \"%1\"; ignored"
msgstr ""
-#: libs/ardour/session_state.cc:2028
+#: libs/ardour/session_state.cc:2029
msgid "cannot create peak file directory \"%1\"; ignored"
msgstr ""
-#: libs/ardour/session_state.cc:2167 libs/ardour/session_state.cc:2188
+#: libs/ardour/session_state.cc:2168 libs/ardour/session_state.cc:2189
msgid "Session: cannot create Playlist from XML description."
msgstr ""
-#: libs/ardour/session_state.cc:2227
+#: libs/ardour/session_state.cc:2228
msgid "Session: cannot create Named Selection from XML description."
msgstr ""
-#: libs/ardour/session_state.cc:2359
+#: libs/ardour/session_state.cc:2360
msgid "Unknown node \"%1\" found in Connections list from state file"
msgstr ""
-#: libs/ardour/session_state.cc:3196
+#: libs/ardour/session_state.cc:3197
msgid "cannot remove dead sound file %1 (%2)"
msgstr ""
-#: libs/ardour/session_time.cc:375
+#: libs/ardour/session_time.cc:374
msgid "Unknown JACK transport state %1 in sync callback"
msgstr ""
-#: libs/ardour/session_timefx.cc:76
+#: libs/ardour/session_timefx.cc:77
msgid "tempoize: error creating name for new audio file based on %1"
msgstr ""
-#: libs/ardour/session_timefx.cc:87
+#: libs/ardour/session_timefx.cc:88
msgid "tempoize: error creating new audio file %1 (%2)"
msgstr ""
-#: libs/ardour/session_timefx.cc:113
+#: libs/ardour/session_timefx.cc:114
msgid "tempoize: error reading data from %1"
msgstr ""
-#: libs/ardour/session_timefx.cc:126 libs/ardour/session_timefx.cc:138
+#: libs/ardour/session_timefx.cc:127 libs/ardour/session_timefx.cc:139
msgid "error writing tempo-adjusted data to %1"
msgstr ""
-#: libs/ardour/session_timefx.cc:144
+#: libs/ardour/session_timefx.cc:145
msgid "timefx code failure. please notify ardour-developers."
msgstr ""
-#: libs/ardour/session_transport.cc:116
+#: libs/ardour/session_transport.cc:117
msgid "Cannot loop - no loop range defined"
msgstr ""
-#: libs/ardour/session_transport.cc:478
+#: libs/ardour/session_transport.cc:479
msgid ""
"Seamless looping cannot be supported while Ardour is using JACK transport.\n"
"Recommend changing the configured options"
msgstr ""
-#: libs/ardour/session_transport.cc:754
+#: libs/ardour/session_transport.cc:755
msgid ""
"Global varispeed cannot be supported while Ardour is connected to JACK "
"transport control"
msgstr ""
-#: libs/ardour/session_transport.cc:954
+#: libs/ardour/session_transport.cc:955
msgid "please stop the transport before adjusting slave settings"
msgstr ""
-#: libs/ardour/session_transport.cc:990
+#: libs/ardour/session_transport.cc:991
msgid "No MTC port defined: MTC slaving is impossible."
msgstr ""
@@ -1816,185 +1816,185 @@ msgstr ""
msgid "Big-endian (Mac)"
msgstr ""
-#: libs/ardour/sndfilesource.cc:145
+#: libs/ardour/sndfilesource.cc:147
msgid "FileSource: cannot get host information for BWF header (%1)"
msgstr ""
-#: libs/ardour/sndfilesource.cc:167
+#: libs/ardour/sndfilesource.cc:169
msgid ""
"cannot set broadcast info for audio file %1 (%2); dropping broadcast info "
"for this file"
msgstr ""
-#: libs/ardour/sndfilesource.cc:223
+#: libs/ardour/sndfilesource.cc:220
msgid "SndFileSource: cannot open file \"%1\" for %2 (%3)"
msgstr ""
-#: libs/ardour/sndfilesource.cc:229
+#: libs/ardour/sndfilesource.cc:226
msgid ""
"SndFileSource: file only contains %1 channels; %2 is invalid as a channel "
"number"
msgstr ""
-#: libs/ardour/sndfilesource.cc:306
+#: libs/ardour/sndfilesource.cc:327
msgid "SndFileSource: could not seek to frame %1 within %2 (%3)"
msgstr ""
-#: libs/ardour/sndfilesource.cc:357
+#: libs/ardour/sndfilesource.cc:378
#, fuzzy
msgid "programming error: %1 %2"
msgstr "ÏÛÉÂËÁ ÐÒÏÇÒÁÍÍÙ: "
-#: libs/ardour/sndfilesource.cc:457
+#: libs/ardour/sndfilesource.cc:487 libs/ardour/sndfilesource.cc:533
msgid ""
"cannot set broadcast info for audio file %1; Dropping broadcast info for "
"this file"
msgstr ""
-#: libs/ardour/sndfilesource.cc:499
+#: libs/ardour/sndfilesource.cc:544
msgid "%1: cannot seek to %2"
msgstr ""
-#: libs/ardour/state_manager.cc:46
+#: libs/ardour/state_manager.cc:47
msgid "cleared history"
msgstr ""
-#: libs/ardour/state_manager.cc:59
+#: libs/ardour/state_manager.cc:60
msgid ""
"programming error: illegal state ID (%1) passed to StateManager::set_state() "
"(range = 0-%2)"
msgstr ""
-#: libs/ardour/stateful.cc:100
+#: libs/ardour/stateful.cc:102
msgid "Error: could not write %1"
msgstr ""
-#: libs/ardour/stateful.cc:114
+#: libs/ardour/stateful.cc:116
msgid "Could not understand XML file %1"
msgstr ""
-#: libs/ardour/tempo.cc:66
+#: libs/ardour/tempo.cc:67
msgid "TempoSection XML node has no \"start\" property"
msgstr ""
-#: libs/ardour/tempo.cc:74
+#: libs/ardour/tempo.cc:75
msgid "TempoSection XML node has an illegal \"start\" value"
msgstr ""
-#: libs/ardour/tempo.cc:81
+#: libs/ardour/tempo.cc:82
msgid "TempoSection XML node has no \"beats-per-minute\" property"
msgstr ""
-#: libs/ardour/tempo.cc:86
+#: libs/ardour/tempo.cc:87
msgid "TempoSection XML node has an illegal \"beats_per_minute\" value"
msgstr ""
-#: libs/ardour/tempo.cc:91
+#: libs/ardour/tempo.cc:92
msgid "TempoSection XML node has no \"movable\" property"
msgstr ""
-#: libs/ardour/tempo.cc:130
+#: libs/ardour/tempo.cc:131
msgid "MeterSection XML node has no \"start\" property"
msgstr ""
-#: libs/ardour/tempo.cc:138
+#: libs/ardour/tempo.cc:139
msgid "MeterSection XML node has an illegal \"start\" value"
msgstr ""
-#: libs/ardour/tempo.cc:145
+#: libs/ardour/tempo.cc:146
msgid "MeterSection XML node has no \"beats-per-bar\" property"
msgstr ""
-#: libs/ardour/tempo.cc:150
+#: libs/ardour/tempo.cc:151
msgid "MeterSection XML node has an illegal \"beats-per-bar\" value"
msgstr ""
-#: libs/ardour/tempo.cc:155
+#: libs/ardour/tempo.cc:156
msgid "MeterSection XML node has no \"note-type\" property"
msgstr ""
-#: libs/ardour/tempo.cc:160
+#: libs/ardour/tempo.cc:161
msgid "MeterSection XML node has an illegal \"note-type\" value"
msgstr ""
-#: libs/ardour/tempo.cc:165
+#: libs/ardour/tempo.cc:166
msgid "MeterSection XML node has no \"movable\" property"
msgstr ""
-#: libs/ardour/tempo.cc:258
+#: libs/ardour/tempo.cc:259
msgid "move metric"
msgstr ""
-#: libs/ardour/tempo.cc:329
+#: libs/ardour/tempo.cc:330
msgid "metric removed"
msgstr ""
-#: libs/ardour/tempo.cc:372
+#: libs/ardour/tempo.cc:373
msgid "add tempo"
msgstr ""
-#: libs/ardour/tempo.cc:401
+#: libs/ardour/tempo.cc:402
msgid "replace tempo"
msgstr ""
-#: libs/ardour/tempo.cc:434
+#: libs/ardour/tempo.cc:435
msgid "add meter"
msgstr ""
-#: libs/ardour/tempo.cc:462
+#: libs/ardour/tempo.cc:463
msgid "replaced meter"
msgstr ""
-#: libs/ardour/tempo.cc:482 libs/ardour/tempo.cc:498
+#: libs/ardour/tempo.cc:483 libs/ardour/tempo.cc:499
msgid "programming error: no tempo section in tempo map!"
msgstr ""
-#: libs/ardour/tempo.cc:537
+#: libs/ardour/tempo.cc:538
msgid "programming error: unhandled MetricSection type"
msgstr ""
-#: libs/ardour/tempo.cc:1225 libs/ardour/tempo.cc:1237
+#: libs/ardour/tempo.cc:1226 libs/ardour/tempo.cc:1238
msgid "Tempo map: could not set new state, restoring old one."
msgstr ""
-#: libs/ardour/tempo.cc:1261
+#: libs/ardour/tempo.cc:1262
msgid "load XML data"
msgstr ""
-#: libs/ardour/utils.cc:245
+#: libs/ardour/utils.cc:246
msgid "illegal or badly-formed string used for path (%1)"
msgstr ""
-#: libs/ardour/utils.cc:250
+#: libs/ardour/utils.cc:251
msgid "path (%1) is ambiguous"
msgstr ""
-#: libs/ardour/vst_plugin.cc:186
+#: libs/ardour/vst_plugin.cc:187
msgid "cannot create VST chunk directory: %1"
msgstr ""
-#: libs/ardour/vst_plugin.cc:194
+#: libs/ardour/vst_plugin.cc:195
msgid "cannot check VST chunk directory: %1"
msgstr ""
-#: libs/ardour/vst_plugin.cc:201
+#: libs/ardour/vst_plugin.cc:202
msgid "%1 exists but is not a directory"
msgstr ""
-#: libs/ardour/vst_plugin.cc:239
+#: libs/ardour/vst_plugin.cc:240
msgid "Bad node sent to VSTPlugin::set_state"
msgstr ""
-#: libs/ardour/vst_plugin.cc:342 libs/ardour/vst_plugin.cc:353
+#: libs/ardour/vst_plugin.cc:343 libs/ardour/vst_plugin.cc:354
msgid "no support for presets using chunks at this time"
msgstr ""
-#: libs/ardour/coreaudio_source.cc:98
+#: libs/ardour/coreaudiosource.cc:97
msgid ""
"CoreAudioSource: file only contains %1 channels; %2 is invalid as a channel "
"number"
msgstr ""
-#: libs/ardour/coreaudio_source.cc:163
+#: libs/ardour/coreaudiosource.cc:162
msgid "CoreAudioSource: could not seek to frame %1 within %2 (%3)"
msgstr ""
diff --git a/libs/ardour/redirect.cc b/libs/ardour/redirect.cc
index 33fec5088f..9800c5b1a2 100644
--- a/libs/ardour/redirect.cc
+++ b/libs/ardour/redirect.cc
@@ -231,9 +231,9 @@ Redirect::state (bool full_state)
string path;
string legal_name;
- snprintf (buf, sizeof(buf), "%" PRIu64, id());
path = _session.snap_name();
path += "-redirect-";
+ id().print (buf);
path += buf;
path += ".automation";
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc
index 8c27a3bebc..f195e42148 100644
--- a/libs/ardour/region.cc
+++ b/libs/ardour/region.cc
@@ -53,7 +53,6 @@ Region::Region (jack_nframes_t start, jack_nframes_t length, const string& name,
{
/* basic Region constructor */
- _id = ARDOUR::new_id();
_flags = flags;
_playlist = 0;
_read_data_count = 0;
@@ -76,7 +75,6 @@ Region::Region (const Region& other, jack_nframes_t offset, jack_nframes_t lengt
{
/* create a new Region from part of an existing one */
- _id = ARDOUR::new_id();
_frozen = 0;
pending_changed = Change (0);
_playlist = 0;
@@ -102,7 +100,6 @@ Region::Region (const Region &other)
{
/* Pure copy constructor */
- _id = ARDOUR::new_id();
_frozen = 0;
pending_changed = Change (0);
_playlist = 0;
@@ -130,7 +127,6 @@ Region::Region (const Region &other)
Region::Region (const XMLNode& node)
{
- _id = 0;
_frozen = 0;
pending_changed = Change (0);
_playlist = 0;
@@ -844,7 +840,7 @@ Region::state (bool full_state)
XMLNode *node = new XMLNode ("Region");
char buf[64];
- snprintf (buf, sizeof (buf), "%" PRIu64, _id);
+ _id.print (buf);
node->add_property ("id", buf);
node->add_property ("name", _name);
snprintf (buf, sizeof (buf), "%u", _start);
@@ -886,7 +882,7 @@ Region::set_state (const XMLNode& node)
return -1;
}
- sscanf (prop->value().c_str(), "%" PRIu64, &_id);
+ _id = prop->value();
if ((prop = node.property ("name")) == 0) {
error << _("Session: XMLNode describing a Region is incomplete (no name)") << endmsg;
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 8ad402c66a..fb5c175bba 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -54,16 +54,16 @@ uint32_t Route::order_key_cnt = 0;
Route::Route (Session& sess, string name, int input_min, int input_max, int output_min, int output_max, Flag flg, Buffer::Type default_type)
: IO (sess, name, input_min, input_max, output_min, output_max, default_type),
_flags (flg),
- _midi_solo_control (*this, MIDIToggleControl::SoloControl, _session.midi_port()),
- _midi_mute_control (*this, MIDIToggleControl::MuteControl, _session.midi_port())
+ _solo_control (*this, ToggleControllable::SoloControl),
+ _mute_control (*this, ToggleControllable::MuteControl)
{
init ();
}
Route::Route (Session& sess, const XMLNode& node)
: IO (sess, "route"),
- _midi_solo_control (*this, MIDIToggleControl::SoloControl, _session.midi_port()),
- _midi_mute_control (*this, MIDIToggleControl::MuteControl, _session.midi_port())
+ _solo_control (*this, ToggleControllable::SoloControl),
+ _mute_control (*this, ToggleControllable::MuteControl)
{
init ();
set_state (node);
@@ -106,8 +106,6 @@ Route::init ()
input_changed.connect (mem_fun (this, &Route::input_change_handler));
output_changed.connect (mem_fun (this, &Route::output_change_handler));
-
- reset_midi_control (_session.midi_port(), _session.get_midi_control());
}
Route::~Route ()
@@ -713,11 +711,8 @@ Route::set_solo (bool yn, void *src)
if (_soloed != yn) {
_soloed = yn;
- solo_changed (src); /* EMIT SIGNAL */
-
- if (_session.get_midi_feedback()) {
- _midi_solo_control.send_feedback (_soloed);
- }
+ solo_changed (src); /* EMIT SIGNAL */
+ _solo_control.Changed (); /* EMIT SIGNAL */
}
}
@@ -754,9 +749,7 @@ Route::set_mute (bool yn, void *src)
_muted = yn;
mute_changed (src); /* EMIT SIGNAL */
- if (_session.get_midi_feedback()) {
- _midi_mute_control.send_feedback (_muted);
- }
+ _mute_control.Changed (); /* EMIT SIGNAL */
Glib::Mutex::Lock lm (declick_lock);
desired_mute_gain = (yn?0.0f:1.0f);
@@ -1367,26 +1360,6 @@ Route::state(bool full_state)
node->add_property("mix-group", _mix_group->name());
}
- /* MIDI control */
-
- MIDI::channel_t chn;
- MIDI::eventType ev;
- MIDI::byte additional;
- XMLNode* midi_node = 0;
- XMLNode* child;
-
- midi_node = node->add_child ("MIDI");
-
- if (_midi_mute_control.get_control_info (chn, ev, additional)) {
- child = midi_node->add_child ("mute");
- set_midi_node_info (child, ev, chn, additional);
- }
- if (_midi_solo_control.get_control_info (chn, ev, additional)) {
- child = midi_node->add_child ("solo");
- set_midi_node_info (child, ev, chn, additional);
- }
-
-
string order_string;
OrderKeys::iterator x = order_keys.begin();
@@ -1531,8 +1504,6 @@ Route::set_state (const XMLNode& node)
XMLNode *child;
XMLPropertyList plist;
const XMLProperty *prop;
- XMLNodeList midi_kids;
-
if (node.name() != "Route"){
error << string_compose(_("Bad node sent to Route::set_state() [%1]"), node.name()) << endmsg;
@@ -1726,45 +1697,6 @@ Route::set_state (const XMLNode& node)
}
}
- midi_kids = node.children ("MIDI");
-
- for (niter = midi_kids.begin(); niter != midi_kids.end(); ++niter) {
-
- XMLNodeList kids;
- XMLNodeConstIterator miter;
- XMLNode* child;
-
- kids = (*niter)->children ();
-
- for (miter = kids.begin(); miter != kids.end(); ++miter) {
-
- child =* miter;
-
- MIDI::eventType ev = MIDI::on; /* initialize to keep gcc happy */
- MIDI::byte additional = 0; /* ditto */
- MIDI::channel_t chn = 0; /* ditto */
-
- if (child->name() == "mute") {
-
- if (get_midi_node_info (child, ev, chn, additional)) {
- _midi_mute_control.set_control_type (chn, ev, additional);
- } else {
- error << string_compose(_("MIDI mute control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
- }
- }
- else if (child->name() == "solo") {
-
- if (get_midi_node_info (child, ev, chn, additional)) {
- _midi_solo_control.set_control_type (chn, ev, additional);
- } else {
- error << string_compose(_("MIDI mute control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
- }
- }
-
- }
- }
-
-
return 0;
}
@@ -2221,67 +2153,6 @@ Route::has_external_redirects () const
}
void
-Route::reset_midi_control (MIDI::Port* port, bool on)
-{
- MIDI::channel_t chn;
- MIDI::eventType ev;
- MIDI::byte extra;
-
- for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
- (*i)->reset_midi_control (port, on);
- }
-
- IO::reset_midi_control (port, on);
-
- _midi_solo_control.get_control_info (chn, ev, extra);
- if (!on) {
- chn = -1;
- }
- _midi_solo_control.midi_rebind (port, chn);
-
- _midi_mute_control.get_control_info (chn, ev, extra);
- if (!on) {
- chn = -1;
- }
- _midi_mute_control.midi_rebind (port, chn);
-}
-
-void
-Route::send_all_midi_feedback ()
-{
- if (_session.get_midi_feedback()) {
-
- {
- Glib::RWLock::ReaderLock lm (redirect_lock);
- for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
- (*i)->send_all_midi_feedback ();
- }
- }
-
- IO::send_all_midi_feedback();
-
- _midi_solo_control.send_feedback (_soloed);
- _midi_mute_control.send_feedback (_muted);
- }
-}
-
-MIDI::byte*
-Route::write_midi_feedback (MIDI::byte* buf, int32_t& bufsize)
-{
- buf = _midi_solo_control.write_feedback (buf, bufsize, _soloed);
- buf = _midi_mute_control.write_feedback (buf, bufsize, _muted);
-
- {
- Glib::RWLock::ReaderLock lm (redirect_lock);
- for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
- buf = (*i)->write_midi_feedback (buf, bufsize);
- }
- }
-
- return IO::write_midi_feedback (buf, bufsize);
-}
-
-void
Route::flush_redirects ()
{
/* XXX shouldn't really try to take this lock, since
@@ -2351,106 +2222,46 @@ Route::automation_snapshot (jack_nframes_t now)
}
}
-Route::MIDIToggleControl::MIDIToggleControl (Route& s, ToggleType tp, MIDI::Port* port)
- : MIDI::Controllable (port, true), route (s), type(tp), setting(false)
+Route::ToggleControllable::ToggleControllable (Route& s, ToggleType tp)
+ : route (s), type(tp)
{
- last_written = false; /* XXX need a good out-of-bound-value */
+
}
void
-Route::MIDIToggleControl::set_value (float val)
+Route::ToggleControllable::set_value (float val)
{
- MIDI::eventType et;
- MIDI::channel_t chn;
- MIDI::byte additional;
-
- get_control_info (chn, et, additional);
-
- setting = true;
-
-#ifdef HOLD_TOGGLE_VALUES
- if (et == MIDI::off || et == MIDI::on) {
-
- /* literal toggle */
-
- switch (type) {
- case MuteControl:
- route.set_mute (!route.muted(), this);
- break;
- case SoloControl:
- route.set_solo (!route.soloed(), this);
- break;
- default:
- break;
- }
-
- } else {
-#endif
-
- /* map full control range to a boolean */
-
- bool bval = ((val >= 0.5f) ? true: false);
-
- switch (type) {
- case MuteControl:
- route.set_mute (bval, this);
- break;
- case SoloControl:
- route.set_solo (bval, this);
- break;
- default:
- break;
- }
-
-#ifdef HOLD_TOGGLE_VALUES
+ bool bval = ((val >= 0.5f) ? true: false);
+
+ switch (type) {
+ case MuteControl:
+ route.set_mute (bval, this);
+ break;
+ case SoloControl:
+ route.set_solo (bval, this);
+ break;
+ default:
+ break;
}
-#endif
-
- setting = false;
}
-void
-Route::MIDIToggleControl::send_feedback (bool value)
+float
+Route::ToggleControllable::get_value (void) const
{
-
- if (!setting && get_midi_feedback()) {
- MIDI::byte val = (MIDI::byte) (value ? 127: 0);
- MIDI::channel_t ch = 0;
- MIDI::eventType ev = MIDI::none;
- MIDI::byte additional = 0;
- MIDI::EventTwoBytes data;
-
- if (get_control_info (ch, ev, additional)) {
- data.controller_number = additional;
- data.value = val;
- last_written = value;
-
- route._session.send_midi_message (get_port(), ev, ch, data);
- }
- }
+ float val = 0.0f;
-}
-
-MIDI::byte*
-Route::MIDIToggleControl::write_feedback (MIDI::byte* buf, int32_t& bufsize, bool val, bool force)
-{
- if (get_midi_feedback() && bufsize > 2) {
- MIDI::channel_t ch = 0;
- MIDI::eventType ev = MIDI::none;
- MIDI::byte additional = 0;
-
- if (get_control_info (ch, ev, additional)) {
- if (val != last_written || force) {
- *buf++ = (0xF0 & ev) | (0xF & ch);
- *buf++ = additional; /* controller number */
- *buf++ = (MIDI::byte) (val ? 127 : 0);
- bufsize -= 3;
- last_written = val;
- }
- }
+ switch (type) {
+ case MuteControl:
+ val = route.muted() ? 1.0f : 0.0f;
+ break;
+ case SoloControl:
+ val = route.soloed() ? 1.0f : 0.0f;
+ break;
+ default:
+ break;
}
- return buf;
+ return val;
}
void
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 2fcd09a31c..c115870db0 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -95,6 +95,8 @@ Session::mix_buffers_no_gain_t Session::mix_buffers_no_gain = 0;
sigc::signal<int> Session::AskAboutPendingState;
sigc::signal<void> Session::SMPTEOffsetChanged;
+sigc::signal<void> Session::SendFeedback;
+
int
Session::find_session (string str, string& path, string& snapshot, bool& isnew)
@@ -445,7 +447,7 @@ Session::~Session ()
tmp =i;
++tmp;
- delete (*i).second;
+ delete i->second;
i = tmp;
}
@@ -484,7 +486,7 @@ Session::~Session ()
tmp = i;
++tmp;
- delete (*i).second;
+ delete i->second;
i = tmp;
}
@@ -2502,7 +2504,7 @@ Session::diskstream_by_name (string name)
}
Diskstream *
-Session::diskstream_by_id (id_t id)
+Session::diskstream_by_id (const PBD::ID& id)
{
Glib::RWLock::ReaderLock lm (diskstream_lock);
@@ -2551,7 +2553,7 @@ Session::new_region_name (string old)
sbuf = buf;
for (i = audio_regions.begin(); i != audio_regions.end(); ++i) {
- if ((*i).second->name() == sbuf) {
+ if (i->second->name() == sbuf) {
break;
}
}
@@ -2616,7 +2618,7 @@ Session::region_name (string& result, string base, bool newlevel) const
name_taken = false;
for (AudioRegionList::const_iterator i = audio_regions.begin(); i != audio_regions.end(); ++i) {
- if ((*i).second->name() == result) {
+ if (i->second->name() == result) {
name_taken = true;
break;
}
@@ -2661,8 +2663,8 @@ Session::add_region (Region* region)
if (x == audio_regions.end()) {
- pair<AudioRegionList::key_type, AudioRegionList::mapped_type> entry;
-
+ pair<AudioRegionList::key_type,AudioRegionList::mapped_type> entry;
+
entry.first = region->id();
entry.second = ar;
@@ -2719,16 +2721,18 @@ Session::remove_region (Region* region)
AudioRegionList::iterator i;
AudioRegion* ar = 0;
bool removed = false;
-
+
{
Glib::Mutex::Lock lm (region_lock);
- if ((ar = dynamic_cast<AudioRegion*> (region)) != 0) {
+ if ((ar = dynamic_cast<AudioRegion*> (region)) != 0) {
if ((i = audio_regions.find (region->id())) != audio_regions.end()) {
audio_regions.erase (i);
removed = true;
- }
+ }
+
} else {
+
fatal << _("programming error: ")
<< X_("unknown region type passed to Session::remove_region()")
<< endmsg;
@@ -2756,7 +2760,7 @@ Session::find_whole_file_parent (AudioRegion& child)
for (i = audio_regions.begin(); i != audio_regions.end(); ++i) {
- region = (*i).second;
+ region = i->second;
if (region->whole_file()) {
@@ -2860,12 +2864,12 @@ Session::add_audio_source (AudioSource* source)
{
pair<AudioSourceList::key_type, AudioSourceList::mapped_type> entry;
- {
- Glib::Mutex::Lock lm (audio_source_lock);
+ {
+ Glib::Mutex::Lock lm (audio_source_lock);
entry.first = source->id();
entry.second = source;
audio_sources.insert (entry);
- }
+ }
source->GoingAway.connect (mem_fun (this, &Session::remove_source));
set_dirty();
@@ -2883,7 +2887,7 @@ Session::remove_source (Source* source)
if ((i = audio_sources.find (source->id())) != audio_sources.end()) {
audio_sources.erase (i);
- }
+ }
}
if (!_state_of_the_state & InCleanup) {
@@ -2899,23 +2903,19 @@ Session::remove_source (Source* source)
}
Source *
-Session::get_source (ARDOUR::id_t id)
+Session::source_by_id (const PBD::ID& id)
{
Glib::Mutex::Lock lm (audio_source_lock);
AudioSourceList::iterator i;
Source* source = 0;
if ((i = audio_sources.find (id)) != audio_sources.end()) {
- source = (*i).second;
- }
-
- if (source) {
- return source;
+ source = i->second;
}
/* XXX search MIDI or other searches here */
- return 0;
+ return source;
}
string
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc
index bd68d24517..f7f1d79bbe 100644
--- a/libs/ardour/session_midi.cc
+++ b/libs/ardour/session_midi.cc
@@ -112,13 +112,6 @@ Session::set_midi_control (bool yn)
midi_control = yn;
set_dirty();
poke_midi_thread ();
-
- if (_midi_port) {
- Glib::RWLock::ReaderLock guard (route_lock);
- for (RouteList::iterator i = routes.begin(); i != routes.end(); ++i) {
- (*i)->reset_midi_control (_midi_port, midi_control);
- }
- }
#endif
ControlChanged (MidiControl); /* EMIT SIGNAL */
}
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc
index 9e3809f6b8..b8929d3eca 100644
--- a/libs/ardour/session_process.cc
+++ b/libs/ardour/session_process.cc
@@ -48,8 +48,6 @@ using namespace std;
void
Session::process (jack_nframes_t nframes)
{
- //cerr << "CYCLE START " << _transport_frame << "-------------------" << endl;
-
MIDI::Manager::instance()->cycle_start(nframes);
if (synced_to_jack() && waiting_to_start) {
@@ -67,8 +65,8 @@ Session::process (jack_nframes_t nframes)
(this->*process_function) (nframes);
MIDI::Manager::instance()->cycle_end();
-
- //cerr << "CYCLE END " << _transport_frame << "-----------------------" << endl;
+
+ SendFeedback (); /* EMIT SIGNAL */
}
void
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index a8cbd7bd78..78d8aa6ac7 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -275,6 +275,9 @@ Session::first_stage_init (string fullpath, string snapshot_name)
Diskstream::DiskstreamCreated.connect (mem_fun (*this, &Session::add_diskstream));
NamedSelection::NamedSelectionCreated.connect (mem_fun (*this, &Session::add_named_selection));
+ Controllable::Created.connect (mem_fun (*this, &Session::add_controllable));
+ Controllable::GoingAway.connect (mem_fun (*this, &Session::remove_controllable));
+
IO::MoreOutputs.connect (mem_fun (*this, &Session::ensure_passthru_buffers));
/* stop IO objects from doing stuff until we're ready for them */
@@ -639,7 +642,7 @@ Session::load_diskstreams (const XMLNode& node)
}
catch (failed_constructor& err) {
- error << _("Session: could not load diskstream via XML state") << endmsg;
+ error << _("Session: could not load diskstream via XML state") << endmsg;
return -1;
}
}
@@ -1336,6 +1339,13 @@ Session::state(bool full_state)
}
}
+ /* save the ID counter */
+
+ snprintf (buf, sizeof (buf), "%" PRIu64, ID::counter());
+ node->add_property ("id-counter", buf);
+
+ /* various options */
+
node->add_child_nocopy (get_options());
child = node->add_child ("Sources");
@@ -1349,7 +1359,7 @@ Session::state(bool full_state)
AudioFileSource* fs;
- if ((fs = dynamic_cast<AudioFileSource*> ((*siter).second)) != 0) {
+ if ((fs = dynamic_cast<AudioFileSource*> (siter->second)) != 0) {
DestructiveFileSource* dfs = dynamic_cast<DestructiveFileSource*> (fs);
/* destructive file sources are OK if they are empty, because
@@ -1363,7 +1373,7 @@ Session::state(bool full_state)
}
}
- child->add_child_nocopy ((*siter).second->get_state());
+ child->add_child_nocopy (siter->second->get_state());
}
}
@@ -1376,7 +1386,7 @@ Session::state(bool full_state)
/* only store regions not attached to playlists */
- if ((*i).second->playlist() == 0) {
+ if (i->second->playlist() == 0) {
child->add_child_nocopy (i->second->state (true));
}
}
@@ -1495,7 +1505,7 @@ Session::set_state (const XMLNode& node)
_state_of_the_state = StateOfTheState (_state_of_the_state|CannotSave);
- if (node.name() != "Session"){
+ if (node.name() != X_("Session")){
fatal << _("programming error: Session: incorrect XML node sent to set_state()") << endmsg;
return -1;
}
@@ -1505,6 +1515,21 @@ Session::set_state (const XMLNode& node)
if ((prop = node.property ("name")) != 0) {
_name = prop->value ();
}
+
+ if ((prop = node.property (X_("id-counter"))) != 0) {
+ uint64_t x;
+ sscanf (prop->value().c_str(), "%" PRIu64, &x);
+ ID::init_counter (x);
+ } else {
+ /* old sessions used a timebased counter, so fake
+ the startup ID counter based on a standard
+ timestamp.
+ */
+ time_t now;
+ time (&now);
+ ID::init_counter (now);
+ }
+
IO::disable_ports ();
IO::disable_connecting ();
@@ -1748,12 +1773,10 @@ Session::load_regions (const XMLNode& node)
set_dirty();
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
-
if ((region = XMLRegionFactory (**niter, false)) == 0) {
error << _("Session: cannot create Region from XML description.") << endmsg;
}
}
-
return 0;
}
@@ -1761,7 +1784,6 @@ AudioRegion *
Session::XMLRegionFactory (const XMLNode& node, bool full)
{
const XMLProperty* prop;
- id_t s_id;
Source* source;
AudioSource* as;
AudioRegion::SourceList sources;
@@ -1784,9 +1806,9 @@ Session::XMLRegionFactory (const XMLNode& node, bool full)
}
}
- sscanf (prop->value().c_str(), "%" PRIu64, &s_id);
+ PBD::ID s_id (prop->value());
- if ((source = get_source (s_id)) == 0) {
+ if ((source = source_by_id (s_id)) == 0) {
error << string_compose(_("Session: XMLNode describing a AudioRegion references an unknown source id =%1"), s_id) << endmsg;
return 0;
}
@@ -1804,23 +1826,23 @@ Session::XMLRegionFactory (const XMLNode& node, bool full)
for (uint32_t n=1; n < nchans; ++n) {
snprintf (buf, sizeof(buf), X_("source-%d"), n);
if ((prop = node.property (buf)) != 0) {
- sscanf (prop->value().c_str(), "%" PRIu64, &s_id);
- if ((source = get_source (s_id)) == 0) {
- error << string_compose(_("Session: XMLNode describing a AudioRegion references an unknown source id =%1"), s_id) << endmsg;
+ PBD::ID id2 (prop->value());
+
+ if ((source = source_by_id (id2)) == 0) {
+ error << string_compose(_("Session: XMLNode describing a AudioRegion references an unknown source id =%1"), id2) << endmsg;
return 0;
}
as = dynamic_cast<AudioSource*>(source);
if (!as) {
- error << string_compose(_("Session: XMLNode describing a AudioRegion references a non-audio source id =%1"), s_id) << endmsg;
+ error << string_compose(_("Session: XMLNode describing a AudioRegion references a non-audio source id =%1"), id2) << endmsg;
return 0;
}
sources.push_back (as);
}
}
-
try {
return new AudioRegion (sources, node);
}
@@ -1838,7 +1860,7 @@ Session::get_sources_as_xml ()
Glib::Mutex::Lock lm (audio_source_lock);
for (AudioSourceList::iterator i = audio_sources.begin(); i != audio_sources.end(); ++i) {
- node->add_child_nocopy ((*i).second->get_state());
+ node->add_child_nocopy (i->second->get_state());
}
/* XXX get MIDI and other sources here */
@@ -2964,7 +2986,7 @@ Session::cleanup_sources (Session::cleanup_report& rep)
capture files.
*/
- if ((*i).second->use_cnt() == 0 && (*i).second->length() > 0) {
+ if (i->second->use_cnt() == 0 && i->second->length() > 0) {
dead_sources.push_back (i->second);
/* remove this source from our own list to avoid us
@@ -2991,7 +3013,7 @@ Session::cleanup_sources (Session::cleanup_report& rep)
tmp = r;
++tmp;
- ar = (*r).second;
+ ar = r->second;
for (uint32_t n = 0; n < ar->n_channels(); ++n) {
if (&ar->source (n) == (*i)) {
@@ -3044,7 +3066,7 @@ Session::cleanup_sources (Session::cleanup_report& rep)
for (AudioSourceList::iterator i = audio_sources.begin(); i != audio_sources.end(); ++i) {
AudioFileSource* fs;
- if ((fs = dynamic_cast<AudioFileSource*> ((*i).second)) != 0) {
+ if ((fs = dynamic_cast<AudioFileSource*> (i->second)) != 0) {
all_sources.insert (fs->path());
}
}
@@ -3253,3 +3275,30 @@ Session::set_clean ()
}
}
+void
+Session::add_controllable (Controllable* c)
+{
+ Glib::Mutex::Lock lm (controllables_lock);
+ controllables.push_back (c);
+}
+
+void
+Session::remove_controllable (Controllable* c)
+{
+ Glib::Mutex::Lock lm (controllables_lock);
+ controllables.remove (c);
+}
+
+Controllable*
+Session::controllable_by_id (const PBD::ID& id)
+{
+ Glib::Mutex::Lock lm (controllables_lock);
+
+ for (Controllables::iterator i = controllables.begin(); i != controllables.end(); ++i) {
+ if ((*i)->id() == id) {
+ return *i;
+ }
+ }
+
+ return 0;
+}
diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc
index 494a78ae88..945dfbe48b 100644
--- a/libs/ardour/session_time.cc
+++ b/libs/ardour/session_time.cc
@@ -32,7 +32,6 @@
#include <ardour/audioengine.h>
#include <ardour/session.h>
#include <ardour/tempo.h>
-#include <ardour/audiofilesource.h>
#include "i18n.h"
@@ -97,8 +96,6 @@ Session::set_smpte_offset (jack_nframes_t off)
_smpte_offset = off;
last_smpte_valid = false;
- AudioFileSource::set_header_position_offset (_smpte_offset, _smpte_offset_negative);
-
SMPTEOffsetChanged (); /* EMIT SIGNAL */
}
@@ -108,8 +105,6 @@ Session::set_smpte_offset_negative (bool neg)
_smpte_offset_negative = neg;
last_smpte_valid = false;
- AudioFileSource::set_header_position_offset (_smpte_offset, _smpte_offset_negative);
-
SMPTEOffsetChanged (); /* EMIT SIGNAL */
}
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc
index 443a24e3c2..5936f62570 100644
--- a/libs/ardour/sndfilesource.cc
+++ b/libs/ardour/sndfilesource.cc
@@ -156,6 +156,8 @@ SndFileSource::SndFileSource (string idstr, SampleFormat sfmt, HeaderFormat hf,
utsinfo.version);
_broadcast_info->version = 1;
+ _broadcast_info->time_reference_low = 0;
+ _broadcast_info->time_reference_high = 0;
/* XXX do something about this field */
@@ -183,6 +185,7 @@ SndFileSource::SndFileSource (string idstr, SampleFormat sfmt, HeaderFormat hf,
}
AudioSourceCreated (this); /* EMIT SIGNAL */
+
}
void
@@ -246,21 +249,19 @@ SndFileSource::open ()
_flags = Flag (_flags & ~Broadcast);
}
+ set_timeline_position (header_position_offset);
+
} else {
/* XXX 64 bit alert: when JACK switches to a 64 bit frame count, this needs to use the high bits
of the time reference.
*/
-
- set_timeline_position (_broadcast_info->time_reference_low);
+
+ set_timeline_position ( _broadcast_info->time_reference_low );
}
if (writable()) {
sf_command (sf, SFC_SET_UPDATE_HEADER_AUTO, 0, SF_FALSE);
-
- /* update header if header offset info changes */
-
- AudioFileSource::HeaderPositionOffsetChanged.connect (mem_fun (*this, &AudioFileSource::handle_header_position_change));
}
return 0;
@@ -280,7 +281,7 @@ SndFileSource::~SndFileSource ()
}
if (_broadcast_info) {
- free (_broadcast_info);
+ delete _broadcast_info;
}
}
@@ -472,7 +473,7 @@ SndFileSource::setup_broadcast_info (jack_nframes_t when, struct tm& now, time_t
now.tm_mon,
now.tm_mday);
- snprintf (_broadcast_info->origination_time, sizeof (_broadcast_info->origination_time), "%02d-%02d-%02d",
+ snprintf (_broadcast_info->origination_time, sizeof (_broadcast_info->origination_time), "%02d:%02d:%02d",
now.tm_hour,
now.tm_min,
now.tm_sec);
@@ -495,33 +496,12 @@ SndFileSource::setup_broadcast_info (jack_nframes_t when, struct tm& now, time_t
void
SndFileSource::set_header_timeline_position ()
{
- uint64_t pos;
-
if (!(_flags & Broadcast)) {
return;
}
- _broadcast_info->time_reference_high = 0;
-
- if (header_position_negative) {
-
- if (ULONG_LONG_MAX - header_position_offset < timeline_position) {
- pos = ULONG_LONG_MAX; // impossible
- } else {
- pos = timeline_position + header_position_offset;
- }
-
- } else {
-
- if (timeline_position < header_position_offset) {
- pos = 0;
- } else {
- pos = timeline_position - header_position_offset;
- }
- }
-
- _broadcast_info->time_reference_high = (pos >> 32);
- _broadcast_info->time_reference_low = (pos & 0xffffffff);
+ _broadcast_info->time_reference_high = (timeline_position >> 32);
+ _broadcast_info->time_reference_low = (timeline_position & 0xffffffff);
if (sf_command (sf, SFC_SET_BROADCAST_INFO, _broadcast_info, sizeof (*_broadcast_info)) != SF_TRUE) {
error << string_compose (_("cannot set broadcast info for audio file %1; Dropping broadcast info for this file"), _path) << endmsg;
@@ -545,3 +525,9 @@ SndFileSource::write_float (Sample* data, jack_nframes_t frame_pos, jack_nframes
return cnt;
}
+
+jack_nframes_t
+SndFileSource::natural_position() const
+{
+ return timeline_position;
+}
diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc
index 0d32ea4a21..eebc64d463 100644
--- a/libs/ardour/source.cc
+++ b/libs/ardour/source.cc
@@ -45,7 +45,6 @@ using namespace ARDOUR;
Source::Source (string name)
{
_name = name;
- _id = ARDOUR::new_id();
_use_cnt = 0;
_timestamp = 0;
}
@@ -71,7 +70,7 @@ Source::get_state ()
char buf[64];
node->add_property ("name", _name);
- snprintf (buf, sizeof(buf)-1, "%" PRIu64, _id);
+ _id.print (buf);
node->add_property ("id", buf);
if (_timestamp != 0) {
@@ -94,7 +93,7 @@ Source::set_state (const XMLNode& node)
}
if ((prop = node.property ("id")) != 0) {
- sscanf (prop->value().c_str(), "%" PRIu64, &_id);
+ _id = prop->value ();
} else {
return -1;
}
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index 9adc7c72cd..f021639028 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -186,15 +186,6 @@ touch_file (string path)
return 1;
}
-uint32_t long
-get_uid()
-{
- struct timeval tv;
- gettimeofday(&tv, 0);
-
- return (uint32_t long) tv.tv_sec * 1000000 + tv.tv_usec;
-}
-
string
placement_as_string (Placement p)
{
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc
index 80c36dab95..352b887e13 100644
--- a/libs/ardour/vst_plugin.cc
+++ b/libs/ardour/vst_plugin.cc
@@ -41,8 +41,6 @@
#include <vst/aeffectx.h>
-#include <midi++/manager.h>
-
#include <ardour/ardour.h>
#include <ardour/session.h>
#include <ardour/audioengine.h>
@@ -81,7 +79,7 @@ VSTPlugin::VSTPlugin (AudioEngine& e, Session& session, FSTHandle* h)
_plugin->dispatcher (_plugin, effSetProgram, 0, 0, NULL, 0.0f);
- Plugin::setup_midi_controls ();
+ Plugin::setup_controls ();
}
VSTPlugin::VSTPlugin (const VSTPlugin &other)
@@ -94,7 +92,7 @@ VSTPlugin::VSTPlugin (const VSTPlugin &other)
}
_plugin = _fst->plugin;
- Plugin::setup_midi_controls ();
+ Plugin::setup_controls ();
}
VSTPlugin::~VSTPlugin ()
@@ -133,13 +131,6 @@ VSTPlugin::set_parameter (uint32_t which, float val)
{
_plugin->setParameter (_plugin, which, val);
ParameterChanged (which, val); /* EMIT SIGNAL */
-
- if (session().get_midi_feedback()) {
-
- if (which < parameter_count() && midi_controls[which]) {
- midi_controls[which]->send_feedback (val);
- }
- }
}
float
diff --git a/libs/gtkmm2ext/SConscript b/libs/gtkmm2ext/SConscript
index 5d8489f103..bb28945641 100644
--- a/libs/gtkmm2ext/SConscript
+++ b/libs/gtkmm2ext/SConscript
@@ -10,7 +10,6 @@ gtkmm2ext = env.Copy()
gtkmm2ext.Merge ([
libraries['sigc2'],
libraries['pbd'],
- libraries['midi++2'],
libraries['gtk2'],
libraries['glibmm2'],
libraries['pangomm'],
@@ -28,16 +27,16 @@ domain = 'libgtkmm2ext'
gtkmm2ext.Append(DOMAIN=domain,MAJOR=0,MINOR=8,MICRO=2)
gtkmm2ext.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
gtkmm2ext.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
+gtkmm2ext.Append(CPPPATH='#libs/surfaces/control_protocol')
gtkmm2ext.Append(PACKAGE=domain)
gtkmm2ext.Append(POTFILE=domain + '.pot')
gtkmm2ext_files = Split("""
auto_spin.cc
barcontroller.cc
-bindable_button.cc
+binding_proxy.cc
choice.cc
click_box.cc
-controller.cc
dndtreeview.cc
fastmeter.cc
gtk_ui.cc
diff --git a/libs/gtkmm2ext/barcontroller.cc b/libs/gtkmm2ext/barcontroller.cc
index c977f3e5f7..eefe6ca843 100644
--- a/libs/gtkmm2ext/barcontroller.cc
+++ b/libs/gtkmm2ext/barcontroller.cc
@@ -23,7 +23,7 @@
#include <cmath>
#include <algorithm>
-#include <midi++/controllable.h>
+#include <pbd/controllable.h>
#include <gtkmm2ext/gtk_ui.h>
#include <gtkmm2ext/utils.h>
@@ -36,16 +36,13 @@ using namespace Gtk;
using namespace Gtkmm2ext;
BarController::BarController (Gtk::Adjustment& adj,
- MIDI::Controllable *mc,
+ PBD::Controllable& mc,
sigc::slot<void,char*,unsigned int> lc)
: adjustment (adj),
- prompter (Gtk::WIN_POS_MOUSE, 30000, false),
- midi_control (mc),
+ binding_proxy (mc),
label_callback (lc),
- spinner (adjustment),
- bind_button (2),
- bind_statemask (Gdk::CONTROL_MASK)
+ spinner (adjustment)
{
_style = LeftToRight;
@@ -77,16 +74,6 @@ BarController::BarController (Gtk::Adjustment& adj,
darea.signal_button_release_event().connect (mem_fun (*this, &BarController::button_release));
darea.signal_scroll_event().connect (mem_fun (*this, &BarController::scroll));
- prompter.signal_unmap_event().connect (mem_fun (*this, &BarController::prompter_hiding));
-
- prompting = false;
- unprompting = false;
-
- if (mc) {
- mc->learning_started.connect (mem_fun (*this, &BarController::midicontrol_prompt));
- mc->learning_stopped.connect (mem_fun (*this, &BarController::midicontrol_unprompt));
- }
-
spinner.signal_activate().connect (mem_fun (*this, &BarController::entry_activated));
spinner.signal_focus_out_event().connect (mem_fun (*this, &BarController::entry_focus_out));
spinner.set_digits (3);
@@ -95,24 +82,13 @@ BarController::BarController (Gtk::Adjustment& adj,
show_all ();
}
-void
-BarController::set_bind_button_state (guint button, guint statemask)
-{
- bind_button = button;
- bind_statemask = statemask;
-}
-
-void
-BarController::get_bind_button_state (guint &button, guint &statemask)
-{
- button = bind_button;
- statemask = bind_statemask;
-}
-
-
bool
BarController::button_press (GdkEventButton* ev)
{
+ if (binding_proxy.button_press_handler (ev)) {
+ return true;
+ }
+
switch (ev->button) {
case 1:
if (ev->type == GDK_2BUTTON_PRESS) {
@@ -174,8 +150,8 @@ BarController::button_release (GdkEventButton* ev)
break;
case 2:
- if ((ev->state & bind_statemask) && bind_button == 2) {
- midi_learn ();
+ if (true) { // XXX FIX ME
+ /* relax */
} else {
double fract;
fract = ev->x / (darea.get_width() - 2.0);
@@ -185,10 +161,6 @@ BarController::button_release (GdkEventButton* ev)
return true;
case 3:
- if ((ev->state & bind_statemask) && bind_button == 3) {
- midi_learn ();
- return TRUE;
- }
return false;
default:
@@ -408,61 +380,6 @@ BarController::set_with_text (bool yn)
}
void
-BarController::midicontrol_set_tip ()
-{
- if (midi_control) {
- // Gtkmm2ext::UI::instance()->set_tip (&darea, midi_control->control_description());
- }
-}
-
-void
-BarController::midi_learn()
-{
- if (midi_control) {
- prompting = true;
- midi_control->learn_about_external_control ();
- }
-}
-
-
-void
-BarController::midicontrol_prompt ()
-{
- if (prompting) {
- string prompt = _("operate MIDI controller now");
- prompter.set_text (prompt);
- Gtkmm2ext::UI::instance()->touch_display (&prompter);
-
- unprompting = true;
- prompting = false;
- }
-}
-
-void
-BarController::midicontrol_unprompt ()
-{
- if (unprompting) {
- Gtkmm2ext::UI::instance()->touch_display (&prompter);
-
- unprompting = false;
- }
-}
-
-gint
-BarController::prompter_hiding (GdkEventAny *ev)
-{
- if (unprompting) {
- if (midi_control) {
- midi_control->stop_learning();
- }
- unprompting = false;
- }
-
- return FALSE;
-}
-
-
-void
BarController::set_style (Style s)
{
_style = s;
diff --git a/libs/gtkmm2ext/binding_proxy.cc b/libs/gtkmm2ext/binding_proxy.cc
new file mode 100644
index 0000000000..3a2f5bbbc8
--- /dev/null
+++ b/libs/gtkmm2ext/binding_proxy.cc
@@ -0,0 +1,89 @@
+/*
+ Copyright (C) 2006 Paul Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <string>
+#include <climits>
+#include <iostream>
+
+#include <pbd/controllable.h>
+
+#include <gtkmm2ext/binding_proxy.h>
+
+#include "i18n.h"
+
+using namespace Gtkmm2ext;
+using namespace std;
+using namespace PBD;
+
+BindingProxy::BindingProxy (Controllable& c)
+ : prompter (Gtk::WIN_POS_MOUSE, 30000, false),
+ controllable (c),
+ bind_button (2),
+ bind_statemask (Gdk::CONTROL_MASK)
+
+{
+ prompter.signal_unmap_event().connect (mem_fun (*this, &BindingProxy::prompter_hiding));
+}
+
+void
+BindingProxy::set_bind_button_state (guint button, guint statemask)
+{
+ bind_button = button;
+ bind_statemask = statemask;
+}
+
+void
+BindingProxy::get_bind_button_state (guint &button, guint &statemask)
+{
+ button = bind_button;
+ statemask = bind_statemask;
+}
+
+bool
+BindingProxy::button_press_handler (GdkEventButton *ev)
+{
+ if ((ev->state & bind_statemask) && ev->button == bind_button) {
+ if (Controllable::StartLearning (&controllable)) {
+ string prompt = _("operate controller now");
+ prompter.set_text (prompt);
+ prompter.touch (); // shows popup
+ learning_connection = controllable.LearningFinished.connect (mem_fun (*this, &BindingProxy::learning_finished));
+ }
+ return true;
+ }
+
+ return false;
+}
+
+void
+BindingProxy::learning_finished ()
+{
+ learning_connection.disconnect ();
+ prompter.touch (); // hides popup
+}
+
+
+bool
+BindingProxy::prompter_hiding (GdkEventAny *ev)
+{
+ learning_connection.disconnect ();
+ Controllable::StopLearning (&controllable);
+ return false;
+}
+
diff --git a/libs/gtkmm2ext/controller.cc b/libs/gtkmm2ext/controller.cc
deleted file mode 100644
index 98d5566c69..0000000000
--- a/libs/gtkmm2ext/controller.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Davis
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#include <string>
-#include <climits>
-
-#include <midi++/channel.h>
-#include <gtkmm2ext/gtk_ui.h>
-#include <gtkmm2ext/controller.h>
-
-#include "i18n.h"
-
-using namespace Gtkmm2ext;
-
-Controller::Controller (Gtk::Adjustment *adj, MIDI::Port *p)
- : MIDI::Controllable (p),
- adjustment (adj),
- prompter (Gtk::WIN_POS_MOUSE, 30000, false)
-{
- new_value_pending = false;
-
- /* hear about MIDI control learning */
-
- learning_started.connect
- (mem_fun (*this, &Controller::midicontrol_prompt));
- learning_stopped.connect
- (mem_fun (*this, &Controller::midicontrol_unprompt));
-}
-
-void
-Controller::midicontrol_prompt ()
-
-{
- string prompt = _("operate MIDI controller now");
-
- prompter.set_text (prompt);
- Gtkmm2ext::UI::instance()->touch_display (&prompter);
-}
-
-void
-Controller::midicontrol_unprompt ()
-
-{
- Gtkmm2ext::UI::instance()->touch_display (&prompter);
-}
-
-int
-Controller::update_controller_value (void *arg)
-
-{
- Controller *c = (Controller *) arg;
-
- c->adjustment->set_value (c->new_value);
- c->new_value_pending = false;
-
- return FALSE;
-}
-
-void
-Controller::set_value (float v)
-
-{
- /* This is called from a MIDI callback. It could happen
- a thousand times a second, or more. Therefore, instead
- of going straight to the X server, which may not work for
- thread-related reasons, simply request an update whenever
- the GTK main loop is idle.
- */
-
- new_value = v;
-
- if (!new_value_pending) {
- new_value_pending = true;
- Gtkmm2ext::UI::instance()->idle_add (update_controller_value, this);
- }
-}
diff --git a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h
index 67c8221a55..ebce4e2de9 100644
--- a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h
+++ b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h
@@ -21,9 +21,9 @@
#define __gtkmm2ext_bar_controller_h__
#include <gtkmm.h>
-#include <gtkmm2ext/popup.h>
+#include <gtkmm2ext/binding_proxy.h>
-namespace MIDI {
+namespace ARDOUR {
class Controllable;
}
@@ -32,14 +32,9 @@ namespace Gtkmm2ext {
class BarController : public Gtk::Frame
{
public:
- BarController (Gtk::Adjustment& adj, MIDI::Controllable*, sigc::slot<void,char*,unsigned int>);
+ BarController (Gtk::Adjustment& adj, PBD::Controllable&, sigc::slot<void,char*,unsigned int>);
virtual ~BarController () {}
- void set_bind_button_state (guint button, guint statemask);
- void get_bind_button_state (guint &button, guint &statemask);
- void midicontrol_set_tip ();
- void midi_learn ();
-
void set_sensitive (bool yn) {
darea.set_sensitive (yn);
}
@@ -69,9 +64,8 @@ class BarController : public Gtk::Frame
protected:
Gtk::Adjustment& adjustment;
+ BindingProxy binding_proxy;
Gtk::DrawingArea darea;
- Gtkmm2ext::PopUp prompter;
- MIDI::Controllable* midi_control;
sigc::slot<void,char*,unsigned int> label_callback;
Glib::RefPtr<Pango::Layout> layout;
Style _style;
@@ -85,10 +79,6 @@ class BarController : public Gtk::Frame
Gtk::SpinButton spinner;
bool use_parent;
- guint bind_button;
- guint bind_statemask;
- bool prompting, unprompting;
-
bool button_press (GdkEventButton *);
bool button_release (GdkEventButton *);
bool motion (GdkEventMotion *);
@@ -98,11 +88,6 @@ class BarController : public Gtk::Frame
gint mouse_control (double x, GdkWindow* w, double scaling);
- gint prompter_hiding (GdkEventAny *);
- void midicontrol_prompt ();
- void midicontrol_unprompt ();
- void update_midi_control ();
-
gint switch_to_bar ();
gint switch_to_spinner ();
diff --git a/libs/gtkmm2ext/gtkmm2ext/bindable_button.h b/libs/gtkmm2ext/gtkmm2ext/bindable_button.h
index 7400cf15d0..1936125405 100644
--- a/libs/gtkmm2ext/gtkmm2ext/bindable_button.h
+++ b/libs/gtkmm2ext/gtkmm2ext/bindable_button.h
@@ -18,59 +18,31 @@
$Id$
*/
-#ifndef __pbd_gtkmm_bindable_button_h__
-#define __pbd_gtkmm_bindable_button_h__
+#ifndef __bindable_button_h__
+#define __bindable_button_h__
#include <string>
#include <gtkmm2ext/stateful_button.h>
-#include <gtkmm2ext/popup.h>
+#include "binding_proxy.h"
-namespace MIDI {
+namespace PBD {
class Controllable;
}
-namespace Gtkmm2ext {
-
class BindableToggleButton : public Gtk::ToggleButton
{
public:
- BindableToggleButton(MIDI::Controllable *);
-
- //: Create a check button with a label.
- //- You won't be able
- //- to add a widget in this button since it already has a {\class Gtk_Label}
- //- in it.
- explicit BindableToggleButton(MIDI::Controllable *, const std::string &label);
-
+ BindableToggleButton (PBD::Controllable& c) : binding_proxy (c) {}
+ explicit BindableToggleButton (PBD::Controllable& c, const std::string &label) : Gtk::ToggleButton (label), binding_proxy (c) {}
virtual ~BindableToggleButton() {}
- void set_bind_button_state (guint button, guint statemask);
- void get_bind_button_state (guint &button, guint &statemask);
-
- void midicontrol_set_tip ();
-
- void midi_learn ();
-
- protected:
-
- Gtkmm2ext::PopUp prompter;
-
- MIDI::Controllable* midi_control;
-
- guint bind_button;
- guint bind_statemask;
-
- bool prompting, unprompting;
-
- void init_events ();
- bool prompter_hiding (GdkEventAny *);
- void midicontrol_prompt ();
- void midicontrol_unprompt ();
-
- bool on_button_press_event (GdkEventButton *);
-};
+ bool on_button_press_event (GdkEventButton *ev) {
+ return binding_proxy.button_press_handler (ev);
+ }
+ private:
+ BindingProxy binding_proxy;
};
#endif
diff --git a/libs/pbd3/pbd/textreceiver.h b/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h
index b8bfe5bc78..a26c8ace2a 100644
--- a/libs/pbd3/pbd/textreceiver.h
+++ b/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1998-99 Paul Barton-Davis
+ Copyright (C) 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,27 +18,37 @@
$Id$
*/
-#ifndef __libmisc_textreceiver_h__
-#define __libmisc_textreceiver_h__
+#ifndef __binding_proxy__
+#define __binding_proxy__
#include <string>
-#include "receiver.h"
+#include <gtkmm2ext/popup.h>
-using std::string;
-using std::cout;
-using std::endl;
+namespace PBD {
+ class Controllable;
+}
-class TextReceiver : public Receiver
+class BindingProxy : public sigc::trackable
{
- public:
- TextReceiver (const string &n);
+ public:
+ BindingProxy (PBD::Controllable&);
+ virtual ~BindingProxy() {}
+
+ void set_bind_button_state (guint button, guint statemask);
+ void get_bind_button_state (guint &button, guint &statemask);
+
+ bool button_press_handler (GdkEventButton *);
protected:
- void receive (Transmitter::Channel, const char *);
- private:
- string name;
+ Gtkmm2ext::PopUp prompter;
+ PBD::Controllable& controllable;
+ guint bind_button;
+ guint bind_statemask;
+ sigc::connection learning_connection;
+ void learning_finished ();
+ bool prompter_hiding (GdkEventAny *);
};
-#endif //__libmisc_textreceiver_h__
+#endif
diff --git a/libs/gtkmm2ext/gtkmm2ext/controller.h b/libs/gtkmm2ext/gtkmm2ext/controller.h
deleted file mode 100644
index b72f6c7ed7..0000000000
--- a/libs/gtkmm2ext/gtkmm2ext/controller.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Davis
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __gtkmm2ext_controller_h__
-#define __gtkmm2ext_controller_h__
-
-#include <gtkmm.h>
-#include <gtkmm2ext/popup.h>
-#include <midi++/controllable.h>
-
-namespace Gtkmm2ext {
-
-class Controller : public MIDI::Controllable
-
-{
- public:
- Controller (Gtk::Adjustment *, MIDI::Port *);
- virtual ~Controller () {}
-
- void set_value (float);
- float lower () { return adjustment->get_lower(); }
- float upper () { return adjustment->get_upper(); }
- float range () { return upper() - lower() /* XXX +1 ??? */ ; }
-
- void midicontrol_prompt ();
- void midicontrol_unprompt ();
-
- protected:
- Gtk::Adjustment *adjustment;
-
- private:
- Gtkmm2ext::PopUp prompter;
- gfloat new_value;
- bool new_value_pending;
-
- static gint update_controller_value (void *);
-};
-
-}; /* namespace */
-
-#endif // __gtkmm2ext_controller_h__
-
-
diff --git a/libs/gtkmm2ext/gtkmm2ext/slider_controller.h b/libs/gtkmm2ext/gtkmm2ext/slider_controller.h
index 7abaf285d1..f0f645eab7 100644
--- a/libs/gtkmm2ext/gtkmm2ext/slider_controller.h
+++ b/libs/gtkmm2ext/gtkmm2ext/slider_controller.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1998-99 Paul Davis
+ Copyright (C) 1998-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -17,18 +17,19 @@
$Id$
*/
-#ifndef __gtkmm2ext_motion_controller_h__
-#define __gtkmm2ext_motion_controller_h__
+#ifndef __gtkmm2ext_slider_controller_h__
+#define __gtkmm2ext_slider_controller_h__
#include <gtkmm.h>
#include <gtkmm2ext/popup.h>
#include <gtkmm2ext/pixscroller.h>
+#include <gtkmm2ext/binding_proxy.h>
namespace Gtkmm2ext {
class Pix;
}
-namespace MIDI {
+namespace PBD {
class Controllable;
}
@@ -40,41 +41,24 @@ class SliderController : public Gtkmm2ext::PixScroller
SliderController (Glib::RefPtr<Gdk::Pixbuf> slider,
Glib::RefPtr<Gdk::Pixbuf> rail,
Gtk::Adjustment* adj,
- MIDI::Controllable*,
+ PBD::Controllable&,
bool with_numeric = true);
virtual ~SliderController () {}
- void set_bind_button_state (guint button, guint statemask);
- void get_bind_button_state (guint &button, guint &statemask);
- void midicontrol_set_tip ();
- void midi_learn ();
-
void set_value (float);
- // void set_sensitive (bool yn) {
- // spin.set_sensitive (yn);
- // }
- Gtk::SpinButton & get_spin_button () { return spin; }
+ Gtk::SpinButton& get_spin_button () { return spin; }
+ bool on_button_press_event (GdkEventButton *ev);
+
protected:
+ BindingProxy binding_proxy;
Glib::RefPtr<Gdk::Pixbuf> slider;
Glib::RefPtr<Gdk::Pixbuf> rail;
Gtk::SpinButton spin;
Gtk::Frame spin_frame;
Gtk::HBox spin_hbox;
- Gtkmm2ext::PopUp prompter;
- MIDI::Controllable* midi_control;
-
- guint bind_button;
- guint bind_statemask;
- bool prompting, unprompting;
-
- bool button_press (GdkEventButton *);
- bool prompter_hiding (GdkEventAny *);
- void midicontrol_prompt ();
- void midicontrol_unprompt ();
- void update_midi_control ();
};
class VSliderController : public SliderController
@@ -83,7 +67,7 @@ class VSliderController : public SliderController
VSliderController (Glib::RefPtr<Gdk::Pixbuf> slider,
Glib::RefPtr<Gdk::Pixbuf> rail,
Gtk::Adjustment *adj,
- MIDI::Controllable *,
+ PBD::Controllable&,
bool with_numeric = true);
};
@@ -93,11 +77,11 @@ class HSliderController : public SliderController
HSliderController (Glib::RefPtr<Gdk::Pixbuf> slider,
Glib::RefPtr<Gdk::Pixbuf> rail,
Gtk::Adjustment *adj,
- MIDI::Controllable *,
+ PBD::Controllable&,
bool with_numeric = true);
};
}; /* namespace */
-#endif // __gtkmm2ext_motion_controller_h__
+#endif // __gtkmm2ext_slider_controller_h__
diff --git a/libs/gtkmm2ext/po/el_GR.po b/libs/gtkmm2ext/po/el_GR.po
index 20ddfab7e4..cc10981aa8 100644
--- a/libs/gtkmm2ext/po/el_GR.po
+++ b/libs/gtkmm2ext/po/el_GR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.99beta23\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-06-20 16:25-0400\n"
+"POT-Creation-Date: 2006-06-21 15:09-0400\n"
"PO-Revision-Date: 2005-01-11\n"
"Last-Translator: Muadibas\n"
"Language-Team: Hellenic(Greek) <LL@li.org>\n"
@@ -20,7 +20,7 @@ msgstr ""
msgid "operate MIDI controller now"
msgstr "λειτουÏγία ελεγκτή MIDI Ï„ÏŽÏα"
-#: libs/gtkmm2ext/gtk_ui.cc:509
+#: libs/gtkmm2ext/gtk_ui.cc:510
msgid "Press To Exit"
msgstr ""
diff --git a/libs/gtkmm2ext/po/es_ES.po b/libs/gtkmm2ext/po/es_ES.po
index ccc7933755..8b7dc8804d 100644
--- a/libs/gtkmm2ext/po/es_ES.po
+++ b/libs/gtkmm2ext/po/es_ES.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gtkmm2ext\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-06-20 16:25-0400\n"
+"POT-Creation-Date: 2006-06-21 15:09-0400\n"
"PO-Revision-Date: 2004-02-13 00:35+0300\n"
"Last-Translator: Alex Krohn alexkrohn@fastmail.fm\n"
"Language-Team: Spanish\n"
@@ -19,7 +19,7 @@ msgstr ""
msgid "operate MIDI controller now"
msgstr "Operar controladora de MIDI ahora"
-#: libs/gtkmm2ext/gtk_ui.cc:509
+#: libs/gtkmm2ext/gtk_ui.cc:510
msgid "Press To Exit"
msgstr ""
diff --git a/libs/gtkmm2ext/po/pt_BR.po b/libs/gtkmm2ext/po/pt_BR.po
index 4cf068dc7a..66381c2d37 100644
--- a/libs/gtkmm2ext/po/pt_BR.po
+++ b/libs/gtkmm2ext/po/pt_BR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gtkmm2ext\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-06-20 16:25-0400\n"
+"POT-Creation-Date: 2006-06-21 15:09-0400\n"
"PO-Revision-Date: 2004-05-17 20:36+0200\n"
"Last-Translator: Chris Ross <chris.ross@tebibyte.org>\n"
"Language-Team: Portuguese\n"
@@ -20,7 +20,7 @@ msgstr ""
msgid "operate MIDI controller now"
msgstr "Operar controladora de MIDI agora"
-#: libs/gtkmm2ext/gtk_ui.cc:509
+#: libs/gtkmm2ext/gtk_ui.cc:510
msgid "Press To Exit"
msgstr ""
diff --git a/libs/gtkmm2ext/po/ru_RU.po b/libs/gtkmm2ext/po/ru_RU.po
index 5bfb6eb73c..4a3edcef5c 100644
--- a/libs/gtkmm2ext/po/ru_RU.po
+++ b/libs/gtkmm2ext/po/ru_RU.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gtkmm2ext\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-06-20 16:25-0400\n"
+"POT-Creation-Date: 2006-06-21 15:09-0400\n"
"PO-Revision-Date: 2004-02-13 00:35+0300\n"
"Last-Translator: Igor Blinov pitstop@nm.ru\n"
"Language-Team: Russian\n"
@@ -19,7 +19,7 @@ msgstr ""
msgid "operate MIDI controller now"
msgstr "×ËÌÀÞÉÔØ MIDI-ËÏÎÔÒÏÌÌÅÒ"
-#: libs/gtkmm2ext/gtk_ui.cc:509
+#: libs/gtkmm2ext/gtk_ui.cc:510
msgid "Press To Exit"
msgstr ""
diff --git a/libs/gtkmm2ext/popup.cc b/libs/gtkmm2ext/popup.cc
index 0a48ebfc59..a8ffc4af66 100644
--- a/libs/gtkmm2ext/popup.cc
+++ b/libs/gtkmm2ext/popup.cc
@@ -73,11 +73,12 @@ PopUp::remove ()
{
hide ();
+ if (popdown_time != 0 && timeout != -1) {
+ gtk_timeout_remove (timeout);
+ }
+
if (delete_on_hide) {
std::cerr << "deleting prompter\n";
- if (popdown_time != 0 && timeout != -1) {
- gtk_timeout_remove (timeout);
- }
gtk_idle_add (idle_delete, this);
}
}
@@ -125,11 +126,12 @@ PopUp::on_delete_event (GdkEventAny* ev)
{
hide();
+ if (popdown_time != 0 && timeout != -1) {
+ gtk_timeout_remove (timeout);
+ }
+
if (delete_on_hide) {
std::cerr << "deleting prompter\n" << endl;
- if (popdown_time != 0 && timeout != -1) {
- gtk_timeout_remove (timeout);
- }
gtk_idle_add (idle_delete, this);
}
diff --git a/libs/gtkmm2ext/slider_controller.cc b/libs/gtkmm2ext/slider_controller.cc
index 734d5eb62f..e524eba1cb 100644
--- a/libs/gtkmm2ext/slider_controller.cc
+++ b/libs/gtkmm2ext/slider_controller.cc
@@ -18,47 +18,30 @@
*/
#include <string>
-#include <climits>
-
-#include <midi++/controllable.h>
#include <gtkmm2ext/gtk_ui.h>
-#include <gtkmm2ext/slider_controller.h>
#include <gtkmm2ext/pixscroller.h>
+#include <gtkmm2ext/slider_controller.h>
#include "i18n.h"
using namespace Gtkmm2ext;
+using namespace PBD;
SliderController::SliderController (Glib::RefPtr<Gdk::Pixbuf> slide,
Glib::RefPtr<Gdk::Pixbuf> rail,
Gtk::Adjustment *adj,
- MIDI::Controllable *mc,
+ Controllable& c,
bool with_numeric)
: PixScroller (*adj, slide, rail),
- spin (*adj, 0, 2),
- prompter (Gtk::WIN_POS_MOUSE, 30000, false),
- midi_control (mc),
- bind_button (2),
- bind_statemask (Gdk::CONTROL_MASK)
-
+ binding_proxy (c),
+ spin (*adj, 0, 2)
{
- signal_button_press_event().connect (mem_fun (this, &SliderController::button_press));
spin.set_name ("SliderControllerValue");
spin.set_size_request (70,-1); // should be based on font size somehow
spin.set_numeric (true);
spin.set_snap_to_ticks (false);
-
- prompter.signal_unmap_event().connect (mem_fun (*this, &SliderController::prompter_hiding));
-
- prompting = false;
- unprompting = false;
-
- if (mc) {
- mc->learning_started.connect (mem_fun (*this, &SliderController::midicontrol_prompt));
- mc->learning_stopped.connect (mem_fun (*this, &SliderController::midicontrol_unprompt));
- }
}
void
@@ -67,95 +50,22 @@ SliderController::set_value (float v)
adj.set_value (v);
}
-void
-SliderController::set_bind_button_state (guint button, guint statemask)
-{
- bind_button = button;
- bind_statemask = statemask;
-}
-
-void
-SliderController::get_bind_button_state (guint &button, guint &statemask)
-{
- button = bind_button;
- statemask = bind_statemask;
-}
-
-void
-SliderController::midi_learn()
-{
- if (midi_control) {
- prompting = true;
- midi_control->learn_about_external_control ();
- }
-}
-
-bool
-SliderController::button_press (GdkEventButton *ev)
+bool
+SliderController::on_button_press_event (GdkEventButton *ev)
{
- if ((ev->state & bind_statemask) && ev->button == bind_button) {
- midi_learn ();
+ if (binding_proxy.button_press_handler (ev)) {
return true;
}
-
- return false;
-}
-
-void
-SliderController::midicontrol_set_tip ()
-
-{
- if (midi_control) {
- // Gtkmm2ext::UI::instance()->set_tip (this, midi_control->control_description());
- }
-}
-
-bool
-SliderController::prompter_hiding (GdkEventAny *ev)
-{
- if (unprompting) {
- if (midi_control) {
- midi_control->stop_learning();
- }
- unprompting = false;
- }
-
- return false;
-}
-
-void
-SliderController::midicontrol_prompt ()
-
-{
- if (prompting) {
-
- string prompt = _("operate MIDI controller now");
- prompter.set_text (prompt);
- Gtkmm2ext::UI::instance()->touch_display (&prompter);
-
- unprompting = true;
- prompting = false;
- }
-}
-
-void
-SliderController::midicontrol_unprompt ()
-
-{
- if (unprompting) {
- Gtkmm2ext::UI::instance()->touch_display (&prompter);
- unprompting = false;
- }
+ return PixScroller::on_button_press_event (ev);
}
-
VSliderController::VSliderController (Glib::RefPtr<Gdk::Pixbuf> slide,
Glib::RefPtr<Gdk::Pixbuf> rail,
Gtk::Adjustment *adj,
- MIDI::Controllable *mcontrol,
+ Controllable& control,
bool with_numeric)
- : SliderController (slide, rail, adj, mcontrol, with_numeric)
+ : SliderController (slide, rail, adj, control, with_numeric)
{
if (with_numeric) {
spin_frame.add (spin);
@@ -169,10 +79,10 @@ VSliderController::VSliderController (Glib::RefPtr<Gdk::Pixbuf> slide,
HSliderController::HSliderController (Glib::RefPtr<Gdk::Pixbuf> slide,
Glib::RefPtr<Gdk::Pixbuf> rail,
Gtk::Adjustment *adj,
- MIDI::Controllable *mcontrol,
+ Controllable& control,
bool with_numeric)
- : SliderController (slide, rail, adj, mcontrol, with_numeric)
+ : SliderController (slide, rail, adj, control, with_numeric)
{
if (with_numeric) {
spin_frame.add (spin);
diff --git a/libs/libgnomecanvasmm/SConscript b/libs/libgnomecanvasmm/SConscript
index 1d5f3e0050..d9620dc378 100644
--- a/libs/libgnomecanvasmm/SConscript
+++ b/libs/libgnomecanvasmm/SConscript
@@ -8,7 +8,14 @@ gnomecanvasmm_files = glob.glob('libgnomecanvasmm/*.cc')
Import('env libraries install_prefix')
gnomecanvasmm = env.Copy()
-gnomecanvasmm.Merge([libraries['glibmm2'], libraries['gtk2'], libraries['sigc2'], libraries['pangomm'], libraries['atkmm'], libraries['gdkmm2'], libraries['gtkmm2'], libraries['libgnomecanvas2'] ])
+gnomecanvasmm.Merge([libraries['glibmm2'],
+ libraries['gtk2'],
+ libraries['sigc2'],
+ libraries['pangomm'],
+ libraries['atkmm'],
+ libraries['gdkmm2'],
+ libraries['gtkmm2'],
+ libraries['libgnomecanvas2'] ])
libgnomecanvasmm = gnomecanvasmm.SharedLibrary('libgnomecanvasmm', gnomecanvasmm_files)
Default(libgnomecanvasmm)
diff --git a/libs/libsndfile/src/sndfile.c b/libs/libsndfile/src/sndfile.c
index 47b74cfd7f..14586526e4 100644
--- a/libs/libsndfile/src/sndfile.c
+++ b/libs/libsndfile/src/sndfile.c
@@ -1065,20 +1065,19 @@ sf_command (SNDFILE *sndfile, int command, void *data, int datasize)
memcpy (data, psf->loop_info, sizeof (SF_LOOP_INFO)) ;
return SF_TRUE ;
- case SFC_SET_BROADCAST_INFO :
- { int format = psf->sf.format & SF_FORMAT_TYPEMASK ;
+ case SFC_SET_BROADCAST_INFO : {
+ int format = psf->sf.format & SF_FORMAT_TYPEMASK ;
- /* Only WAV supports the BEXT (Broadcast) chunk. */
- if (format != SF_FORMAT_WAV && format != SF_FORMAT_WAVEX)
- return SF_FALSE ;
- } ;
+ /* Only WAV supports the BEXT (Broadcast) chunk. */
+ if (format != SF_FORMAT_WAV && format != SF_FORMAT_WAVEX)
+ return SF_FALSE ;
/* Can only do this is in SFM_RDWR or SFM_WRITE modes. */
if (psf->mode == SFM_READ)
return SF_FALSE ;
/* If data has already been written this must fail. */
- if (psf->broadcast_info == NULL && psf->have_written)
+ if (psf->broadcast_info == NULL && psf->have_written)
return SF_FALSE ;
if (psf->broadcast_info == NULL)
@@ -1089,7 +1088,9 @@ sf_command (SNDFILE *sndfile, int command, void *data, int datasize)
if (psf->auto_header && psf->write_header)
psf->write_header (psf, SF_TRUE) ;
+
return SF_TRUE ;
+ }
case SFC_GET_BROADCAST_INFO :
if (datasize != sizeof (SF_BROADCAST_INFO) || data == NULL)
diff --git a/libs/pbd/SConscript b/libs/pbd/SConscript
index a9166d9505..36fb02885f 100644
--- a/libs/pbd/SConscript
+++ b/libs/pbd/SConscript
@@ -21,8 +21,10 @@ pbd_files = Split("""
basename.cc
base_ui.cc
convert.cc
+controllable.cc
dmalloc.cc
error.cc
+id.cc
mountpoint.cc
path.cc
pathscanner.cc
@@ -30,6 +32,7 @@ pool.cc
pthread_utils.cc
receiver.cc
stacktrace.cc
+stateful.cc
strsplit.cc
textreceiver.cc
transmitter.cc
@@ -46,7 +49,10 @@ if conf.CheckCHeader('execinfo.h'):
conf.env.Append(CXXFLAGS="-DHAVE_EXECINFO")
pbd = conf.Finish()
-pbd.Merge ([ libraries['sigc2'], libraries['xml'], libraries['glibmm2'], libraries['glib2'] ])
+pbd.Merge ([ libraries['sigc2'],
+ libraries['xml'],
+ libraries['glibmm2'],
+ libraries['glib2'] ])
pbd.VersionBuild(['version.cc','pbd/version.h'], 'SConscript')
diff --git a/libs/pbd/controllable.cc b/libs/pbd/controllable.cc
new file mode 100644
index 0000000000..b1176c64a5
--- /dev/null
+++ b/libs/pbd/controllable.cc
@@ -0,0 +1,26 @@
+#include <pbd/controllable.h>
+#include <pbd/xml++.h>
+
+#include "i18n.h"
+
+using namespace PBD;
+
+sigc::signal<void,Controllable*> Controllable::Created;
+sigc::signal<void,Controllable*> Controllable::GoingAway;
+sigc::signal<bool,Controllable*> Controllable::StartLearning;
+sigc::signal<void,Controllable*> Controllable::StopLearning;
+
+Controllable::Controllable ()
+{
+ Created (this);
+}
+
+XMLNode&
+Controllable::get_state ()
+{
+ XMLNode* node = new XMLNode (X_("Controllable"));
+ char buf[64];
+ _id.print (buf);
+ node->add_property (X_("id"), buf);
+ return *node;
+}
diff --git a/libs/pbd/id.cc b/libs/pbd/id.cc
new file mode 100644
index 0000000000..f9afa72c98
--- /dev/null
+++ b/libs/pbd/id.cc
@@ -0,0 +1,63 @@
+#include <ostream>
+#include <iostream>
+#include <stdio.h>
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS
+#endif
+#include <inttypes.h>
+
+#include <pbd/id.h>
+
+using namespace std;
+using namespace PBD;
+
+Glib::Mutex* ID::counter_lock = 0;
+uint64_t ID::_counter = 0;
+
+void
+ID::init ()
+{
+ counter_lock = new Glib::Mutex;
+}
+
+ID::ID ()
+{
+ Glib::Mutex::Lock lm (*counter_lock);
+ id = _counter++;
+}
+
+ID::ID (string str)
+{
+ string_assign (str);
+}
+
+int
+ID::string_assign (string str)
+{
+ return sscanf (str.c_str(), "%" PRIu64, &id) != 0;
+}
+
+void
+ID::print (char* buf) const
+{
+ /* XXX sizeof buf is unknown. bad API design */
+ snprintf (buf, 16, "%" PRIu64, id);
+}
+
+ID&
+ID::operator= (string str)
+{
+ string_assign (str);
+ return *this;
+}
+
+ostream&
+operator<< (ostream& ostr, const ID& id)
+{
+ char buf[32];
+ id.print (buf);
+ ostr << buf;
+ return ostr;
+}
+
diff --git a/libs/pbd/pbd/controllable.h b/libs/pbd/pbd/controllable.h
new file mode 100644
index 0000000000..c46e477b6e
--- /dev/null
+++ b/libs/pbd/pbd/controllable.h
@@ -0,0 +1,46 @@
+#ifndef __pbd_controllable_h__
+#define __pbd_controllable_h__
+
+#include <sigc++/trackable.h>
+#include <sigc++/signal.h>
+
+#include <pbd/stateful.h>
+#include <pbd/id.h>
+
+class XMLNode;
+
+namespace PBD {
+
+class Controllable : public virtual sigc::trackable, public Stateful {
+ public:
+ Controllable ();
+ virtual ~Controllable() { GoingAway (this); }
+
+ virtual void set_value (float) = 0;
+ virtual float get_value (void) const = 0;
+
+ virtual bool can_send_feedback() const { return true; }
+
+ sigc::signal<void> LearningFinished;
+
+ static sigc::signal<void,Controllable*> Created;
+ static sigc::signal<void,Controllable*> GoingAway;
+
+
+ static sigc::signal<bool,PBD::Controllable*> StartLearning;
+ static sigc::signal<void,PBD::Controllable*> StopLearning;
+
+ sigc::signal<void> Changed;
+
+ const PBD::ID& id() const { return _id; }
+
+ int set_state (const XMLNode&) { return 0; }
+ XMLNode& get_state ();
+
+ private:
+ PBD::ID _id;
+};
+
+}
+
+#endif /* __pbd_controllable_h__ */
diff --git a/libs/pbd/pbd/id.h b/libs/pbd/pbd/id.h
new file mode 100644
index 0000000000..9a3f10478d
--- /dev/null
+++ b/libs/pbd/pbd/id.h
@@ -0,0 +1,47 @@
+#ifndef __pbd_id_h__
+#define __pbd_id_h__
+
+#include <stdint.h>
+#include <string>
+
+#include <glibmm/thread.h>
+
+namespace PBD {
+
+class ID {
+ public:
+ ID ();
+ ID (std::string);
+
+ bool operator== (const ID& other) const {
+ return id == other.id;
+ }
+
+ bool operator!= (const ID& other) const {
+ return id != other.id;
+ }
+
+ ID& operator= (std::string);
+
+ bool operator< (const ID& other) const {
+ return id < other.id;
+ }
+
+ void print (char* buf) const;
+
+ static uint64_t counter() { return _counter; }
+ static void init_counter (uint64_t val) { _counter = val; }
+ static void init ();
+
+ private:
+ uint64_t id;
+ int string_assign (std::string);
+
+ static Glib::Mutex* counter_lock;
+ static uint64_t _counter;
+};
+
+}
+std::ostream& operator<< (std::ostream& ostr, const PBD::ID&);
+
+#endif /* __pbd_id_h__ */
diff --git a/libs/ardour/ardour/stateful.h b/libs/pbd/pbd/stateful.h
index 4f4cb20b39..3038f16b4f 100644
--- a/libs/ardour/ardour/stateful.h
+++ b/libs/pbd/pbd/stateful.h
@@ -15,11 +15,11 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
+ $Id: stateful.h 17 2005-09-24 19:13:41Z taybin $
*/
-#ifndef __ardour_stateful_h__
-#define __ardour_stateful_h__
+#ifndef __pbd_stateful_h__
+#define __pbd_stateful_h__
#include <string>
@@ -47,5 +47,5 @@ class Stateful {
XMLNode *_instant_xml;
};
-#endif /* __ardour_stateful_h__ */
+#endif /* __pbd_stateful_h__ */
diff --git a/libs/ardour/stateful.cc b/libs/pbd/stateful.cc
index b8e301b273..16aa528f59 100644
--- a/libs/ardour/stateful.cc
+++ b/libs/pbd/stateful.cc
@@ -15,15 +15,14 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
+ $Id: stateful.cc 629 2006-06-21 23:01:03Z paul $
*/
-#include <cstdio>
#include <unistd.h>
-#include <ardour/stateful.h>
-#include <ardour/utils.h>
+#include <pbd/stateful.h>
#include <pbd/xml++.h>
+#include <pbd/error.h>
#include "i18n.h"
@@ -39,7 +38,10 @@ Stateful::~Stateful ()
{
// Do not delete _extra_xml. The use of add_child_nocopy()
// means it needs to live on indefinately.
- delete _instant_xml;
+
+ if (_instant_xml) {
+ delete _instant_xml;
+ }
}
void
diff --git a/libs/pbd3/.cvsignore b/libs/pbd3/.cvsignore
deleted file mode 100644
index e9a15e81e9..0000000000
--- a/libs/pbd3/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-libpbd.pc
-libpbd.spec
-version.cc
-*.os
-*.dylib
diff --git a/libs/pbd3/AUTHORS b/libs/pbd3/AUTHORS
deleted file mode 100644
index e69de29bb2..0000000000
--- a/libs/pbd3/AUTHORS
+++ /dev/null
diff --git a/libs/pbd3/COPYING b/libs/pbd3/COPYING
deleted file mode 100644
index d60c31a97a..0000000000
--- a/libs/pbd3/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/libs/pbd3/ChangeLog b/libs/pbd3/ChangeLog
deleted file mode 100644
index 59e92915ba..0000000000
--- a/libs/pbd3/ChangeLog
+++ /dev/null
@@ -1,10 +0,0 @@
-2005-12-02 Taybin Rutkin <taybin@earthlink.net>
- * libpbd now allocates warning, info, error, and fatal itself.
- * Incremented version to 3.1.
-
-2005-04-01 Taybin Rutkin <taybin@earthlink.net>
- * Updated to support sigc++-2.0.
- * Incremented version to 3.0.0.
-
-2004-08-04 Taybin Rutkin <taybin@earthlink.net>
- * Added support for gcc-3.4
diff --git a/libs/pbd3/NEWS b/libs/pbd3/NEWS
deleted file mode 100644
index e69de29bb2..0000000000
--- a/libs/pbd3/NEWS
+++ /dev/null
diff --git a/libs/pbd3/README b/libs/pbd3/README
deleted file mode 100644
index e69de29bb2..0000000000
--- a/libs/pbd3/README
+++ /dev/null
diff --git a/libs/pbd3/SConscript b/libs/pbd3/SConscript
deleted file mode 100644
index 2766b3c5ed..0000000000
--- a/libs/pbd3/SConscript
+++ /dev/null
@@ -1,65 +0,0 @@
-# -*- python -*-
-
-import os
-import os.path
-import glob
-
-Import('env libraries i18n install_prefix')
-
-pbd3 = env.Copy()
-
-domain = 'libpbd'
-
-pbd3.Append(DOMAIN=domain,MAJOR=4,MINOR=0,MICRO=0)
-pbd3.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
-pbd3.Append(CXXFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
-pbd3.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
-pbd3.Append(PACKAGE=domain)
-pbd3.Append(POTFILE=domain + '.pot')
-
-pbd3_files = Split("""
-basename.cc
-base_ui.cc
-convert.cc
-dmalloc.cc
-error.cc
-mountpoint.cc
-pathscanner.cc
-pool.cc
-pthread_utils.cc
-receiver.cc
-stacktrace.cc
-strsplit.cc
-textreceiver.cc
-transmitter.cc
-undo.cc
-version.cc
-whitespace.cc
-xml++.cc
-""")
-
-conf = Configure(pbd3)
-if conf.CheckFunc('getmntent'):
- conf.env.Append(CCFLAGS="-DHAVE_GETMNTENT")
-if conf.CheckCHeader('execinfo.h'):
- conf.env.Append(CXXFLAGS="-DHAVE_EXECINFO")
-pbd3 = conf.Finish()
-
-pbd3.Merge ([ libraries['sigc2'], libraries['xml'], libraries['glibmm2'], libraries['glib2'] ])
-
-pbd3.VersionBuild(['version.cc','pbd/version.h'], 'SConscript')
-
-libpbd3 = pbd3.SharedLibrary('pbd', pbd3_files)
-
-Default(libpbd3)
-
-if env['NLS']:
- i18n (pbd3, pbd3_files, env)
-
-env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), libpbd3))
-
-env.Alias('tarball', env.Distribute (env['DISTTREE'],
- [ 'SConscript', 'i18n.h', 'gettext.h', 'pbd/abstract_ui.cc' ] +
- pbd3_files +
- glob.glob('po/*.po') +
- glob.glob('pbd/*.h')))
diff --git a/libs/pbd3/base_ui.cc b/libs/pbd3/base_ui.cc
deleted file mode 100644
index d3c8d5e4c7..0000000000
--- a/libs/pbd3/base_ui.cc
+++ /dev/null
@@ -1,88 +0,0 @@
-#include <stdint.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include <pbd/base_ui.h>
-#include <pbd/error.h>
-#include <pbd/compose.h>
-#include <pbd/failed_constructor.h>
-
-#include "i18n.h"
-
-using namespace std;
-using namespace PBD;
-
-uint32_t BaseUI::rt_bit = 1;
-BaseUI::RequestType BaseUI::CallSlot = BaseUI::new_request_type();
-
-BaseUI::BaseUI (string str, bool with_signal_pipe)
- : _name (str)
-{
- /* odd pseudo-singleton semantics */
-
- base_ui_instance = this;
-
- signal_pipe[0] = -1;
- signal_pipe[1] = -1;
-
- if (with_signal_pipe) {
- if (setup_signal_pipe ()) {
- throw failed_constructor ();
- }
- }
-}
-
-BaseUI::~BaseUI()
-{
- if (signal_pipe[0] >= 0) {
- close (signal_pipe[0]);
- }
-
- if (signal_pipe[1] >= 0) {
- close (signal_pipe[1]);
- }
-}
-
-BaseUI::RequestType
-BaseUI::new_request_type ()
-{
- RequestType rt;
-
- /* XXX catch out-of-range */
-
- rt = RequestType (rt_bit);
- rt_bit <<= 1;
-
- return rt;
-}
-
-int
-BaseUI::setup_signal_pipe ()
-{
- /* setup the pipe that other threads send us notifications/requests
- through.
- */
-
- if (pipe (signal_pipe)) {
- error << string_compose (_("%1-UI: cannot create error signal pipe (%2)"), _name, std::strerror (errno))
- << endmsg;
-
- return -1;
- }
-
- if (fcntl (signal_pipe[0], F_SETFL, O_NONBLOCK)) {
- error << string_compose (_("%1-UI: cannot set O_NONBLOCK on signal read pipe (%2)"), _name, std::strerror (errno))
- << endmsg;
- return -1;
- }
-
- if (fcntl (signal_pipe[1], F_SETFL, O_NONBLOCK)) {
- error << string_compose (_("%1-UI: cannot set O_NONBLOCK on signal write pipe (%2)"), _name, std::strerror (errno))
- << endmsg;
- return -1;
- }
-
- return 0;
-}
-
diff --git a/libs/pbd3/basename.cc b/libs/pbd3/basename.cc
deleted file mode 100644
index a51e393b78..0000000000
--- a/libs/pbd3/basename.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <iostream>
-#include <string.h>
-#include <pbd/basename.h>
-
-
-// implement this using Glib::path_get_basename
-std::string
-PBD::basename_nosuffix (const std::string& str)
-{
- std::string::size_type slash = str.find_last_of ('/');
- std::string noslash;
-
- if (slash == std::string::npos) {
- noslash = str;
- } else {
- noslash = str.substr (slash+1);
- }
-
- return noslash.substr (0, noslash.find_last_of ('.'));
-}
diff --git a/libs/pbd3/convert.cc b/libs/pbd3/convert.cc
deleted file mode 100644
index 60d39c91e2..0000000000
--- a/libs/pbd3/convert.cc
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- Copyright (C) 2006 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#include <cmath>
-#include <stdint.h>
-
-#include "pbd/convert.h"
-
-#include "i18n.h"
-
-using std::string;
-using std::vector;
-
-namespace PBD {
-
-string
-short_version (string orig, string::size_type target_length)
-{
- /* this tries to create a recognizable abbreviation
- of "orig" by removing characters until we meet
- a certain target length.
-
- note that we deliberately leave digits in the result
- without modification.
- */
-
-
- string::size_type pos;
-
- /* remove white-space and punctuation, starting at end */
-
- while (orig.length() > target_length) {
- if ((pos = orig.find_last_of (_("\"\n\t ,<.>/?:;'[{}]~`!@#$%^&*()_-+="))) == string::npos) {
- break;
- }
- orig.replace (pos, 1, "");
- }
-
- /* remove lower-case vowels, starting at end */
-
- while (orig.length() > target_length) {
- if ((pos = orig.find_last_of (_("aeiou"))) == string::npos) {
- break;
- }
- orig.replace (pos, 1, "");
- }
-
- /* remove upper-case vowels, starting at end */
-
- while (orig.length() > target_length) {
- if ((pos = orig.find_last_of (_("AEIOU"))) == string::npos) {
- break;
- }
- orig.replace (pos, 1, "");
- }
-
- /* remove lower-case consonants, starting at end */
-
- while (orig.length() > target_length) {
- if ((pos = orig.find_last_of (_("bcdfghjklmnpqrtvwxyz"))) == string::npos) {
- break;
- }
- orig.replace (pos, 1, "");
- }
-
- /* remove upper-case consonants, starting at end */
-
- while (orig.length() > target_length) {
- if ((pos = orig.find_last_of (_("BCDFGHJKLMNPQRTVWXYZ"))) == string::npos) {
- break;
- }
- orig.replace (pos, 1, "");
- }
-
- /* whatever the length is now, use it */
-
- return orig;
-}
-
-int
-atoi (const string& s)
-{
- return std::atoi (s.c_str());
-}
-
-double
-atof (const string& s)
-{
- return std::atof (s.c_str());
-}
-
-vector<string>
-internationalize (const char **array)
-{
- vector<string> v;
-
- for (uint32_t i = 0; array[i]; ++i) {
- v.push_back (_(array[i]));
- }
-
- return v;
-}
-
-static int32_t
-int_from_hex (char hic, char loc)
-{
- int hi; /* hi byte */
- int lo; /* low byte */
-
- hi = (int) hic;
-
- if( ('0'<=hi) && (hi<='9') ) {
- hi -= '0';
- } else if( ('a'<= hi) && (hi<= 'f') ) {
- hi -= ('a'-10);
- } else if( ('A'<=hi) && (hi<='F') ) {
- hi -= ('A'-10);
- }
-
- lo = (int) loc;
-
- if( ('0'<=lo) && (lo<='9') ) {
- lo -= '0';
- } else if( ('a'<=lo) && (lo<='f') ) {
- lo -= ('a'-10);
- } else if( ('A'<=lo) && (lo<='F') ) {
- lo -= ('A'-10);
- }
-
- return lo + (16 * hi);
-}
-
-void
-url_decode (string& url)
-{
- string::iterator last;
- string::iterator next;
-
- for (string::iterator i = url.begin(); i != url.end(); ++i) {
- if ((*i) == '+') {
- *i = ' ';
- }
- }
-
- if (url.length() <= 3) {
- return;
- }
-
- last = url.end();
-
- --last; /* points at last char */
- --last; /* points at last char - 1 */
-
- for (string::iterator i = url.begin(); i != last; ) {
-
- if (*i == '%') {
-
- next = i;
-
- url.erase (i);
-
- i = next;
- ++next;
-
- if (isxdigit (*i) && isxdigit (*next)) {
- /* replace first digit with char */
- *i = int_from_hex (*i,*next);
- ++i; /* points at 2nd of 2 digits */
- url.erase (i);
- }
- } else {
- ++i;
- }
- }
-}
-
-string
-length2string (const int32_t frames, const float sample_rate)
-{
- int secs = (int) (frames / sample_rate);
- int hrs = secs / 3600;
- secs -= (hrs * 3600);
- int mins = secs / 60;
- secs -= (mins * 60);
-
- int total_secs = (hrs * 3600) + (mins * 60) + secs;
- int frames_remaining = (int) floor (frames - (total_secs * sample_rate));
- float fractional_secs = (float) frames_remaining / sample_rate;
-
- char duration_str[32];
- sprintf (duration_str, "%02d:%02d:%05.2f", hrs, mins, (float) secs + fractional_secs);
-
- return duration_str;
-}
-
-} // namespace PBD
diff --git a/libs/pbd3/dirname.cc b/libs/pbd3/dirname.cc
deleted file mode 100644
index 6b97ac7e3a..0000000000
--- a/libs/pbd3/dirname.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <cstdio>
-#include <cstdlib>
-#include <string>
-#include <pbd/dirname.h>
-
-
-char *
-PBD::dirname (const char *path)
-
-{
- char *slash;
- size_t len;
- char *ret;
-
- if ((slash = strrchr (path, '/')) == 0) {
- return strdup (path);
- }
-
- if (*(slash+1) == '\0') {
- return strdup ("");
- }
-
- len = (size_t) (slash - path);
- ret = (char *) malloc (sizeof (char) * (len + 1));
-
- snprintf (ret, len, "%*s", (int)len, path);
- return ret;
-}
-
-std::string
-PBD::dirname (const std::string str)
-{
- std::string::size_type slash = str.find_last_of ('/');
- std::string dir;
-
- if (slash == std::string::npos) {
- return str;
- }
-
- /* remove trailing multiple slashes (legal under POSIX) */
-
- dir = str.substr (0, slash);
- slash = dir.length();
-
- while (slash > 1 && dir[slash-1] == '/') {
- slash--;
- dir = dir.substr (0, slash);
- }
-
- return dir;
-}
diff --git a/libs/pbd3/dmalloc.cc b/libs/pbd3/dmalloc.cc
deleted file mode 100644
index 0e730946c8..0000000000
--- a/libs/pbd3/dmalloc.cc
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * file that facilitates C++ program debugging.
- *
- * Copyright 1995 by Gray Watson
- *
- * This file is part of the dmalloc package.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * NON-COMMERCIAL purpose and without fee is hereby granted, provided
- * that the above copyright notice and this permission notice appear
- * in all copies, and that the name of Gray Watson not be used in
- * advertising or publicity pertaining to distribution of the document
- * or software without specific, written prior permission.
- *
- * Please see the PERMISSIONS file or contact the author for information
- * about commercial licenses.
- *
- * Gray Watson makes no representations about the suitability of the
- * software described herein for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * The author may be contacted via http://www.letters.com/~gray/
- *
- * $Id$
- */
-
-/*
- * This file is used to effectively redirect new to the more familiar
- * malloc and delete to the more familiar free so they can be debugged
- * with the debug malloc library.. They also give the known error
- * behavior, too.
- *
- * Compile and link this in with the C++ program you want to debug.
- *
- * NOTE: I am not a C++ hacker so feedback in the form of other hints
- * and ideas for C++ users would be much appreciated.
- */
-
-#ifdef DEBUG_MALLOC
-
-extern "C" {
-#include <stdlib.h>
-#include <dmalloc.h>
-#include "/usr/local/src/dmalloc-4.1.2/return.h"
-}
-
-/*
- * An overload function for the C++ new.
- */
-void *
-operator new(size_t size)
-{
- char *file;
- GET_RET_ADDR(file);
-
- /* handle correct C++ semantics for an alloc of size 0 */
-
- if (size == 0) size = 1;
-
- return _malloc_leap(file, 0, size);
-}
-
-/*
- * An overload function for the C++ new[].
- */
-void *
-operator new[](size_t size)
-{
- char *file;
- GET_RET_ADDR(file);
-
- /* handle correct C++ semantics for an alloc of size 0 */
-
- if (size == 0) size = 1;
-
- return _malloc_leap(file, 0, size);
-}
-
-/*
- * An overload function for the C++ delete.
- */
-void
-operator delete(void *pnt)
-{
- char *file;
- GET_RET_ADDR(file);
- _free_leap(file, 0, pnt);
-}
-
-/*
- * An overload function for the C++ delete[]. Thanks to Jens Krinke
- * <j.krinke@gmx.de>
- */
-void
-operator delete[](void *pnt)
-{
- char *file;
- GET_RET_ADDR(file);
- _free_leap(file, 0, pnt);
-}
-
-#endif
diff --git a/libs/pbd3/error.cc b/libs/pbd3/error.cc
deleted file mode 100644
index a6f8fb7f8f..0000000000
--- a/libs/pbd3/error.cc
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <pbd/error.h>
-
-Transmitter PBD::error (Transmitter::Error);
-Transmitter PBD::info (Transmitter::Info);
-Transmitter PBD::fatal (Transmitter::Fatal);
-Transmitter PBD::warning (Transmitter::Warning);
-
diff --git a/libs/pbd3/gettext.h b/libs/pbd3/gettext.h
deleted file mode 100644
index 339c74ffe7..0000000000
--- a/libs/pbd3/gettext.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA. */
-
-#ifndef _LIBGETTEXT_H
-#define _LIBGETTEXT_H 1
-
-/* NLS can be disabled through the configure --disable-nls option. */
-#if ENABLE_NLS
-
-/* Get declarations of GNU message catalog functions. */
-# include <libintl.h>
-
-#else
-
-/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
- chokes if dcgettext is defined as a macro. So include it now, to make
- later inclusions of <locale.h> a NOP. We don't include <libintl.h>
- as well because people using "gettext.h" will not include <libintl.h>,
- and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
- is OK. */
-#if defined(__sun)
-# include <locale.h>
-#endif
-
-/* Disabled NLS.
- The casts to 'const char *' serve the purpose of producing warnings
- for invalid uses of the value returned from these functions.
- On pre-ANSI systems without 'const', the config.h file is supposed to
- contain "#define const". */
-
-/* other headers may have included libintl.h */
-
-# undef gettext
-# undef dgettext
-# undef dcgettext
-# undef ngettext
-# undef dngettext
-# undef dcngettext
-# undef textdomain
-# undef bindtextdomain
-# undef bind_textdomain_codeset
-
-# define gettext(Msgid) ((const char *) (Msgid))
-# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
-# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
-# define ngettext(Msgid1, Msgid2, N) \
- ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
-# define dngettext(Domainname, Msgid1, Msgid2, N) \
- ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
-# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
- ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
-# define textdomain(Domainname) ((const char *) (Domainname))
-# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
-# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
-
-#endif
-
-/* A pseudo function call that serves as a marker for the automated
- extraction of messages, but does not call gettext(). The run-time
- translation is done at a different place in the code.
- The argument, String, should be a literal string. Concatenated strings
- and other string expressions won't work.
- The macro's expansion is not parenthesized, so that it is suitable as
- initializer for static 'char[]' or 'const char[]' variables. */
-#define gettext_noop(String) String
-
-#endif /* _LIBGETTEXT_H */
diff --git a/libs/pbd3/i18n.h b/libs/pbd3/i18n.h
deleted file mode 100644
index 7c79d2eb53..0000000000
--- a/libs/pbd3/i18n.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef __i18n_h__
-#define __i18n_h__
-
-#include <pbd/compose.h>
-#include "gettext.h"
-
-#define _(Text) dgettext (PACKAGE, Text)
-#define N_(Text) gettext_noop (Text)
-#define X_(Text) (Text)
-
-#endif // __i18n_h__
diff --git a/libs/pbd3/libpbd.pc.in b/libs/pbd3/libpbd.pc.in
deleted file mode 100644
index 14d0208845..0000000000
--- a/libs/pbd3/libpbd.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@/pbd
-
-Name: libpbd
-Version: @VERSION@
-Description: libpbd, a library of useful, generic C++ objects
-Requires:
-Libs: -L${libdir} -lpbd @NON_PKG_LIBS@
-Cflags: -I${includedir} @NON_PKG_CFLAGS@
diff --git a/libs/pbd3/libpbd.spec.in b/libs/pbd3/libpbd.spec.in
deleted file mode 100644
index d50622d638..0000000000
--- a/libs/pbd3/libpbd.spec.in
+++ /dev/null
@@ -1,70 +0,0 @@
-Summary: A general purpose programming library
-%define lib_name pbd
-Name: lib%{lib_name}
-Version: @VERSION@
-Release: 2
-Copyright: GPL
-Source: .
-Url: http://www.quasimodo.org
-Vendor: Paul Davis <paul@linuxaudiosystems.com>
-Packager: jfm3 <jfm3@acm.org>
-Group: System Environment/Libraries
-Prefix: %{_prefix}
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-
-%description
-
-This library implements a number of programming utilities used by Paul
-Davis (formerly Paul Barton-Davis, hence the name). It is used in
-some of his Open Source software projects. See
-http://ardour.sf.net/ for examples.
-
-%prep
-%setup -q
-
-%build
-CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure $ARCH_FLAGS --prefix=%{prefix}
-make
-
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d -m 755 $RPM_BUILD_ROOT%{prefix}/{{include,lib}/%{lib_name}}
-make install INSTALL="%(which install) -p" prefix=$RPM_BUILD_ROOT%{prefix}
-
-%post
-/sbin/ldconfig
-
-%postun
-/sbin/ldconfig
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-,root,root)
-%doc README AUTHORS NEWS COPYING*
-%{prefix}/lib/libpbd.so*
-
-%package devel
-Summary: A general purpose programming library -- developer version.
-Group: System Environment/Libraries
-
-%description devel
-
-This library implements a number of programming utilities used by Paul
-Davis (formerly Paul Barton-Davis, hence the name). It is used in
-some of his Open Source software projects. See
-http://ardour.sf.net/ for examples.
-
-This package holds static libraries and headers needed by developers
-who wish to use libpbd in their programs.
-
-%files devel
-%defattr(-,root,root)
-%{prefix}/include/pbd/*
-%{prefix}/lib/libpbd.a
-%{prefix}/lib/libpbd.la
-%{prefix}/bin/pbd-config
-%{prefix}/share/aclocal/pbd.m4
-%{prefix}/share/aclocal/unique_args.m4
-
diff --git a/libs/pbd3/mountpoint.cc b/libs/pbd3/mountpoint.cc
deleted file mode 100644
index 160f5e921c..0000000000
--- a/libs/pbd3/mountpoint.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- Copyright (C) 2002 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#include <cstdio>
-#include <string>
-#include <limits.h>
-
-#include <pbd/mountpoint.h>
-
-using std::string;
-
-#if HAVE_GETMNTENT
-#include <mntent.h>
-
-struct mntent_sorter {
- bool operator() (const mntent *a, const mntent *b) {
- return strcmp (a->mnt_dir, b->mnt_dir);
- }
-};
-
-string
-mountpoint (string path)
-{
- FILE *mntf;
- mntent *mnt;
- unsigned int maxmatch = 0;
- unsigned int matchlen;
- const char *cpath = path.c_str();
- char best[PATH_MAX+1];
-
- if ((mntf = setmntent ("/etc/mtab", "r")) == 0) {
- return "";
- }
-
- best[0] = '\0';
-
- while ((mnt = getmntent (mntf))) {
- unsigned int n;
-
- n = 0;
- matchlen = 0;
-
- /* note: strcmp's semantics are not
- strict enough to use for this.
- */
-
- while (cpath[n] && mnt->mnt_dir[n]) {
- if (cpath[n] != mnt->mnt_dir[n]) {
- break;
- }
- matchlen++;
- n++;
- }
-
- if (cpath[matchlen] == '\0') {
-
- endmntent (mntf);
- return mnt->mnt_dir;
-
- } else {
-
- if (matchlen > maxmatch) {
- snprintf (best, sizeof(best), "%s", mnt->mnt_dir);
- maxmatch = matchlen;
- }
- }
- }
-
- endmntent (mntf);
-
- return best;
-}
-
-#else // no getmntent()
-
-#include <sys/param.h>
-#include <sys/ucred.h>
-#include <sys/mount.h>
-
-string
-mountpoint (string path)
-{
-//XXX IMPLEMENT ME using getmntinfo() or getfsstat().
- return "/";
-}
-#endif
-
-#ifdef TEST_MOUNTPOINT
-
-main (int argc, char *argv[])
-{
- printf ("mp of %s = %s\n", argv[1], mountpoint (argv[1]).c_str());
- exit (0);
-}
-
-#endif
diff --git a/libs/pbd3/pathscanner.cc b/libs/pbd3/pathscanner.cc
deleted file mode 100644
index 2af227a3a0..0000000000
--- a/libs/pbd3/pathscanner.cc
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#include <cstdlib>
-#include <cstdio>
-#include <vector>
-#include <dirent.h>
-
-#include <pbd/error.h>
-#include <pbd/pathscanner.h>
-#include <pbd/stl_delete.h>
-
-using namespace PBD;
-
-vector<string *> *
-PathScanner::operator() (const string &dirpath, const string &regexp,
- bool match_fullpath, bool return_fullpath,
- long limit)
-
-{
- int err;
- char msg[256];
-
- if ((err = regcomp (&compiled_pattern, regexp.c_str(),
- REG_EXTENDED|REG_NOSUB))) {
-
- regerror (err, &compiled_pattern,
- msg, sizeof (msg));
-
- error << "Cannot compile soundfile regexp for use ("
- << msg
- << ")"
- << endmsg;
-
- return 0;
- }
-
- return run_scan (dirpath, &PathScanner::regexp_filter,
- (bool (*)(const string &, void *)) 0,
- 0,
- match_fullpath,
- return_fullpath,
- limit);
-}
-
-vector<string *> *
-PathScanner::run_scan (const string &dirpath,
- bool (PathScanner::*memberfilter)(const string &),
- bool (*filter)(const string &, void *),
- void *arg,
- bool match_fullpath, bool return_fullpath,
- long limit)
-
-{
- vector<string *> *result = 0;
- DIR *dir;
- struct dirent *finfo;
- char *pathcopy = strdup (dirpath.c_str());
- char *thisdir;
- char fullpath[PATH_MAX+1];
- string search_str;
- string *newstr;
- long nfound = 0;
-
- if ((thisdir = strtok (pathcopy, ":")) == 0 ||
- strlen (thisdir) == 0) {
- free (pathcopy);
- return 0;
- }
-
- result = new vector<string *>;
-
- do {
-
- if ((dir = opendir (thisdir)) == 0) {
- continue;
- }
-
- while ((finfo = readdir (dir)) != 0) {
-
- snprintf (fullpath, sizeof(fullpath), "%s/%s",
- thisdir, finfo->d_name);
-
- if (match_fullpath) {
- search_str = fullpath;
- } else {
- search_str = finfo->d_name;
- }
-
- /* handle either type of function ptr */
-
- if (memberfilter) {
- if (!(this->*memberfilter)(search_str)) {
- continue;
- }
- } else {
- if (!filter(search_str, arg)) {
- continue;
- }
- }
-
- if (return_fullpath) {
- newstr = new string (fullpath);
- } else {
- newstr = new string (finfo->d_name);
- }
-
- result->push_back (newstr);
- nfound++;
- }
-
- closedir (dir);
-
- } while ((limit < 0 || (nfound < limit)) && (thisdir = strtok (0, ":")));
-
- free (pathcopy);
- return result;
-}
-
-string *
-PathScanner::find_first (const string &dirpath,
- const string &regexp,
- bool match_fullpath,
- bool return_fullpath)
-{
- vector<string *> *res;
- string *ret;
- int err;
- char msg[256];
-
- if ((err = regcomp (&compiled_pattern, regexp.c_str(),
- REG_EXTENDED|REG_NOSUB))) {
-
- regerror (err, &compiled_pattern,
- msg, sizeof (msg));
-
- error << "Cannot compile soundfile regexp for use (" << msg << ")" << endmsg;
-
-
- return 0;
- }
-
- res = run_scan (dirpath,
- &PathScanner::regexp_filter,
- (bool (*)(const string &, void *)) 0,
- 0,
- match_fullpath,
- return_fullpath,
- 1);
-
- if (res->size() == 0) {
- ret = 0;
- } else {
- ret = res->front();
- }
- vector_delete (res);
- delete res;
- return ret;
-}
-
-string *
-PathScanner::find_first (const string &dirpath,
- bool (*filter)(const string &, void *),
- void *arg,
- bool match_fullpath,
- bool return_fullpath)
-{
- vector<string *> *res;
- string *ret;
-
- res = run_scan (dirpath,
- (bool (PathScanner::*)(const string &)) 0,
- filter,
- 0,
- match_fullpath,
- return_fullpath, 1);
-
- if (res->size() == 0) {
- ret = 0;
- } else {
- ret = res->front();
- }
- vector_delete (res);
- delete res;
- return ret;
-}
diff --git a/libs/pbd3/pbd/.DS_Store b/libs/pbd3/pbd/.DS_Store
deleted file mode 100644
index 5008ddfcf5..0000000000
--- a/libs/pbd3/pbd/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/libs/pbd3/pbd/.cvsignore b/libs/pbd3/pbd/.cvsignore
deleted file mode 100644
index 67020331ba..0000000000
--- a/libs/pbd3/pbd/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-version.h
diff --git a/libs/pbd3/pbd/abstract_ui.cc b/libs/pbd3/pbd/abstract_ui.cc
deleted file mode 100644
index 0e34787a2d..0000000000
--- a/libs/pbd3/pbd/abstract_ui.cc
+++ /dev/null
@@ -1,149 +0,0 @@
-#include <unistd.h>
-
-#include <pbd/abstract_ui.h>
-#include <pbd/pthread_utils.h>
-#include <pbd/failed_constructor.h>
-
-template <typename RequestObject>
-AbstractUI<RequestObject>::AbstractUI (string name, bool with_signal_pipes)
- : BaseUI (name, with_signal_pipes)
-{
- if (pthread_key_create (&thread_request_buffer_key, 0)) {
- cerr << _("cannot create thread request buffer key") << endl;
- throw failed_constructor();
- }
-
- PBD::ThreadCreated.connect (mem_fun (*this, &AbstractUI<RequestObject>::register_thread));
- PBD::ThreadCreatedWithRequestSize.connect (mem_fun (*this, &AbstractUI<RequestObject>::register_thread_with_request_count));
-}
-
-template <typename RequestObject> void
-AbstractUI<RequestObject>::register_thread (pthread_t thread_id, string name)
-{
- register_thread_with_request_count (thread_id, name, 256);
-}
-
-template <typename RequestObject> void
-AbstractUI<RequestObject>::register_thread_with_request_count (pthread_t thread_id, string thread_name, uint32_t num_requests)
-{
- RequestBuffer* b = new RequestBuffer (num_requests);
-
- {
- Glib::Mutex::Lock lm (request_buffer_map_lock);
- request_buffers[thread_id] = b;
- }
-
- pthread_setspecific (thread_request_buffer_key, b);
-}
-
-template <typename RequestObject> RequestObject*
-AbstractUI<RequestObject>::get_request (RequestType rt)
-{
- RequestBuffer* rbuf = static_cast<RequestBuffer*>(pthread_getspecific (thread_request_buffer_key));
-
- if (rbuf == 0) {
- /* Cannot happen, but if it does we can't use the error reporting mechanism */
- cerr << _("programming error: ")
- << string_compose (X_("no %1-UI request buffer found for thread %2"), name(), pthread_name())
- << endl;
- abort ();
- }
-
- RequestBufferVector vec;
-
- rbuf->get_write_vector (&vec);
-
- if (vec.len[0] == 0) {
- if (vec.len[1] == 0) {
- cerr << string_compose (X_("no space in %1-UI request buffer for thread %2"), name(), pthread_name())
- << endl;
- return 0;
- } else {
- vec.buf[1]->type = rt;
- return vec.buf[1];
- }
- } else {
- vec.buf[0]->type = rt;
- return vec.buf[0];
- }
-}
-
-template <typename RequestObject> void
-AbstractUI<RequestObject>::handle_ui_requests ()
-{
- RequestBufferMapIterator i;
-
- request_buffer_map_lock.lock ();
-
- for (i = request_buffers.begin(); i != request_buffers.end(); ++i) {
-
- RequestBufferVector vec;
-
- while (true) {
-
- /* we must process requests 1 by 1 because
- the request may run a recursive main
- event loop that will itself call
- handle_ui_requests. when we return
- from the request handler, we cannot
- expect that the state of queued requests
- is even remotely consistent with
- the condition before we called it.
- */
-
- i->second->get_read_vector (&vec);
-
- if (vec.len[0] == 0) {
- break;
- } else {
- /* request_factory/copy constructor does a deep
- copy of the Request object,
- unlike Ringbuffer::read()
- */
-
- RequestObject req (*vec.buf[0]);
- i->second->increment_read_ptr (1);
- request_buffer_map_lock.unlock ();
- do_request (&req);
- request_buffer_map_lock.lock ();
- }
- }
- }
-
- request_buffer_map_lock.unlock ();
-}
-
-template <typename RequestObject> void
-AbstractUI<RequestObject>::send_request (RequestObject *req)
-{
- if (base_instance() == 0) {
- return; /* XXX is this the right thing to do ? */
- }
-
- if (caller_is_ui_thread()) {
- // cerr << "GUI thread sent request " << req << " type = " << req->type << endl;
- do_request (req);
- } else {
- RequestBuffer* rbuf = static_cast<RequestBuffer*> (pthread_getspecific (thread_request_buffer_key));
-
- if (rbuf == 0) {
- /* can't use the error system to report this, because this
- thread isn't registered!
- */
- cerr << _("programming error: ")
- << string_compose (X_("AbstractUI::send_request() called from %1, but no request buffer exists for that thread"), pthread_name())
- << endl;
- abort ();
- }
-
- // cerr << "thread " << pthread_self() << " sent request " << req << " type = " << req->type << endl;
-
- rbuf->increment_write_ptr (1);
-
- if (signal_pipe[1] >= 0) {
- const char c = 0;
- write (signal_pipe[1], &c, 1);
- }
- }
-}
-
diff --git a/libs/pbd3/pbd/abstract_ui.h b/libs/pbd3/pbd/abstract_ui.h
deleted file mode 100644
index f80db7bf1a..0000000000
--- a/libs/pbd3/pbd/abstract_ui.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __pbd_abstract_ui_h__
-#define __pbd_abstract_ui_h__
-
-#include <map>
-#include <string>
-#include <pthread.h>
-
-#include <sigc++/sigc++.h>
-
-#include <glibmm/thread.h>
-
-#include <pbd/receiver.h>
-#include <pbd/ringbufferNPT.h>
-#include <pbd/base_ui.h>
-
-class Touchable;
-
-template <class RequestObject>
-class AbstractUI : public BaseUI
-{
- public:
- AbstractUI (std::string name, bool with_signal_pipe);
- virtual ~AbstractUI() {}
-
- virtual bool caller_is_ui_thread() = 0;
-
- void call_slot (sigc::slot<void> el_slot) {
- RequestObject *req = get_request (BaseUI::CallSlot);
-
- if (req == 0) {
- return;
- }
-
- req->slot = el_slot;
- send_request (req);
- }
-
- void register_thread (pthread_t, std::string);
- void register_thread_with_request_count (pthread_t, std::string, uint32_t num_requests);
-
- protected:
- typedef RingBufferNPT<RequestObject> RequestBuffer;
- typedef typename RequestBuffer::rw_vector RequestBufferVector;
- typedef typename std::map<pthread_t,RequestBuffer*>::iterator RequestBufferMapIterator;
-
- Glib::Mutex request_buffer_map_lock;
- typedef std::map<pthread_t,RequestBuffer*> RequestBufferMap;
- RequestBufferMap request_buffers;
- pthread_key_t thread_request_buffer_key;
- RequestObject* get_request (RequestType);
- void handle_ui_requests ();
- void send_request (RequestObject *);
-
- virtual void do_request (RequestObject *) = 0;
-};
-
-#endif /* __pbd_abstract_ui_h__ */
-
-
diff --git a/libs/pbd3/pbd/atomic.h b/libs/pbd3/pbd/atomic.h
deleted file mode 100644
index 81e76f41fa..0000000000
--- a/libs/pbd3/pbd/atomic.h
+++ /dev/null
@@ -1,1232 +0,0 @@
-/*
- Copyright (C) 2001 Paul Davis and others (see below)
- Code derived from various headers from the Linux kernel.
- Copyright attributions maintained where present.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __libpbd_atomic_h__
-#define __libpbd_atomic_h__
-
-#ifdef HAVE_SMP /* a macro we control, to manage ... */
-#define CONFIG_SMP /* ... the macro the kernel headers use */
-#endif
-
-#if defined(__powerpc__) || defined(__ppc__)
-
-/*
- * BK Id: SCCS/s.atomic.h 1.15 10/28/01 10:37:22 trini
- */
-/*
- * PowerPC atomic operations
- */
-
-#ifndef _ASM_PPC_ATOMIC_H_
-#define _ASM_PPC_ATOMIC_H_
-
-typedef struct { volatile int counter; } atomic_t;
-
-
-#define ATOMIC_INIT(i) { (i) }
-
-#define atomic_read(v) ((v)->counter)
-#define atomic_set(v,i) (((v)->counter) = (i))
-
-extern void atomic_clear_mask(unsigned long mask, unsigned long *addr);
-extern void atomic_set_mask(unsigned long mask, unsigned long *addr);
-
-#ifdef CONFIG_SMP
-#define SMP_ISYNC "\n\tisync"
-#else
-#define SMP_ISYNC
-#endif
-
-static __inline__ void atomic_add(int a, atomic_t *v)
-{
- int t;
-
- __asm__ __volatile__(
-"1: lwarx %0,0,%3\n\
- add %0,%2,%0\n\
- stwcx. %0,0,%3\n\
- bne- 1b"
- : "=&r" (t), "=m" (v->counter)
- : "r" (a), "r" (&v->counter), "m" (v->counter)
- : "cc");
-}
-
-static __inline__ int atomic_add_return(int a, atomic_t *v)
-{
- int t;
-
- __asm__ __volatile__(
-"1: lwarx %0,0,%2\n\
- add %0,%1,%0\n\
- stwcx. %0,0,%2\n\
- bne- 1b"
- SMP_ISYNC
- : "=&r" (t)
- : "r" (a), "r" (&v->counter)
- : "cc", "memory");
-
- return t;
-}
-
-static __inline__ void atomic_sub(int a, atomic_t *v)
-{
- int t;
-
- __asm__ __volatile__(
-"1: lwarx %0,0,%3\n\
- subf %0,%2,%0\n\
- stwcx. %0,0,%3\n\
- bne- 1b"
- : "=&r" (t), "=m" (v->counter)
- : "r" (a), "r" (&v->counter), "m" (v->counter)
- : "cc");
-}
-
-static __inline__ int atomic_sub_return(int a, atomic_t *v)
-{
- int t;
-
- __asm__ __volatile__(
-"1: lwarx %0,0,%2\n\
- subf %0,%1,%0\n\
- stwcx. %0,0,%2\n\
- bne- 1b"
- SMP_ISYNC
- : "=&r" (t)
- : "r" (a), "r" (&v->counter)
- : "cc", "memory");
-
- return t;
-}
-
-static __inline__ void atomic_inc(atomic_t *v)
-{
- int t;
-
- __asm__ __volatile__(
-"1: lwarx %0,0,%2\n\
- addic %0,%0,1\n\
- stwcx. %0,0,%2\n\
- bne- 1b"
- : "=&r" (t), "=m" (v->counter)
- : "r" (&v->counter), "m" (v->counter)
- : "cc");
-}
-
-static __inline__ int atomic_inc_return(atomic_t *v)
-{
- int t;
-
- __asm__ __volatile__(
-"1: lwarx %0,0,%1\n\
- addic %0,%0,1\n\
- stwcx. %0,0,%1\n\
- bne- 1b"
- SMP_ISYNC
- : "=&r" (t)
- : "r" (&v->counter)
- : "cc", "memory");
-
- return t;
-}
-
-static __inline__ void atomic_dec(atomic_t *v)
-{
- int t;
-
- __asm__ __volatile__(
-"1: lwarx %0,0,%2\n\
- addic %0,%0,-1\n\
- stwcx. %0,0,%2\n\
- bne- 1b"
- : "=&r" (t), "=m" (v->counter)
- : "r" (&v->counter), "m" (v->counter)
- : "cc");
-}
-
-static __inline__ int atomic_dec_return(atomic_t *v)
-{
- int t;
-
- __asm__ __volatile__(
-"1: lwarx %0,0,%1\n\
- addic %0,%0,-1\n\
- stwcx. %0,0,%1\n\
- bne- 1b"
- SMP_ISYNC
- : "=&r" (t)
- : "r" (&v->counter)
- : "cc", "memory");
-
- return t;
-}
-
-#define atomic_sub_and_test(a, v) (atomic_sub_return((a), (v)) == 0)
-#define atomic_dec_and_test(v) (atomic_dec_return((v)) == 0)
-
-/*
- * Atomically test *v and decrement if it is greater than 0.
- * The function returns the old value of *v minus 1.
- */
-static __inline__ int atomic_dec_if_positive(atomic_t *v)
-{
- int t;
-
- __asm__ __volatile__(
-"1: lwarx %0,0,%1\n\
- addic. %0,%0,-1\n\
- blt- 2f\n\
- stwcx. %0,0,%1\n\
- bne- 1b"
- SMP_ISYNC
- "\n\
-2:" : "=&r" (t)
- : "r" (&v->counter)
- : "cc", "memory");
-
- return t;
-}
-
-#define smp_mb__before_atomic_dec() smp_mb()
-#define smp_mb__after_atomic_dec() smp_mb()
-#define smp_mb__before_atomic_inc() smp_mb()
-#define smp_mb__after_atomic_inc() smp_mb()
-
-#endif /* _ASM_PPC_ATOMIC_H_ */
-
-/***********************************************************************/
-
-# else /* !PPC */
-
-#if defined(__i386__) || defined(__x86_64__)
-
-#ifndef __ARCH_I386_ATOMIC__
-#define __ARCH_I386_ATOMIC__
-
-/*
- * Atomic operations that C can't guarantee us. Useful for
- * resource counting etc..
- */
-
-#ifdef CONFIG_SMP
-#define SMP_LOCK "lock ; "
-#else
-#define SMP_LOCK ""
-#endif
-
-/*
- * Make sure gcc doesn't try to be clever and move things around
- * on us. We need to use _exactly_ the address the user gave us,
- * not some alias that contains the same information.
- */
-typedef struct { volatile int counter; } atomic_t;
-
-#define ATOMIC_INIT(i) { (i) }
-
-/**
- * atomic_read - read atomic variable
- * @v: pointer of type atomic_t
- *
- * Atomically reads the value of @v. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-#define atomic_read(v) ((v)->counter)
-
-/**
- * atomic_set - set atomic variable
- * @v: pointer of type atomic_t
- * @i: required value
- *
- * Atomically sets the value of @v to @i. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-#define atomic_set(v,i) (((v)->counter) = (i))
-
-/**
- * atomic_add - add integer to atomic variable
- * @i: integer value to add
- * @v: pointer of type atomic_t
- *
- * Atomically adds @i to @v. Note that the guaranteed useful range
- * of an atomic_t is only 24 bits.
- */
-static __inline__ void atomic_add(int i, atomic_t *v)
-{
- __asm__ __volatile__(
- SMP_LOCK "addl %1,%0"
- :"=m" (v->counter)
- :"ir" (i), "m" (v->counter));
-}
-
-/**
- * atomic_sub - subtract the atomic variable
- * @i: integer value to subtract
- * @v: pointer of type atomic_t
- *
- * Atomically subtracts @i from @v. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-static __inline__ void atomic_sub(int i, atomic_t *v)
-{
- __asm__ __volatile__(
- SMP_LOCK "subl %1,%0"
- :"=m" (v->counter)
- :"ir" (i), "m" (v->counter));
-}
-
-/**
- * atomic_sub_and_test - subtract value from variable and test result
- * @i: integer value to subtract
- * @v: pointer of type atomic_t
- *
- * Atomically subtracts @i from @v and returns
- * true if the result is zero, or false for all
- * other cases. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-static __inline__ int atomic_sub_and_test(int i, atomic_t *v)
-{
- unsigned char c;
-
- __asm__ __volatile__(
- SMP_LOCK "subl %2,%0; sete %1"
- :"=m" (v->counter), "=qm" (c)
- :"ir" (i), "m" (v->counter) : "memory");
- return c;
-}
-
-/**
- * atomic_inc - increment atomic variable
- * @v: pointer of type atomic_t
- *
- * Atomically increments @v by 1. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-static __inline__ void atomic_inc(atomic_t *v)
-{
- __asm__ __volatile__(
- SMP_LOCK "incl %0"
- :"=m" (v->counter)
- :"m" (v->counter));
-}
-
-/**
- * atomic_dec - decrement atomic variable
- * @v: pointer of type atomic_t
- *
- * Atomically decrements @v by 1. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-static __inline__ void atomic_dec(atomic_t *v)
-{
- __asm__ __volatile__(
- SMP_LOCK "decl %0"
- :"=m" (v->counter)
- :"m" (v->counter));
-}
-
-/**
- * atomic_dec_and_test - decrement and test
- * @v: pointer of type atomic_t
- *
- * Atomically decrements @v by 1 and
- * returns true if the result is 0, or false for all other
- * cases. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-static __inline__ int atomic_dec_and_test(atomic_t *v)
-{
- unsigned char c;
-
- __asm__ __volatile__(
- SMP_LOCK "decl %0; sete %1"
- :"=m" (v->counter), "=qm" (c)
- :"m" (v->counter) : "memory");
- return c != 0;
-}
-
-/**
- * atomic_inc_and_test - increment and test
- * @v: pointer of type atomic_t
- *
- * Atomically increments @v by 1
- * and returns true if the result is zero, or false for all
- * other cases. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-static __inline__ int atomic_inc_and_test(atomic_t *v)
-{
- unsigned char c;
-
- __asm__ __volatile__(
- SMP_LOCK "incl %0; sete %1"
- :"=m" (v->counter), "=qm" (c)
- :"m" (v->counter) : "memory");
- return c != 0;
-}
-
-/**
- * atomic_add_negative - add and test if negative
- * @v: pointer of type atomic_t
- * @i: integer value to add
- *
- * Atomically adds @i to @v and returns true
- * if the result is negative, or false when
- * result is greater than or equal to zero. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-static __inline__ int atomic_add_negative(int i, atomic_t *v)
-{
- unsigned char c;
-
- __asm__ __volatile__(
- SMP_LOCK "addl %2,%0; sets %1"
- :"=m" (v->counter), "=qm" (c)
- :"ir" (i), "m" (v->counter) : "memory");
- return c;
-}
-
-/* These are x86-specific, used by some header files */
-#define atomic_clear_mask(mask, addr) \
-__asm__ __volatile__(SMP_LOCK "andl %0,%1" \
-: : "r" (~(mask)),"m" (*addr) : "memory")
-
-#define atomic_set_mask(mask, addr) \
-__asm__ __volatile__(SMP_LOCK "orl %0,%1" \
-: : "r" (mask),"m" (*addr) : "memory")
-
-/* Atomic operations are already serializing on x86 */
-#define smp_mb__before_atomic_dec() barrier()
-#define smp_mb__after_atomic_dec() barrier()
-#define smp_mb__before_atomic_inc() barrier()
-#define smp_mb__after_atomic_inc() barrier()
-
-#endif /* __ARCH_I386_ATOMIC__ */
-
-/***********************************************************************/
-
-#else /* !PPC && !i386 */
-
-#ifdef __sparc__
-
-/* atomic.h: These still suck, but the I-cache hit rate is higher.
- *
- * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
- * Copyright (C) 2000 Anton Blanchard (anton@linuxcare.com.au)
- */
-
-#ifndef __ARCH_SPARC_ATOMIC__
-#define __ARCH_SPARC_ATOMIC__
-
-typedef struct { volatile int counter; } atomic_t;
-
-#ifndef CONFIG_SMP
-
-#define ATOMIC_INIT(i) { (i) }
-#define atomic_read(v) ((v)->counter)
-#define atomic_set(v, i) (((v)->counter) = i)
-
-#else
-/* We do the bulk of the actual work out of line in two common
- * routines in assembler, see arch/sparc/lib/atomic.S for the
- * "fun" details.
- *
- * For SMP the trick is you embed the spin lock byte within
- * the word, use the low byte so signedness is easily retained
- * via a quick arithmetic shift. It looks like this:
- *
- * ----------------------------------------
- * | signed 24-bit counter value | lock | atomic_t
- * ----------------------------------------
- * 31 8 7 0
- */
-
-#define ATOMIC_INIT(i) { (i << 8) }
-
-static __inline__ int atomic_read(atomic_t *v)
-{
- int ret = v->counter;
-
- while(ret & 0xff)
- ret = v->counter;
-
- return ret >> 8;
-}
-
-#define atomic_set(v, i) (((v)->counter) = ((i) << 8))
-#endif
-
-static __inline__ int __atomic_add(int i, atomic_t *v)
-{
- register volatile int *ptr asm("g1");
- register int increment asm("g2");
-
- ptr = &v->counter;
- increment = i;
-
- __asm__ __volatile__(
- "mov %%o7, %%g4\n\t"
- "call ___atomic_add\n\t"
- " add %%o7, 8, %%o7\n"
- : "=&r" (increment)
- : "0" (increment), "r" (ptr)
- : "g3", "g4", "g7", "memory", "cc");
-
- return increment;
-}
-
-static __inline__ int __atomic_sub(int i, atomic_t *v)
-{
- register volatile int *ptr asm("g1");
- register int increment asm("g2");
-
- ptr = &v->counter;
- increment = i;
-
- __asm__ __volatile__(
- "mov %%o7, %%g4\n\t"
- "call ___atomic_sub\n\t"
- " add %%o7, 8, %%o7\n"
- : "=&r" (increment)
- : "0" (increment), "r" (ptr)
- : "g3", "g4", "g7", "memory", "cc");
-
- return increment;
-}
-
-#define atomic_add(i, v) ((void)__atomic_add((i), (v)))
-#define atomic_sub(i, v) ((void)__atomic_sub((i), (v)))
-
-#define atomic_dec_return(v) __atomic_sub(1, (v))
-#define atomic_inc_return(v) __atomic_add(1, (v))
-
-#define atomic_sub_and_test(i, v) (__atomic_sub((i), (v)) == 0)
-#define atomic_dec_and_test(v) (__atomic_sub(1, (v)) == 0)
-
-#define atomic_inc(v) ((void)__atomic_add(1, (v)))
-#define atomic_dec(v) ((void)__atomic_sub(1, (v)))
-
-#define atomic_add_negative(i, v) (__atomic_add((i), (v)) < 0)
-
-/* Atomic operations are already serializing */
-#define smp_mb__before_atomic_dec() barrier()
-#define smp_mb__after_atomic_dec() barrier()
-#define smp_mb__before_atomic_inc() barrier()
-#define smp_mb__after_atomic_inc() barrier()
-
-
-#endif /* !(__ARCH_SPARC_ATOMIC__) */
-
-/***********************************************************************/
-
-#else
-
-#ifdef __ia64__
-
-#ifndef __ARCH_IA64_ATOMIC__
-#define __ARCH_IA64_ATOMIC__
-
-typedef volatile int atomic_t;
-
-inline
-int
-atomic_read (const atomic_t * a)
-{
- return *a;
-}
-
-inline
-void
-atomic_set(atomic_t *a, int v)
-{
- *a = v;
-}
-
-inline
-void
-atomic_inc (atomic_t *v)
-{
- int old, r;
-
- do {
- old = atomic_read(v);
- __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO" (old));
- __asm__ __volatile__ ("cmpxchg4.acq %0=[%1],%2,ar.ccv"
- : "=r"(r) : "r"(v), "r"(old + 1)
- : "memory");
- } while (r != old);
-}
-
-inline
-void
-atomic_dec (atomic_t *v)
-{
- int old, r;
-
- do {
- old = atomic_read(v);
- __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO" (old));
- __asm__ __volatile__ ("cmpxchg4.acq %0=[%1],%2,ar.ccv"
- : "=r"(r) : "r"(v), "r"(old - 1)
- : "memory");
- } while (r != old);
-}
-
-inline
-int
-atomic_dec_and_test (atomic_t *v)
-{
- int old, r;
-
- do {
- old = atomic_read(v);
- __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO" (old));
- __asm__ __volatile__ ("cmpxchg4.acq %0=[%1],%2,ar.ccv"
- : "=r"(r) : "r"(v), "r"(old - 1)
- : "memory");
- } while (r != old);
- return old != 1;
-}
-
-#endif /* !(__ARCH_IA64_ATOMIC__) */
-
-#else
-
-#ifdef __alpha__
-
-#ifndef _ALPHA_ATOMIC_H
-#define _ALPHA_ATOMIC_H
-
-/*
- * Atomic operations that C can't guarantee us. Useful for
- * resource counting etc...
- *
- * But use these as seldom as possible since they are much slower
- * than regular operations.
- */
-
-
-/*
- * Counter is volatile to make sure gcc doesn't try to be clever
- * and move things around on us. We need to use _exactly_ the address
- * the user gave us, not some alias that contains the same information.
- */
-typedef struct { volatile int counter; } atomic_t;
-
-#define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
-
-#define atomic_read(v) ((v)->counter)
-#define atomic_set(v,i) ((v)->counter = (i))
-
-/*
- * To get proper branch prediction for the main line, we must branch
- * forward to code at the end of this object's .text section, then
- * branch back to restart the operation.
- */
-
-static __inline__ void atomic_add(int i, atomic_t * v)
-{
- unsigned long temp;
- __asm__ __volatile__(
- "1: ldl_l %0,%1\n"
- " addl %0,%2,%0\n"
- " stl_c %0,%1\n"
- " beq %0,2f\n"
- ".subsection 2\n"
- "2: br 1b\n"
- ".previous"
- :"=&r" (temp), "=m" (v->counter)
- :"Ir" (i), "m" (v->counter));
-}
-
-static __inline__ void atomic_sub(int i, atomic_t * v)
-{
- unsigned long temp;
- __asm__ __volatile__(
- "1: ldl_l %0,%1\n"
- " subl %0,%2,%0\n"
- " stl_c %0,%1\n"
- " beq %0,2f\n"
- ".subsection 2\n"
- "2: br 1b\n"
- ".previous"
- :"=&r" (temp), "=m" (v->counter)
- :"Ir" (i), "m" (v->counter));
-}
-
-/*
- * Same as above, but return the result value
- */
-static __inline__ long atomic_add_return(int i, atomic_t * v)
-{
- long temp, result;
- __asm__ __volatile__(
- "1: ldl_l %0,%1\n"
- " addl %0,%3,%2\n"
- " addl %0,%3,%0\n"
- " stl_c %0,%1\n"
- " beq %0,2f\n"
- " mb\n"
- ".subsection 2\n"
- "2: br 1b\n"
- ".previous"
- :"=&r" (temp), "=m" (v->counter), "=&r" (result)
- :"Ir" (i), "m" (v->counter) : "memory");
- return result;
-}
-
-static __inline__ long atomic_sub_return(int i, atomic_t * v)
-{
- long temp, result;
- __asm__ __volatile__(
- "1: ldl_l %0,%1\n"
- " subl %0,%3,%2\n"
- " subl %0,%3,%0\n"
- " stl_c %0,%1\n"
- " beq %0,2f\n"
- " mb\n"
- ".subsection 2\n"
- "2: br 1b\n"
- ".previous"
- :"=&r" (temp), "=m" (v->counter), "=&r" (result)
- :"Ir" (i), "m" (v->counter) : "memory");
- return result;
-}
-
-#define atomic_dec_return(v) atomic_sub_return(1,(v))
-#define atomic_inc_return(v) atomic_add_return(1,(v))
-
-#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
-#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
-
-#define atomic_inc(v) atomic_add(1,(v))
-#define atomic_dec(v) atomic_sub(1,(v))
-
-#define smp_mb__before_atomic_dec() smp_mb()
-#define smp_mb__after_atomic_dec() smp_mb()
-#define smp_mb__before_atomic_inc() smp_mb()
-#define smp_mb__after_atomic_inc() smp_mb()
-
-#endif /* _ALPHA_ATOMIC_H */
-
-#else
-
-#ifdef __s390__
-
-#ifndef __ARCH_S390_ATOMIC__
-#define __ARCH_S390_ATOMIC__
-
-/*
- * include/asm-s390/atomic.h
- *
- * S390 version
- * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
- * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
- * Denis Joseph Barrow
- *
- * Derived from "include/asm-i386/bitops.h"
- * Copyright (C) 1992, Linus Torvalds
- *
- */
-
-/*
- * Atomic operations that C can't guarantee us. Useful for
- * resource counting etc..
- * S390 uses 'Compare And Swap' for atomicity in SMP enviroment
- */
-
-typedef struct { volatile int counter; } __attribute__ ((aligned (4))) atomic_t;
-#define ATOMIC_INIT(i) { (i) }
-
-#define atomic_eieio() __asm__ __volatile__ ("BCR 15,0")
-
-#define __CS_LOOP(old_val, new_val, ptr, op_val, op_string) \
- __asm__ __volatile__(" l %0,0(%2)\n" \
- "0: lr %1,%0\n" \
- op_string " %1,%3\n" \
- " cs %0,%1,0(%2)\n" \
- " jl 0b" \
- : "=&d" (old_val), "=&d" (new_val) \
- : "a" (ptr), "d" (op_val) : "cc" );
-
-#define atomic_read(v) ((v)->counter)
-#define atomic_set(v,i) (((v)->counter) = (i))
-
-static __inline__ void atomic_add(int i, atomic_t *v)
-{
- int old_val, new_val;
- __CS_LOOP(old_val, new_val, v, i, "ar");
-}
-
-static __inline__ int atomic_add_return (int i, atomic_t *v)
-{
- int old_val, new_val;
- __CS_LOOP(old_val, new_val, v, i, "ar");
- return new_val;
-}
-
-static __inline__ int atomic_add_negative(int i, atomic_t *v)
-{
- int old_val, new_val;
- __CS_LOOP(old_val, new_val, v, i, "ar");
- return new_val < 0;
-}
-
-static __inline__ void atomic_sub(int i, atomic_t *v)
-{
- int old_val, new_val;
- __CS_LOOP(old_val, new_val, v, i, "sr");
-}
-
-static __inline__ void atomic_inc(volatile atomic_t *v)
-{
- int old_val, new_val;
- __CS_LOOP(old_val, new_val, v, 1, "ar");
-}
-
-static __inline__ int atomic_inc_return(volatile atomic_t *v)
-{
- int old_val, new_val;
- __CS_LOOP(old_val, new_val, v, 1, "ar");
- return new_val;
-}
-
-static __inline__ int atomic_inc_and_test(volatile atomic_t *v)
-{
- int old_val, new_val;
- __CS_LOOP(old_val, new_val, v, 1, "ar");
- return new_val != 0;
-}
-
-static __inline__ void atomic_dec(volatile atomic_t *v)
-{
- int old_val, new_val;
- __CS_LOOP(old_val, new_val, v, 1, "sr");
-}
-
-static __inline__ int atomic_dec_return(volatile atomic_t *v)
-{
- int old_val, new_val;
- __CS_LOOP(old_val, new_val, v, 1, "sr");
- return new_val;
-}
-
-static __inline__ int atomic_dec_and_test(volatile atomic_t *v)
-{
- int old_val, new_val;
- __CS_LOOP(old_val, new_val, v, 1, "sr");
- return new_val == 0;
-}
-
-static __inline__ void atomic_clear_mask(unsigned long mask, atomic_t *v)
-{
- int old_val, new_val;
- __CS_LOOP(old_val, new_val, v, ~mask, "nr");
-}
-
-static __inline__ void atomic_set_mask(unsigned long mask, atomic_t *v)
-{
- int old_val, new_val;
- __CS_LOOP(old_val, new_val, v, mask, "or");
-}
-
-/*
- returns 0 if expected_oldval==value in *v ( swap was successful )
- returns 1 if unsuccessful.
-*/
-static __inline__ int
-atomic_compare_and_swap(int expected_oldval,int new_val,atomic_t *v)
-{
- int retval;
-
- __asm__ __volatile__(
- " lr 0,%2\n"
- " cs 0,%3,0(%1)\n"
- " ipm %0\n"
- " srl %0,28\n"
- "0:"
- : "=&d" (retval)
- : "a" (v), "d" (expected_oldval) , "d" (new_val)
- : "0", "cc");
- return retval;
-}
-
-/*
- Spin till *v = expected_oldval then swap with newval.
- */
-static __inline__ void
-atomic_compare_and_swap_spin(int expected_oldval,int new_val,atomic_t *v)
-{
- __asm__ __volatile__(
- "0: lr 0,%1\n"
- " cs 0,%2,0(%0)\n"
- " jl 0b\n"
- : : "a" (v), "d" (expected_oldval) , "d" (new_val)
- : "cc", "0" );
-}
-
-#define smp_mb__before_atomic_dec() smp_mb()
-#define smp_mb__after_atomic_dec() smp_mb()
-#define smp_mb__before_atomic_inc() smp_mb()
-#define smp_mb__after_atomic_inc() smp_mb()
-
-#endif /* __ARCH_S390_ATOMIC __ */
-
-#else
-
-#ifdef __mips__
-
-/*
- * Atomic operations that C can't guarantee us. Useful for
- * resource counting etc..
- *
- * But use these as seldom as possible since they are much more slower
- * than regular operations.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1996, 1997, 2000 by Ralf Baechle
- */
-#ifndef __ASM_ATOMIC_H
-#define __ASM_ATOMIC_H
-
-typedef struct { volatile int counter; } atomic_t;
-
-#define ATOMIC_INIT(i) { (i) }
-
-/*
- * atomic_read - read atomic variable
- * @v: pointer of type atomic_t
- *
- * Atomically reads the value of @v. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-#define atomic_read(v) ((v)->counter)
-
-/*
- * atomic_set - set atomic variable
- * @v: pointer of type atomic_t
- * @i: required value
- *
- * Atomically sets the value of @v to @i. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-#define atomic_set(v,i) ((v)->counter = (i))
-
-/*
- * ... while for MIPS II and better we can use ll/sc instruction. This
- * implementation is SMP safe ...
- */
-
-/*
- * atomic_add - add integer to atomic variable
- * @i: integer value to add
- * @v: pointer of type atomic_t
- *
- * Atomically adds @i to @v. Note that the guaranteed useful range
- * of an atomic_t is only 24 bits.
- */
-extern __inline__ void atomic_add(int i, atomic_t * v)
-{
- unsigned long temp;
-
- __asm__ __volatile__(
- ".set push # atomic_add\n"
- ".set mips2 \n"
- "1: ll %0, %1 \n"
- " addu %0, %2 \n"
- " sc %0, %1 \n"
- " beqz %0, 1b \n"
- ".set pop \n"
- : "=&r" (temp), "=m" (v->counter)
- : "Ir" (i), "m" (v->counter));
-}
-
-/*
- * atomic_sub - subtract the atomic variable
- * @i: integer value to subtract
- * @v: pointer of type atomic_t
- *
- * Atomically subtracts @i from @v. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-extern __inline__ void atomic_sub(int i, atomic_t * v)
-{
- unsigned long temp;
-
- __asm__ __volatile__(
- ".set push # atomic_sub\n"
- ".set mips2 \n"
- "1: ll %0, %1 \n"
- " subu %0, %2 \n"
- " sc %0, %1 \n"
- " beqz %0, 1b \n"
- ".set pop \n"
- : "=&r" (temp), "=m" (v->counter)
- : "Ir" (i), "m" (v->counter));
-}
-
-/*
- * Same as above, but return the result value
- */
-extern __inline__ int atomic_add_return(int i, atomic_t * v)
-{
- unsigned long temp, result;
-
- __asm__ __volatile__(
- ".set push # atomic_add_return\n"
- ".set mips2 \n"
- ".set noreorder \n"
- "1: ll %1, %2 \n"
- " addu %0, %1, %3 \n"
- " sc %0, %2 \n"
- " beqz %0, 1b \n"
- " addu %0, %1, %3 \n"
- " sync \n"
- ".set pop \n"
- : "=&r" (result), "=&r" (temp), "=m" (v->counter)
- : "Ir" (i), "m" (v->counter)
- : "memory");
-
- return result;
-}
-
-extern __inline__ int atomic_sub_return(int i, atomic_t * v)
-{
- unsigned long temp, result;
-
- __asm__ __volatile__(
- ".set push # atomic_sub_return\n"
- ".set mips2 \n"
- ".set noreorder \n"
- "1: ll %1, %2 \n"
- " subu %0, %1, %3 \n"
- " sc %0, %2 \n"
- " beqz %0, 1b \n"
- " subu %0, %1, %3 \n"
- " sync \n"
- ".set pop \n"
- : "=&r" (result), "=&r" (temp), "=m" (v->counter)
- : "Ir" (i), "m" (v->counter)
- : "memory");
-
- return result;
-}
-
-#define atomic_dec_return(v) atomic_sub_return(1,(v))
-#define atomic_inc_return(v) atomic_add_return(1,(v))
-
-/*
- * atomic_sub_and_test - subtract value from variable and test result
- * @i: integer value to subtract
- * @v: pointer of type atomic_t
- *
- * Atomically subtracts @i from @v and returns
- * true if the result is zero, or false for all
- * other cases. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
-
-/*
- * atomic_inc_and_test - increment and test
- * @v: pointer of type atomic_t
- *
- * Atomically increments @v by 1
- * and returns true if the result is zero, or false for all
- * other cases. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-#define atomic_inc_and_test(v) (atomic_inc_return(1, (v)) == 0)
-
-/*
- * atomic_dec_and_test - decrement by 1 and test
- * @v: pointer of type atomic_t
- *
- * Atomically decrements @v by 1 and
- * returns true if the result is 0, or false for all other
- * cases. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
-
-/*
- * atomic_inc - increment atomic variable
- * @v: pointer of type atomic_t
- *
- * Atomically increments @v by 1. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-#define atomic_inc(v) atomic_add(1,(v))
-
-/*
- * atomic_dec - decrement and test
- * @v: pointer of type atomic_t
- *
- * Atomically decrements @v by 1. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-#define atomic_dec(v) atomic_sub(1,(v))
-
-/*
- * atomic_add_negative - add and test if negative
- * @v: pointer of type atomic_t
- * @i: integer value to add
- *
- * Atomically adds @i to @v and returns true
- * if the result is negative, or false when
- * result is greater than or equal to zero. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- *
- * Currently not implemented for MIPS.
- */
-
-/* Atomic operations are already serializing */
-#define smp_mb__before_atomic_dec() smp_mb()
-#define smp_mb__after_atomic_dec() smp_mb()
-#define smp_mb__before_atomic_inc() smp_mb()
-#define smp_mb__after_atomic_inc() smp_mb()
-
-#endif /* __ASM_ATOMIC_H */
-
-#else
-
-#if defined(__m68k__)
-
-#ifndef __ARCH_M68K_ATOMIC__
-#define __ARCH_M68K_ATOMIC__
-
-/*
- * Atomic operations that C can't guarantee us. Useful for
- * resource counting etc..
- */
-
-/*
- * We do not have SMP m68k systems, so we don't have to deal with that.
- */
-
-typedef struct { int counter; } atomic_t;
-#define ATOMIC_INIT(i) { (i) }
-
-#define atomic_read(v) ((v)->counter)
-#define atomic_set(v, i) (((v)->counter) = i)
-
-static __inline__ void atomic_add(int i, atomic_t *v)
-{
- __asm__ __volatile__("addl %1,%0" : "=m" (*v) : "id" (i), "0" (*v));
-}
-
-static __inline__ void atomic_sub(int i, atomic_t *v)
-{
- __asm__ __volatile__("subl %1,%0" : "=m" (*v) : "id" (i), "0" (*v));
-}
-
-static __inline__ void atomic_inc(volatile atomic_t *v)
-{
- __asm__ __volatile__("addql #1,%0" : "=m" (*v): "0" (*v));
-}
-
-static __inline__ void atomic_dec(volatile atomic_t *v)
-{
- __asm__ __volatile__("subql #1,%0" : "=m" (*v): "0" (*v));
-}
-
-static __inline__ int atomic_dec_and_test(volatile atomic_t *v)
-{
- char c;
- __asm__ __volatile__("subql #1,%1; seq %0" : "=d" (c), "=m" (*v): "1" (*v));
- return c != 0;
-}
-
-#define atomic_clear_mask(mask, v) \
- __asm__ __volatile__("andl %1,%0" : "=m" (*v) : "id" (~(mask)),"0"(*v))
-
-#define atomic_set_mask(mask, v) \
- __asm__ __volatile__("orl %1,%0" : "=m" (*v) : "id" (mask),"0"(*v))
-
-/* Atomic operations are already serializing */
-#define smp_mb__before_atomic_dec() barrier()
-#define smp_mb__after_atomic_dec() barrier()
-#define smp_mb__before_atomic_inc() barrier()
-#define smp_mb__after_atomic_inc() barrier()
-
-#endif /* __ARCH_M68K_ATOMIC __ */
-
-#else
-
-#warning libs/pbd has no implementation of strictly atomic operations for your hardware.
-
-#define __NO_STRICT_ATOMIC
-#ifdef __NO_STRICT_ATOMIC
-
-/*
- * Because the implementations from the kernel (where all these come
- * from) use cli and spinlocks for hppa and arm...
- */
-
-typedef struct { volatile int counter; } atomic_t;
-
-#define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
-
-#define atomic_read(v) ((v)->counter)
-#define atomic_set(v,i) ((v)->counter = (i))
-
-static __inline__ void atomic_inc(atomic_t *v)
-{
- v->counter++;
-}
-
-static __inline__ void atomic_dec(atomic_t *v)
-{
- v->counter--;
-}
-
-static __inline__ int atomic_dec_and_test(atomic_t *v)
-{
- int res;
- v->counter--;
- res = v->counter;
- return res == 0;
-}
-
-static __inline__ int atomic_inc_and_test(atomic_t *v)
-{
- int res;
- v->counter++;
- res = v->counter;
- return res == 0;
-}
-
-# endif /* __NO_STRICT_ATOMIC */
-# endif /* m68k */
-# endif /* mips */
-# endif /* s390 */
-# endif /* alpha */
-# endif /* ia64 */
-# endif /* sparc */
-# endif /* i386 */
-# endif /* ppc */
-
-#endif /* __libpbd_atomic_h__ */
-
diff --git a/libs/pbd3/pbd/base_ui.h b/libs/pbd3/pbd/base_ui.h
deleted file mode 100644
index b4570f8707..0000000000
--- a/libs/pbd3/pbd/base_ui.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef __pbd_base_ui_h__
-#define __pbd_base_ui_h__
-
-#include <string>
-#include <stdint.h>
-
-#include <sigc++/slot.h>
-#include <sigc++/trackable.h>
-
-class BaseUI : virtual public sigc::trackable {
- public:
- BaseUI (std::string name, bool with_signal_pipes);
- virtual ~BaseUI();
-
- BaseUI* base_instance() { return base_ui_instance; }
-
- std::string name() const { return _name; }
-
- bool ok() const { return _ok; }
-
- enum RequestType {
- range_guarantee = ~0
- };
-
- struct BaseRequestObject {
- RequestType type;
- sigc::slot<void> the_slot;
- };
-
- static RequestType new_request_type();
- static RequestType CallSlot;
-
- protected:
- int signal_pipe[2];
- bool _ok;
-
- private:
- std::string _name;
- BaseUI* base_ui_instance;
-
- static uint32_t rt_bit;
-
- int setup_signal_pipe ();
-};
-
-#endif /* __pbd_base_ui_h__ */
diff --git a/libs/pbd3/pbd/basename.h b/libs/pbd3/pbd/basename.h
deleted file mode 100644
index 35aebe166c..0000000000
--- a/libs/pbd3/pbd/basename.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __stupid_basename_h__
-#define __stupid_basename_h__
-
-#include <string>
-
-namespace PBD
-{
-
-extern std::string basename_nosuffix (const std::string&);
-
-};
-
-#endif // __stupid_basename_h__
diff --git a/libs/pbd3/pbd/compose.h b/libs/pbd3/pbd/compose.h
deleted file mode 100644
index 0df9519aaf..0000000000
--- a/libs/pbd3/pbd/compose.h
+++ /dev/null
@@ -1,393 +0,0 @@
-/* Defines String::compose(fmt, arg...) for easy, i18n-friendly
- * composition of strings.
- *
- * Version 1.0.
- *
- * Copyright (c) 2002 Ole Laursen <olau@hardworking.dk>.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA.
- */
-
-//
-// Basic usage is like
-//
-// std::cout << String::compose("This is a %1x%2 matrix.", rows, cols);
-//
-// See http://www.cs.auc.dk/~olau/compose/ or the included README.compose for
-// more details.
-//
-
-#ifndef STRING_COMPOSE_H
-#define STRING_COMPOSE_H
-
-#include <sstream>
-#include <string>
-#include <list>
-#include <map> // for multimap
-
-namespace StringPrivate
-{
- // the actual composition class - using string::compose is cleaner, so we
- // hide it here
- class Composition
- {
- public:
- // initialize and prepare format string on the form "text %1 text %2 etc."
- explicit Composition(std::string fmt);
-
- // supply an replacement argument starting from %1
- template <typename T>
- Composition &arg(const T &obj);
-
- // compose and return string
- std::string str() const;
-
- private:
- std::ostringstream os;
- int arg_no;
-
- // 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
- // the list instead of into a string where they're possibly invalidated on
- // inserting a specification string
- typedef std::list<std::string> output_list;
- output_list output;
-
- // the initial parse of the format string fills in the specification map
- // with positions for each of the various %?s
- typedef std::multimap<int, output_list::iterator> specification_map;
- specification_map specs;
- };
-
- // helper for converting spec string numbers
- inline int char_to_int(char c)
- {
- switch (c) {
- case '0': return 0;
- case '1': return 1;
- case '2': return 2;
- case '3': return 3;
- case '4': return 4;
- case '5': return 5;
- case '6': return 6;
- case '7': return 7;
- case '8': return 8;
- case '9': return 9;
- 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(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)
-//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>
- inline std::string string_compose(const std::string &fmt,
- const T1 &o1, const T2 &o2)
- {
- StringPrivate::Composition c(fmt);
- c.arg(o1).arg(o2);
- return c.str();
- }
-
- template <typename T1, typename T2, typename T3>
- inline std::string string_compose(const std::string &fmt,
- const T1 &o1, const T2 &o2, const T3 &o3)
- {
- StringPrivate::Composition c(fmt);
- c.arg(o1).arg(o2).arg(o3);
- return c.str();
- }
-
- template <typename T1, typename T2, typename T3, typename T4>
- inline std::string string_compose(const std::string &fmt,
- const T1 &o1, const T2 &o2, const T3 &o3,
- const T4 &o4)
- {
- StringPrivate::Composition c(fmt);
- c.arg(o1).arg(o2).arg(o3).arg(o4);
- return c.str();
- }
-
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
- inline std::string string_compose(const std::string &fmt,
- const T1 &o1, const T2 &o2, const T3 &o3,
- const T4 &o4, const T5 &o5)
- {
- StringPrivate::Composition c(fmt);
- c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5);
- return c.str();
- }
-
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
- 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)
- {
- StringPrivate::Composition c(fmt);
- c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6);
- return c.str();
- }
-
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
- 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)
- {
- StringPrivate::Composition c(fmt);
- c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7);
- return c.str();
- }
-
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
- 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)
- {
- StringPrivate::Composition c(fmt);
- c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8);
- return c.str();
- }
-
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
- 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)
- {
- StringPrivate::Composition c(fmt);
- c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9);
- return c.str();
- }
-
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
- 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)
- {
- 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);
- 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>
- 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)
- {
- 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);
- 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>
- 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)
- {
- 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);
- 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>
- 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)
- {
- 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);
- 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>
- 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)
- {
- 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);
- 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
diff --git a/libs/pbd3/pbd/convert.h b/libs/pbd3/pbd/convert.h
deleted file mode 100644
index 12e63ba6fc..0000000000
--- a/libs/pbd3/pbd/convert.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- Copyright (C) 2002 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#ifndef __pbd_convert_h__
-#define __pbd_convert_h__
-
-#include <string>
-#include <vector>
-
-namespace PBD {
-
-std::string short_version (std::string, std::string::size_type target_length);
-
-int atoi (const std::string&);
-double atof (const std::string&);
-void url_decode (std::string&);
-
-std::string length2string (const int32_t frames, const float sample_rate);
-
-std::vector<std::string> internationalize (const char **);
-
-} //namespace PBD
-
-#endif /* __pbd_convert_h__ */
diff --git a/libs/pbd3/pbd/datum.h b/libs/pbd3/pbd/datum.h
deleted file mode 100644
index 1f2704b429..0000000000
--- a/libs/pbd3/pbd/datum.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __qm_datum_h__
-#define __qm_datum_h__
-
-/* A basic data type used whenever we want to represent
- something that might be a string or a number.
-*/
-
-struct Datum {
- enum Type {
- String,
- Numeric,
- };
- Type type;
- union {
- const char *str;
- float n;
- };
-
- Datum &operator=(float val) {
- type = Numeric;
- n = val;
- return *this;
- }
-
- Datum &operator=(int val) {
- type = Numeric;
- n=(float) val;
- return *this;
- }
-
- Datum &operator=(const char *val) {
- type = String;
- str = val;
- return *this;
- }
-};
-
-#endif // __qm_datum_h__
diff --git a/libs/pbd3/pbd/dirname.h b/libs/pbd3/pbd/dirname.h
deleted file mode 100644
index 5e63ddb55d..0000000000
--- a/libs/pbd3/pbd/dirname.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef __stupid_dirname_h__
-#define __stupid_dirname_h__
-
-
-#include <string>
-
-namespace PBD {
- extern char *dirname (const char *);
- extern std::string dirname (const std::string);
-}
-#endif // __stupid_dirname_h__
diff --git a/libs/pbd3/pbd/ellipsoid.h b/libs/pbd3/pbd/ellipsoid.h
deleted file mode 100644
index 3758e415c2..0000000000
--- a/libs/pbd3/pbd/ellipsoid.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __qm_ellipsoid_h__
-#define __qm_ellipsoid_h__
-
-struct Arc
-{
- int rect_x;
- int rect_y;
- int rect_h;
- int rect_w;
- int start_angle;
- int arc_angle;
- bool counter_clockwise;
-};
-
-class Ellipsoid
-{
- int start_x;
- int end_x;
- int start_y;
- int end_y;
- static const unsigned int narcs;
-
- public:
- Arc arc[2];
-
- Ellipsoid () {
- start_x = -1;
- end_x = -1;
- }
-
- bool ready() { return start_x != -1 && end_x != -1; }
- void set_start (int x, int y);
- void set_end (int x, int y);
- void compute ();
-
- void set_start_angle (int n, int which_arc = -1) {
- if (which_arc < 0) {
- arc[0].start_angle = n * 64;
- arc[1].start_angle = n * 64;
- } else if (which_arc < (int) narcs) {
- arc[which_arc].start_angle = n * 64;
- }
- }
- void set_arc_angle (int n, int which_arc = -1) {
- if (which_arc < 0) {
- arc[0].arc_angle = n * 64;
- arc[1].arc_angle = n * 64;
- } else if (which_arc < (int) narcs) {
- arc[which_arc].arc_angle = n * 64;
- }
- }
-};
-
-#endif // __qm_ellipsoid_h__
diff --git a/libs/pbd3/pbd/error.h b/libs/pbd3/pbd/error.h
deleted file mode 100644
index 4136f02ee2..0000000000
--- a/libs/pbd3/pbd/error.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- Copyright (C) 1998-2006 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-#ifndef __libpbd_error_h__
-#define __libpbd_error_h__
-
-#include "transmitter.h"
-
-namespace PBD {
- extern Transmitter error;
- extern Transmitter info;
- extern Transmitter warning;
- extern Transmitter fatal;
-}
-
-#endif // __libpbd_error_h__
diff --git a/libs/pbd3/pbd/failed_constructor.h b/libs/pbd3/pbd/failed_constructor.h
deleted file mode 100644
index 62eb6c0d71..0000000000
--- a/libs/pbd3/pbd/failed_constructor.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef __pbd_failed_constructor_h__
-#define __pbd_failed_constructor_h__
-
-#include <exception>
-
-class failed_constructor : public std::exception {
- public:
- virtual const char *what() const throw() { return "failed constructor"; }
-};
-
-#endif /* __pbd_failed_constructor_h__ */
diff --git a/libs/pbd3/pbd/fastlog.h b/libs/pbd3/pbd/fastlog.h
deleted file mode 100644
index 4269705a44..0000000000
--- a/libs/pbd3/pbd/fastlog.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright unknown. Code by Laurent de Soras <laurent@ohmforce.com>.
- */
-
-#ifndef __pbd_fastlog_h__
-#define __pbd_fastlog_h__
-
-#include <math.h> /* for HUGE_VAL */
-
-static inline float fast_log2 (float val)
-{
- /* don't use reinterpret_cast<> because that prevents this
- from being used by pure C code (for example, GnomeCanvasItems)
- */
- union {float f; int i;} t;
- t.f = val;
- int * const exp_ptr = &t.i;
- int x = *exp_ptr;
- const int log_2 = ((x >> 23) & 255) - 128;
- x &= ~(255 << 23);
- x += 127 << 23;
- *exp_ptr = x;
-
- val = ((-1.0f/3) * t.f + 2) * t.f - 2.0f/3;
-
- return (val + log_2);
-}
-
-static inline float fast_log (const float val)
-{
- return (fast_log2 (val) * 0.69314718f);
-}
-
-static inline float fast_log10 (const float val)
-{
- return fast_log2(val) / 3.312500f;
-}
-
-static inline float minus_infinity() { return -HUGE_VAL; }
-
-#endif /* __pbd_fastlog_h__ */
diff --git a/libs/pbd3/pbd/foreach.h b/libs/pbd3/pbd/foreach.h
deleted file mode 100644
index 5102d81bb0..0000000000
--- a/libs/pbd3/pbd/foreach.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- Copyright (C) 2002 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __lib_pbd_foreach_h__
-#define __lib_pbd_foreach_h__
-
-template<class Iter, class T> void foreach (Iter first, Iter last, void (T::*method)()) {
- for (; first != last; ++first) {
- ((*first).*method)();
- }
-}
-
-template<class Iter, class T, class A> void foreach (Iter first, Iter last, void (T::*method)(A a), A arg) {
- for (; first != last; ++first) {
- ((*first).*method)(arg);
- }
-}
-
-template<class Iter, class T, class A1, class A2> void foreach (Iter first, Iter last, void (T::*method)(A1, A2), A1 arg1, A2 arg2) {
- for (; first != last; ++first) {
- ((*first).*method)(arg1, arg2);
- }
-}
-
-#endif /* __lib_pbd_foreach_h__ */
diff --git a/libs/pbd3/pbd/forkexec.h b/libs/pbd3/pbd/forkexec.h
deleted file mode 100644
index 2af3711390..0000000000
--- a/libs/pbd3/pbd/forkexec.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __forkexec_h__
-#define __forkexec_h__
-
-#include <unistd.h>
-
-pid_t forkexec(char **argv, char **envp, int outpipe[2], int inpipe[2]);
-pid_t forkexec_cmd(char *cmd, char **envp, int outpipe[2], int inpipe[2]);
-
-#endif // __forkexec_h__
diff --git a/libs/pbd3/pbd/lock_free_fifo.h b/libs/pbd3/pbd/lock_free_fifo.h
deleted file mode 100644
index cbe653fcb5..0000000000
--- a/libs/pbd3/pbd/lock_free_fifo.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- Copyright (C) 2000 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __pbd_lockfree_fifo_h__
-#define __pbd_lockfree_fifo_h__
-
-#include <sys/types.h>
-#include <cstdlib>
-
-template<class T>
-class LockFreeFIFO
-{
-public:
- LockFreeFIFO (int sz) {
- size = sz;
- push_ptr = 0;
- pop_ptr = 0;
- buf = new T[size];
- };
-
- virtual ~LockFreeFIFO() {
- delete [] buf;
- }
-
-
- int pop (T& r) {
- if (pop_ptr == push_ptr) {
- return -1;
- } else {
- r = buf[pop_ptr];
- pop_ptr++;
- if (pop_ptr >= size) {
- pop_ptr = 0;
- }
- return 0;
- }
- }
-
- int top (T& r) {
- if (pop_ptr == push_ptr) {
- return -1;
- } else {
- r = buf[pop_ptr];
- return 0;
- }
- }
-
- int push (T& t) {
- if ((size_t) abs (static_cast<int>(push_ptr - pop_ptr)) < size) {
- buf[push_ptr] = t;
- push_ptr++;
- if (push_ptr >= size) {
- push_ptr = 0;
- }
- return 0;
- } else {
- return -1;
- }
- }
-
- protected:
- T *buf;
- volatile size_t push_ptr;
- volatile size_t pop_ptr;
- size_t size;
-};
-
-
-#endif /* __pbd_lockfree_fifo_h__ */
diff --git a/libs/pbd3/pbd/lockmonitor.h b/libs/pbd3/pbd/lockmonitor.h
deleted file mode 100644
index c91a041e9b..0000000000
--- a/libs/pbd3/pbd/lockmonitor.h
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- Copyright (C) 2000 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __pbd_lockmonitor_h__
-#define __pbd_lockmonitor_h__
-
-#include <pthread.h>
-#include <pbd/pthread_spinlock.h>
-
-#undef DEBUG_LOCK_MONITOR
-
-#ifdef DEBUG_LOCK_MONITOR
-#include <iostream>
-#include <ardour/cycles.h>
-#endif
-
-namespace PBD
-{
-class Lock {
- public:
- Lock() { pthread_mutex_init (&_mutex, 0); }
- virtual ~Lock() {}
-
- virtual int lock () { return pthread_mutex_lock (&_mutex); }
- virtual int unlock() { return pthread_mutex_unlock (&_mutex); }
-
- pthread_mutex_t *mutex() { return &_mutex; }
-
- protected:
- pthread_mutex_t _mutex;
-};
-
-class NonBlockingLock : public Lock {
- public:
- NonBlockingLock() {}
- ~NonBlockingLock(){}
-
- int lock () { return pthread_mutex_lock (&_mutex); }
- int trylock () { return pthread_mutex_trylock (&_mutex); }
- int unlock() { return pthread_mutex_unlock (&_mutex); }
-};
-
-class RWLock {
- public:
- RWLock() { pthread_rwlock_init (&_mutex, 0); }
- virtual ~RWLock() { pthread_rwlock_destroy(&_mutex); }
-
- virtual int write_lock () { return pthread_rwlock_wrlock (&_mutex); }
- virtual int read_lock () { return pthread_rwlock_rdlock (&_mutex); }
- virtual int unlock() { return pthread_rwlock_unlock (&_mutex); }
-
- pthread_rwlock_t *mutex() { return &_mutex; }
-
- protected:
- pthread_rwlock_t _mutex;
-};
-
-class NonBlockingRWLock : public RWLock {
- public:
- NonBlockingRWLock() {}
- ~NonBlockingRWLock(){}
-
- int write_trylock () { return pthread_rwlock_trywrlock (&_mutex); }
- int read_trylock () { return pthread_rwlock_tryrdlock (&_mutex); }
-};
-
-
-class LockMonitor
-{
- public:
- LockMonitor (Lock& lck, unsigned long l, const char *f)
- : lock (lck)
-#ifdef DEBUG_LOCK_MONITOR
- , line (l), file (f)
-#endif
- {
-
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long long when;
- when = get_cycles();
- cerr << when << " lock " << &lock << " at " << line << " in " << file << endl;
-#endif
- lock.lock ();
-#ifdef DEBUG_LOCK_MONITOR
- when = get_cycles();
- cerr << '\t' << when
- << " locked: "
- << &lock << " at "
- << line << " in " << file << endl;
-#endif
- }
-
- ~LockMonitor () {
- lock.unlock ();
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long long when;
- when = get_cycles();
- cerr << '\t' << when << ' '
- << " UNLOCKED "
- << &lock << " at "
- << line << " in " << file << endl;
-#endif
- }
- private:
- Lock& lock;
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long line;
- const char * file;
-#endif
-};
-
-class TentativeLockMonitor
-{
- public:
- TentativeLockMonitor (NonBlockingLock& lck, unsigned long l, const char *f)
- : lock (lck)
-#ifdef DEBUG_LOCK_MONITOR
- , line (l), file (f)
-#endif
- {
-
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long long when;
- when = get_cycles();
- cerr << when << " tentative lock " << &lock << " at " << line << " in " << file << endl;
-#endif
- _locked = (lock.trylock() == 0);
-
-#ifdef DEBUG_LOCK_MONITOR
- when = get_cycles();
- cerr << '\t' << when << ' '
- << _locked
- << " lock: "
- << &lock << " at "
- << line << " in " << file << endl;
-#endif
- }
-
- ~TentativeLockMonitor () {
- if (_locked) {
- lock.unlock ();
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long long when;
- when = get_cycles();
- cerr << '\t' << when << ' '
- << " UNLOCKED "
- << &lock << " at "
- << line << " in " << file << endl;
-#endif
- }
- }
-
- bool locked() { return _locked; }
-
- private:
- NonBlockingLock& lock;
- bool _locked;
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long line;
- const char * file;
-#endif
-};
-
-class SpinLockMonitor
-{
- public:
- SpinLockMonitor (pthread_mutex_t *lck, unsigned long l, const char *f)
- : lock (lck)
-#ifdef DEBUG_LOCK_MONITOR
- , line (l), file (f)
-#endif
- {
-
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long long when;
- when = get_cycles();
- cerr << when << " spinlock " << lck << " at " << line << " in " << file << endl;
-#endif
- pthread_mutex_spinlock (lck);
-#ifdef DEBUG_LOCK_MONITOR
- when = get_cycles();
- cerr << '\t' << when
- << " locked at "
- << &lock << " at "
- << line << " in " << file << endl;
-#endif
- }
-
- ~SpinLockMonitor () {
- pthread_mutex_unlock (lock);
- }
- private:
- pthread_mutex_t *lock;
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long line;
- const char * file;
-#endif
-};
-
-
-class RWLockMonitor
-{
- public:
- RWLockMonitor (RWLock& lck, bool write, unsigned long l, const char *f)
- : lock (lck)
-#ifdef DEBUG_LOCK_MONITOR
- , line (l), file (f)
-#endif
- {
-
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long long when;
- when = get_cycles();
- cerr << when << " lock " << &lock << " at " << line << " in " << file << endl;
-#endif
- if (write) {
- lock.write_lock ();
- } else {
- lock.read_lock ();
- }
-#ifdef DEBUG_LOCK_MONITOR
- when = get_cycles();
- cerr << '\t' << when
- << " locked: "
- << &lock << " at "
- << line << " in " << file << endl;
-#endif
- }
-
- ~RWLockMonitor () {
- lock.unlock ();
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long long when;
- when = get_cycles();
- cerr << '\t' << when << ' '
- << " UNLOCKED "
- << &lock << " at "
- << line << " in " << file << endl;
-#endif
- }
- private:
- RWLock& lock;
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long line;
- const char * file;
-#endif
-};
-
-class TentativeRWLockMonitor
-{
- public:
- TentativeRWLockMonitor (NonBlockingRWLock& lck, bool write, unsigned long l, const char *f)
- : lock (lck)
-#ifdef DEBUG_LOCK_MONITOR
- , line (l), file (f)
-#endif
- {
-
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long long when;
- when = get_cycles();
- cerr << when << " tentative lock " << &lock << " at " << line << " in " << file << endl;
-#endif
- if (write) {
- _locked = (lock.write_trylock() == 0);
- } else {
- _locked = (lock.read_trylock() == 0);
- }
-
-#ifdef DEBUG_LOCK_MONITOR
- when = get_cycles();
- cerr << '\t' << when << ' '
- << _locked
- << " lock: "
- << &lock << " at "
- << line << " in " << file << endl;
-#endif
- }
-
- ~TentativeRWLockMonitor () {
- if (_locked) {
- lock.unlock ();
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long long when;
- when = get_cycles();
- cerr << '\t' << when << ' '
- << " UNLOCKED "
- << &lock << " at "
- << line << " in " << file << endl;
-#endif
- }
- }
-
- bool locked() { return _locked; }
-
- private:
- NonBlockingRWLock& lock;
- bool _locked;
-#ifdef DEBUG_LOCK_MONITOR
- unsigned long line;
- const char * file;
-#endif
-};
-
-
-} /* namespace */
-
-#endif /* __pbd_lockmonitor_h__*/
diff --git a/libs/pbd3/pbd/mathfix.h b/libs/pbd3/pbd/mathfix.h
deleted file mode 100644
index f0dc7e491e..0000000000
--- a/libs/pbd3/pbd/mathfix.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- Copyright (C) 2005 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __pbd_mathfix_h__
-#define __pbd_mathfix_h__
-
-/* this is necessary to support older releases of OSX where
- they moved around some of the standard math functions
-*/
-
-#ifdef __APPLE__
-#define powf pow
-#define sqrtf sqrt
-#endif
-
-
-#endif
diff --git a/libs/pbd3/pbd/mountpoint.h b/libs/pbd3/pbd/mountpoint.h
deleted file mode 100644
index 86ccc58190..0000000000
--- a/libs/pbd3/pbd/mountpoint.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __pbd_mountpoint_h__
-#define __pbd_mountpoint_h__
-
-#include <string>
-
-std::string mountpoint (std::string path);
-
-#endif // __pbd_mountpoint_h__
diff --git a/libs/pbd3/pbd/pathscanner.h b/libs/pbd3/pbd/pathscanner.h
deleted file mode 100644
index 346e7858c4..0000000000
--- a/libs/pbd3/pbd/pathscanner.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef __libmisc_pathscanner_h__
-#define __libmisc_pathscanner_h__
-
-#include <vector>
-#include <string>
-#include <regex.h>
-
-using std::string;
-using std::vector;
-
-class PathScanner
-
-{
- public:
- vector<string *> *operator() (const string &dirpath,
- bool (*filter)(const string &, void *arg),
- void *arg,
- bool match_fullpath = true,
- bool return_fullpath = true,
- long limit = -1) {
- return run_scan (dirpath,
- (bool (PathScanner::*)(const string &)) 0,
- filter,
- arg,
- match_fullpath,
- return_fullpath,
- limit);
- }
-
- vector<string *> *operator() (const string &dirpath,
- const string &regexp,
- bool match_fullpath = true,
- bool return_fullpath = true,
- long limit = -1);
-
-
- string *find_first (const string &dirpath,
- const string &regexp,
- bool match_fullpath = true,
- bool return_fullpath = true);
-
- string *find_first (const string &dirpath,
- bool (*filter)(const string &, void *),
- void *arg,
- bool match_fullpath = true,
- bool return_fullpath = true);
-
- private:
- regex_t compiled_pattern;
-
- bool regexp_filter (const string &str) {
- return regexec (&compiled_pattern, str.c_str(), 0, 0, 0) == 0;
- }
-
- vector<string *> *run_scan (const string &dirpath,
- bool (PathScanner::*mfilter) (const string &),
- bool (*filter)(const string &, void *),
- void *arg,
- bool match_fullpath,
- bool return_fullpath,
- long limit);
-
-
-};
-
-#endif // __libmisc_pathscanner_h__
diff --git a/libs/pbd3/pbd/pool.h b/libs/pbd3/pbd/pool.h
deleted file mode 100644
index f8e19e72fb..0000000000
--- a/libs/pbd3/pbd/pool.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __qm_pool_h__
-#define __qm_pool_h__
-
-#include <vector>
-#include <string>
-
-#include <glibmm/thread.h>
-
-#include <pbd/ringbuffer.h>
-
-class Pool
-{
- public:
- Pool (std::string name, unsigned long item_size, unsigned long nitems);
- virtual ~Pool ();
-
- virtual void *alloc ();
- virtual void release (void *);
-
- std::string name() const { return _name; }
-
- private:
- RingBuffer<void*>* free_list;
- std::string _name;
- void *block;
-};
-
-class SingleAllocMultiReleasePool : public Pool
-{
- public:
- SingleAllocMultiReleasePool (std::string name, unsigned long item_size, unsigned long nitems);
- ~SingleAllocMultiReleasePool ();
-
- virtual void *alloc ();
- virtual void release (void *);
-
- private:
- Glib::Mutex* m_lock;
-};
-
-
-class MultiAllocSingleReleasePool : public Pool
-{
- public:
- MultiAllocSingleReleasePool (std::string name, unsigned long item_size, unsigned long nitems);
- ~MultiAllocSingleReleasePool ();
-
- virtual void *alloc ();
- virtual void release (void *);
-
- private:
- Glib::Mutex* m_lock;
-};
-
-#endif // __qm_pool_h__
diff --git a/libs/pbd3/pbd/position.h b/libs/pbd3/pbd/position.h
deleted file mode 100644
index c8241af085..0000000000
--- a/libs/pbd3/pbd/position.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __qui_position_h__
-#define __qui_position_h__
-
-enum Position {
- Top,
- Left,
- Right,
- Bottom,
- UpperLeft,
- LowerLeft,
- UpperRight,
- LowerRight,
- Center,
- Nowhere,
-};
-
-
-#endif // __qui_position_h__
diff --git a/libs/pbd3/pbd/precision_timer.h b/libs/pbd3/pbd/precision_timer.h
deleted file mode 100644
index a103b4800d..0000000000
--- a/libs/pbd3/pbd/precision_timer.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __precision_timer_h__
-#define __precision_timer_h__
-
-#include <pbd/cycles.h>
-
-typedef cycles_t precision_time_t;
-
-class PrecisionTimer {
- public:
- PrecisionTimer ();
-
- /* returns current time in microseconds since
- the time base was created (which may be
- the same as when the PrecisionTimer was
- created or it may not).
- */
-
-#ifdef PBD_HAVE_CYCLE_COUNTER
-
- precision_time_t current () {
- return get_cycles() / cycles_per_usec;
- }
-
-#else /* !HAVE_CYCLE_COUNTER */
-
- precision_time_t current () {
- struct timeval now;
- gettimeofday (&now, 0);
- return (precision_time_t) ((now.tv_sec * 1000000) + now.tv_usec);
- }
-
-#endif /* HAVE_CYCLE_COUNTER */
-
- private:
- int get_mhz();
- static precision_time_t cycles_per_usec;
-};
-
-#endif // __precision_timer.h
-
-
diff --git a/libs/pbd3/pbd/pthread_spinlock.h b/libs/pbd3/pbd/pthread_spinlock.h
deleted file mode 100644
index 71835221fa..0000000000
--- a/libs/pbd3/pbd/pthread_spinlock.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-#ifndef __pthread_mutex_spinlock_h__
-#define __pthread_mutex_spinlock_h__
-
-#include <pthread.h>
-
-extern unsigned int pthread_calibrate_spinlimit ();
-extern void pthread_set_spinlimit (unsigned int spins);
-extern int pthread_mutex_spinlock (pthread_mutex_t *mp);
-
-#endif // __pthread_mutex_spinlock_h__
diff --git a/libs/pbd3/pbd/pthread_utils.h b/libs/pbd3/pbd/pthread_utils.h
deleted file mode 100644
index 482b5b54cf..0000000000
--- a/libs/pbd3/pbd/pthread_utils.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef __pbd_pthread_utils__
-#define __pbd_pthread_utils__
-
-#include <pthread.h>
-#include <signal.h>
-#include <string>
-#include <stdint.h>
-
-#include <sigc++/sigc++.h>
-
-int pthread_create_and_store (std::string name, pthread_t *thread, pthread_attr_t *attr, void * (*start_routine)(void *), void * arg);
-void pthread_cancel_one (pthread_t thread);
-void pthread_kill_all (int signum);
-void pthread_cancel_all ();
-void pthread_exit_pbd (void* status);
-std::string pthread_name ();
-
-namespace PBD {
- extern sigc::signal<void,pthread_t,std::string> ThreadCreated;
- extern sigc::signal<void,pthread_t,std::string,uint32_t> ThreadCreatedWithRequestSize;
-}
-
-#endif /* __pbd_pthread_utils__ */
diff --git a/libs/pbd3/pbd/rcpointer.h b/libs/pbd3/pbd/rcpointer.h
deleted file mode 100644
index c634208437..0000000000
--- a/libs/pbd3/pbd/rcpointer.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __qm_rcpointer_h__
-#define __qm_rcpointer_h__
-
-template<class T> class RCPointer {
- public:
- T *operator->() { return _ptr; }
- bool operator==(T *p) { return _ptr == p; }
- bool operator!=(T *p) { return _ptr != p; }
-
- int refcount() { return _ptr->count; }
-
- RCPointer () { _ptr = 0; }
-
- RCPointer (T *p) : _ptr (p) {
- if (_ptr) _ptr->count++;
- }
-
- RCPointer (const RCPointer& r) : _ptr (r._ptr) {
- if (_ptr) _ptr->count++;
- }
-
- RCPointer &operator= (const RCPointer &r) {
- if (_ptr == r._ptr) return *this;
- if (_ptr && --_ptr->count == 0) {
- delete _ptr;
- }
- _ptr = r._ptr;
- if (_ptr) _ptr->count++;
- return *this;
- }
- ~RCPointer () {
- if (_ptr && --_ptr->count == 0) {
- delete _ptr;
- }
- }
-
- private:
- T *_ptr;
-};
-
-#endif // __qm_rcpointer_h__
diff --git a/libs/pbd3/pbd/receiver.h b/libs/pbd3/pbd/receiver.h
deleted file mode 100644
index 5ce238df63..0000000000
--- a/libs/pbd3/pbd/receiver.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __libmisc_receiver_h__
-#define __libmisc_receiver_h__
-
-#include <vector>
-
-#include <sigc++/sigc++.h>
-
-#include "transmitter.h"
-
-using std::vector;
-
-class strstream;
-
-class Receiver : virtual public sigc::trackable
-{
- public:
- Receiver ();
- virtual ~Receiver ();
-
- void listen_to (Transmitter &);
- void hangup ();
-
- protected:
- virtual void receive (Transmitter::Channel, const char *) = 0;
-
- private:
- vector<sigc::connection *> connections;
-};
-
-#endif // __libmisc_receiver_h__
diff --git a/libs/pbd3/pbd/relation.h b/libs/pbd3/pbd/relation.h
deleted file mode 100644
index f28aaecfa1..0000000000
--- a/libs/pbd3/pbd/relation.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- Copyright (C) 1999 Paul Barton-Davis
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __pbd_relation_h__
-#define __pbd_relation_h__
-
-enum RelationalCondition {
- Equal = 0,
- NotEqual,
- LessThan,
- LessThanOrEqual,
- GreaterThan,
- GreaterThanOrEqual,
- Changed,
-
- NumConditions
-};
-
-#endif // __pbd_relation_h__
diff --git a/libs/pbd3/pbd/restartable_rw.h b/libs/pbd3/pbd/restartable_rw.h
deleted file mode 100644
index ee84e4e295..0000000000
--- a/libs/pbd3/pbd/restartable_rw.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __libmisc_restartable_rw__h__
-#define __libmisc_restartable_rw__h__
-
-extern int restartable_write (int fd, unsigned char *buf, size_t cnt);
-extern int restartable_read (int fd, unsigned char *buf, size_t cnt);
-
-#endif // __libmisc_restartable_rw__h__
diff --git a/libs/pbd3/pbd/ringbuffer.h b/libs/pbd3/pbd/ringbuffer.h
deleted file mode 100644
index 1d9c9b04e3..0000000000
--- a/libs/pbd3/pbd/ringbuffer.h
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- Copyright (C) 2000 Paul Davis & Benno Senoner
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef ringbuffer_h
-#define ringbuffer_h
-
-//#include <sys/mman.h>
-
-#include <glib.h>
-
-template<class T>
-class RingBuffer
-{
- public:
- RingBuffer (size_t sz) {
- size_t power_of_two;
-
- for (power_of_two = 1; 1U<<power_of_two < sz; power_of_two++);
-
- size = 1<<power_of_two;
- size_mask = size;
- size_mask -= 1;
- buf = new T[size];
- reset ();
-
- };
-
- virtual ~RingBuffer() {
- delete [] buf;
- }
-
- void reset () {
- /* !!! NOT THREAD SAFE !!! */
- g_atomic_int_set (&write_ptr, 0);
- g_atomic_int_set (&read_ptr, 0);
- }
-
- void set (size_t r, size_t w) {
- /* !!! NOT THREAD SAFE !!! */
- g_atomic_int_set (&write_ptr, w);
- g_atomic_int_set (&read_ptr, r);
- }
-
- size_t read (T *dest, size_t cnt);
- size_t write (T *src, size_t cnt);
-
- struct rw_vector {
- T *buf[2];
- size_t len[2];
- };
-
- void get_read_vector (rw_vector *);
- void get_write_vector (rw_vector *);
-
- void decrement_read_ptr (size_t cnt) {
- g_atomic_int_set (&read_ptr, (g_atomic_int_get(&read_ptr) - cnt) & size_mask);
- }
-
- void increment_read_ptr (size_t cnt) {
- g_atomic_int_set (&read_ptr, (g_atomic_int_get(&read_ptr) + cnt) & size_mask);
- }
-
- void increment_write_ptr (size_t cnt) {
- g_atomic_int_set (&write_ptr, (g_atomic_int_get(&write_ptr) + cnt) & size_mask);
- }
-
- size_t write_space () {
- size_t w, r;
-
- w = g_atomic_int_get (&write_ptr);
- r = g_atomic_int_get (&read_ptr);
-
- if (w > r) {
- return ((r - w + size) & size_mask) - 1;
- } else if (w < r) {
- return (r - w) - 1;
- } else {
- return size - 1;
- }
- }
-
- size_t read_space () {
- size_t w, r;
-
- w = g_atomic_int_get (&write_ptr);
- r = g_atomic_int_get (&read_ptr);
-
- if (w > r) {
- return w - r;
- } else {
- return (w - r + size) & size_mask;
- }
- }
-
- T *buffer () { return buf; }
- size_t get_write_ptr () const { return g_atomic_int_get (&write_ptr); }
- size_t get_read_ptr () const { return g_atomic_int_get (&read_ptr); }
- size_t bufsize () const { return size; }
-
- protected:
- T *buf;
- size_t size;
- mutable gint write_ptr;
- mutable gint read_ptr;
- size_t size_mask;
-};
-
-template<class T> size_t
-RingBuffer<T>::read (T *dest, size_t cnt)
-{
- size_t free_cnt;
- size_t cnt2;
- size_t to_read;
- size_t n1, n2;
- size_t priv_read_ptr;
-
- priv_read_ptr=g_atomic_int_get(&read_ptr);
-
- if ((free_cnt = read_space ()) == 0) {
- return 0;
- }
-
- to_read = cnt > free_cnt ? free_cnt : cnt;
-
- cnt2 = priv_read_ptr + to_read;
-
- if (cnt2 > size) {
- n1 = size - priv_read_ptr;
- n2 = cnt2 & size_mask;
- } else {
- n1 = to_read;
- n2 = 0;
- }
-
- memcpy (dest, &buf[priv_read_ptr], n1 * sizeof (T));
- priv_read_ptr = (priv_read_ptr + n1) & size_mask;
-
- if (n2) {
- memcpy (dest+n1, buf, n2 * sizeof (T));
- priv_read_ptr = n2;
- }
-
- g_atomic_int_set(&read_ptr, priv_read_ptr);
- return to_read;
-}
-
-template<class T> size_t
-RingBuffer<T>::write (T *src, size_t cnt)
-
-{
- size_t free_cnt;
- size_t cnt2;
- size_t to_write;
- size_t n1, n2;
- size_t priv_write_ptr;
-
- priv_write_ptr=g_atomic_int_get(&write_ptr);
-
- if ((free_cnt = write_space ()) == 0) {
- return 0;
- }
-
- to_write = cnt > free_cnt ? free_cnt : cnt;
-
- cnt2 = priv_write_ptr + to_write;
-
- if (cnt2 > size) {
- n1 = size - priv_write_ptr;
- n2 = cnt2 & size_mask;
- } else {
- n1 = to_write;
- n2 = 0;
- }
-
- memcpy (&buf[priv_write_ptr], src, n1 * sizeof (T));
- priv_write_ptr = (priv_write_ptr + n1) & size_mask;
-
- if (n2) {
- memcpy (buf, src+n1, n2 * sizeof (T));
- priv_write_ptr = n2;
- }
-
- g_atomic_int_set(&write_ptr, priv_write_ptr);
- return to_write;
-}
-
-template<class T> void
-RingBuffer<T>::get_read_vector (RingBuffer<T>::rw_vector *vec)
-
-{
- size_t free_cnt;
- size_t cnt2;
- size_t w, r;
-
- w = g_atomic_int_get (&write_ptr);
- r = g_atomic_int_get (&read_ptr);
-
- if (w > r) {
- free_cnt = w - r;
- } else {
- free_cnt = (w - r + size) & size_mask;
- }
-
- cnt2 = r + free_cnt;
-
- if (cnt2 > size) {
- /* Two part vector: the rest of the buffer after the
- current write ptr, plus some from the start of
- the buffer.
- */
-
- vec->buf[0] = &buf[r];
- vec->len[0] = size - r;
- vec->buf[1] = buf;
- vec->len[1] = cnt2 & size_mask;
-
- } else {
-
- /* Single part vector: just the rest of the buffer */
-
- vec->buf[0] = &buf[r];
- vec->len[0] = free_cnt;
- vec->len[1] = 0;
- }
-}
-
-template<class T> void
-RingBuffer<T>::get_write_vector (RingBuffer<T>::rw_vector *vec)
-
-{
- size_t free_cnt;
- size_t cnt2;
- size_t w, r;
-
- w = g_atomic_int_get (&write_ptr);
- r = g_atomic_int_get (&read_ptr);
-
- if (w > r) {
- free_cnt = ((r - w + size) & size_mask) - 1;
- } else if (w < r) {
- free_cnt = (r - w) - 1;
- } else {
- free_cnt = size - 1;
- }
-
- cnt2 = w + free_cnt;
-
- if (cnt2 > size) {
-
- /* Two part vector: the rest of the buffer after the
- current write ptr, plus some from the start of
- the buffer.
- */
-
- vec->buf[0] = &buf[w];
- vec->len[0] = size - w;
- vec->buf[1] = buf;
- vec->len[1] = cnt2 & size_mask;
- } else {
- vec->buf[0] = &buf[w];
- vec->len[0] = free_cnt;
- vec->len[1] = 0;
- }
-}
-
-
-#endif /* __ringbuffer_h__ */
diff --git a/libs/pbd3/pbd/ringbufferNPT.h b/libs/pbd3/pbd/ringbufferNPT.h
deleted file mode 100644
index fee2efce3d..0000000000
--- a/libs/pbd3/pbd/ringbufferNPT.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- Copyright (C) 2000 Paul Davis & Benno Senoner
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef ringbuffer_npt_h
-#define ringbuffer_npt_h
-
-//#include <sys/mman.h>
-
-#include <glib.h>
-
-/* ringbuffer class where the element size is not required to be a power of two */
-
-template<class T>
-class RingBufferNPT
-{
- public:
- RingBufferNPT (size_t sz) {
- size = sz;
- buf = new T[size];
- reset ();
-
- };
-
- virtual ~RingBufferNPT() {
- delete [] buf;
- }
-
- void reset () {
- /* !!! NOT THREAD SAFE !!! */
- g_atomic_int_set (&write_ptr, 0);
- g_atomic_int_set (&read_ptr, 0);
- }
-
- void set (size_t r, size_t w) {
- /* !!! NOT THREAD SAFE !!! */
- g_atomic_int_set (&write_ptr, w);
- g_atomic_int_set (&read_ptr, r);
- }
-
- size_t read (T *dest, size_t cnt);
- size_t write (T *src, size_t cnt);
-
- struct rw_vector {
- T *buf[2];
- size_t len[2];
- };
-
- void get_read_vector (rw_vector *);
- void get_write_vector (rw_vector *);
-
- void decrement_read_ptr (size_t cnt) {
- g_atomic_int_set (&read_ptr, (g_atomic_int_get(&read_ptr) - cnt) % size);
- }
-
- void increment_read_ptr (size_t cnt) {
- g_atomic_int_set (&read_ptr, (g_atomic_int_get(&read_ptr) + cnt) % size);
- }
-
- void increment_write_ptr (size_t cnt) {
- g_atomic_int_set (&write_ptr, (g_atomic_int_get(&write_ptr) + cnt) % size);
- }
-
- size_t write_space () {
- size_t w, r;
-
- w = g_atomic_int_get (&write_ptr);
- r = g_atomic_int_get (&read_ptr);
-
- if (w > r) {
- return ((r - w + size) % size) - 1;
- } else if (w < r) {
- return (r - w) - 1;
- } else {
- return size - 1;
- }
- }
-
- size_t read_space () {
- size_t w, r;
-
- w = g_atomic_int_get (&write_ptr);
- r = g_atomic_int_get (&read_ptr);
-
- if (w > r) {
- return w - r;
- } else {
- return (w - r + size) % size;
- }
- }
-
- T *buffer () { return buf; }
- size_t get_write_ptr () const { return g_atomic_int_get (&write_ptr); }
- size_t get_read_ptr () const { return g_atomic_int_get (&read_ptr); }
- size_t bufsize () const { return size; }
-
- protected:
- T *buf;
- size_t size;
- mutable gint write_ptr;
- mutable gint read_ptr;
-};
-
-template<class T> size_t
-RingBufferNPT<T>::read (T *dest, size_t cnt)
-{
- size_t free_cnt;
- size_t cnt2;
- size_t to_read;
- size_t n1, n2;
- size_t priv_read_ptr;
-
- priv_read_ptr=g_atomic_int_get(&read_ptr);
-
- if ((free_cnt = read_space ()) == 0) {
- return 0;
- }
-
- to_read = cnt > free_cnt ? free_cnt : cnt;
-
- cnt2 = priv_read_ptr + to_read;
-
- if (cnt2 > size) {
- n1 = size - priv_read_ptr;
- n2 = cnt2 % size;
- } else {
- n1 = to_read;
- n2 = 0;
- }
-
- memcpy (dest, &buf[priv_read_ptr], n1 * sizeof (T));
- priv_read_ptr = (priv_read_ptr + n1) % size;
-
- if (n2) {
- memcpy (dest+n1, buf, n2 * sizeof (T));
- priv_read_ptr = n2;
- }
-
- g_atomic_int_set(&read_ptr, priv_read_ptr);
- return to_read;
-}
-
-template<class T> size_t
-RingBufferNPT<T>::write (T *src, size_t cnt)
-{
- size_t free_cnt;
- size_t cnt2;
- size_t to_write;
- size_t n1, n2;
- size_t priv_write_ptr;
-
- priv_write_ptr=g_atomic_int_get(&write_ptr);
-
- if ((free_cnt = write_space ()) == 0) {
- return 0;
- }
-
- to_write = cnt > free_cnt ? free_cnt : cnt;
-
- cnt2 = priv_write_ptr + to_write;
-
- if (cnt2 > size) {
- n1 = size - priv_write_ptr;
- n2 = cnt2 % size;
- } else {
- n1 = to_write;
- n2 = 0;
- }
-
- memcpy (&buf[priv_write_ptr], src, n1 * sizeof (T));
- priv_write_ptr = (priv_write_ptr + n1) % size;
-
- if (n2) {
- memcpy (buf, src+n1, n2 * sizeof (T));
- priv_write_ptr = n2;
- }
-
- g_atomic_int_set(&write_ptr, priv_write_ptr);
- return to_write;
-}
-
-template<class T> void
-RingBufferNPT<T>::get_read_vector (RingBufferNPT<T>::rw_vector *vec)
-{
- size_t free_cnt;
- size_t cnt2;
- size_t w, r;
-
- w = g_atomic_int_get (&write_ptr);
- r = g_atomic_int_get (&read_ptr);
-
- if (w > r) {
- free_cnt = w - r;
- } else {
- free_cnt = (w - r + size) % size;
- }
-
- cnt2 = r + free_cnt;
-
- if (cnt2 > size) {
- /* Two part vector: the rest of the buffer after the
- current write ptr, plus some from the start of
- the buffer.
- */
-
- vec->buf[0] = &buf[r];
- vec->len[0] = size - r;
- vec->buf[1] = buf;
- vec->len[1] = cnt2 % size;
-
- } else {
-
- /* Single part vector: just the rest of the buffer */
-
- vec->buf[0] = &buf[r];
- vec->len[0] = free_cnt;
- vec->len[1] = 0;
- }
-}
-
-template<class T> void
-RingBufferNPT<T>::get_write_vector (RingBufferNPT<T>::rw_vector *vec)
-{
- size_t free_cnt;
- size_t cnt2;
- size_t w, r;
-
- w = g_atomic_int_get (&write_ptr);
- r = g_atomic_int_get (&read_ptr);
-
- if (w > r) {
- free_cnt = ((r - w + size) % size) - 1;
- } else if (w < r) {
- free_cnt = (r - w) - 1;
- } else {
- free_cnt = size - 1;
- }
-
- cnt2 = w + free_cnt;
-
- if (cnt2 > size) {
-
- /* Two part vector: the rest of the buffer after the
- current write ptr, plus some from the start of
- the buffer.
- */
-
- vec->buf[0] = &buf[w];
- vec->len[0] = size - w;
- vec->buf[1] = buf;
- vec->len[1] = cnt2 % size;
- } else {
- vec->buf[0] = &buf[w];
- vec->len[0] = free_cnt;
- vec->len[1] = 0;
- }
-}
-
-#endif /* __ringbuffer_npt_h__ */
diff --git a/libs/pbd3/pbd/rt.h b/libs/pbd3/pbd/rt.h
deleted file mode 100644
index aa954fcd42..0000000000
--- a/libs/pbd3/pbd/rt.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-#ifndef __libmisc_rt_h__
-#define __libmisc_rt_h__
-
-extern int become_real_time_thread (int rt_priorty = 10, bool fifo = true);
-
-#endif // __libmisc_rt_h__
diff --git a/libs/pbd3/pbd/rtthread.h b/libs/pbd3/pbd/rtthread.h
deleted file mode 100644
index b99c69ba79..0000000000
--- a/libs/pbd3/pbd/rtthread.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-#ifndef __rtthread_h__
-#define __rtthread_h__
-
-#include <pthread.h>
-
-extern int pthread_create_realtime (pthread_t *new_thread,
- void *(*start)(void *), void *arg,
- int priority = 10);
-
-
-#endif // __rtthread_h__
diff --git a/libs/pbd3/pbd/scale.h b/libs/pbd3/pbd/scale.h
deleted file mode 100644
index 0384ae52aa..0000000000
--- a/libs/pbd3/pbd/scale.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- Copyright (C) 2000 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __pbd_scale_h__
-#define __pbd_scale_h__
-
-#include <cmath>
-
-inline float
-scale (float value, float lower, float upper)
-{
- return fabs (lower + value) / (upper-lower);
-}
-
-inline float
-scale_with_range (float value, float lower, float range)
-{
- return fabs (lower + value) / range;
-}
-
-
-inline float
-scale_to (float value, float lower, float upper, float to)
-{
- return (fabs (lower + value) / (upper-lower)) * to;
-}
-
-inline float
-scale_to_with_range (float value, float lower, float range, float to)
-{
- return (fabs (lower + value) / range) * to;
-}
-
-#endif /* __pbd_scale_h__ */
-
-
diff --git a/libs/pbd3/pbd/selectable.h b/libs/pbd3/pbd/selectable.h
deleted file mode 100644
index 470bc3cfcc..0000000000
--- a/libs/pbd3/pbd/selectable.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __selectable_h__
-#define __selectable_h__
-
-#include <list>
-#include <string>
-#include <stdio.h>
-
-#include <sigc++/sigc++.h>
-
-#include <sys/types.h>
-
-namespace Select {
- enum Condition {
- Readable = 0x1,
- Writable = 0x2,
- Exception = 0x4
- };
-
-class Selectable : public sigc::trackable
-
-{
- public:
- Selectable (int fd);
- Selectable (const std::string &, int flags, int mode = 0);
- Selectable (FILE *);
- ~Selectable ();
-
- sigc::signal<void,Selectable *,Select::Condition> readable;
- sigc::signal<void,Selectable *,Select::Condition> writable;
- sigc::signal<void,Selectable *,Select::Condition> exceptioned;
-
- int fd() { return _fd; }
- bool ok() { return _ok; }
-
- protected:
- void selected (unsigned int condition);
- int condition;
- int _fd;
-
- friend class Selector;
-
- private:
- enum {
- fromFD,
- fromPath,
- fromFILE
- };
-
- bool _ok;
- int _type;
- std::string path;
-};
-
-class Selector {
- private:
- int post_select (fd_set *, fd_set *, fd_set *);
- int _max_fd;
-
- typedef std::list<Selectable *> Selectables;
- Selectables selectables;
- pthread_mutex_t list_lock;
-
- static bool use_list_lock;
-
- public:
- Selector ();
-
- void multithreaded (bool yn) {
- use_list_lock = yn;
- }
-
- void add (int condition, Selectable *s);
- void remove (Selectable *);
- int select (unsigned long usecs);
-};
-
-
-
-} /* namespace */
-
-
-#endif // __selectable_h__
diff --git a/libs/pbd3/pbd/stacktrace.h b/libs/pbd3/pbd/stacktrace.h
deleted file mode 100644
index d7278bd35a..0000000000
--- a/libs/pbd3/pbd/stacktrace.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __libpbd_stacktrace_h__
-#define __libpbd_stacktrace_h__
-
-#include <ostream>
-
-namespace PBD {
- void stacktrace (std::ostream& out);
-}
-
-#endif /* __libpbd_stacktrace_h__ */
diff --git a/libs/pbd3/pbd/stl_delete.h b/libs/pbd3/pbd/stl_delete.h
deleted file mode 100644
index 6e5bfa0734..0000000000
--- a/libs/pbd3/pbd/stl_delete.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __libmisc_stl_delete_h__
-#define __libmisc_stl_delete_h__
-
-/* To actually use any of these deletion functions, you need to
- first include the revelant container type header.
-*/
-#if defined(_CPP_VECTOR) || defined(_GLIBCXX_VECTOR) || defined(__SGI_STL_VECTOR)
-template<class T> void vector_delete (std::vector<T *> *vec)
-{
- typename std::vector<T *>::iterator i;
-
- for (i = vec->begin(); i != vec->end(); i++) {
- delete *i;
- }
- vec->clear ();
-}
-#endif // _CPP_VECTOR || _GLIBCXX_VECTOR || __SGI_STL_VECTOR
-
-#if defined(_CPP_MAP) || defined(_GLIBCXX_MAP) || defined(__SGI_STL_MAP)
-template<class K, class T> void map_delete (std::map<K, T *> *m)
-{
- typename std::map<K, T *>::iterator i;
-
- for (i = m->begin(); i != m->end(); i++) {
- delete (*i).second;
- }
- m->clear ();
-}
-#endif // _CPP_MAP || _GLIBCXX_MAP || __SGI_STL_MAP
-
-#if defined(_CPP_LIST) || defined(_GLIBCXX_LIST) || defined(__SGI_STL_LIST)
-template<class T> void list_delete (std::list<T *> *l)
-{
- typename std::list<T *>::iterator i;
-
- for (i = l->begin(); i != l->end(); i++) {
- delete (*i);
- }
-
- l->clear ();
-}
-#endif // _CPP_LIST || _GLIBCXX_LIST || __SGI_STL_LIST
-
-#if defined(_CPP_SLIST) || defined(_GLIBCXX_SLIST) || defined(__SGI_STL_SLIST)
-template<class T> void slist_delete (std::slist<T *> *l)
-{
- typename std::slist<T *>::iterator i;
-
- for (i = l->begin(); i != l->end(); i++) {
- delete (*i);
- }
-
- l->clear ();
-}
-#endif // _CPP_SLIST || _GLIBCXX_SLIST || __SGI_STL_SLIST
-
-#if defined(_CPP_SET) || defined(_GLIBCXX_SET) || defined(__SGI_STL_SET)
-template<class T> void set_delete (std::set<T *> *sset)
-{
- typename std::set<T *>::iterator i;
-
- for (i = sset->begin(); i != sset->end(); i++) {
- delete *i;
- }
- sset->erase (sset->begin(), sset->end());
-}
-#endif // _CPP_SET || _GLIBCXX_SET || __SGI_STL_SET
-
-#endif // __libmisc_stl_delete_h__
diff --git a/libs/pbd3/pbd/stl_functors.h b/libs/pbd3/pbd/stl_functors.h
deleted file mode 100644
index 4a96e91a28..0000000000
--- a/libs/pbd3/pbd/stl_functors.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __stl_functors_h__
-#define __stl_functors_h__
-
-#include <string>
-
-#ifndef LESS_STRING_P
-struct less<std::string *> {
- bool operator()(std::string *s1, std::string *s2) const {
- return *s1 < *s2;
- }
-};
-#define LESS_STRING_P
-#endif // LESS_STRING_P
-
-#ifndef LESS_CONST_STRING_P
-struct less<const std::string *> {
- bool operator()(const std::string *s1, const std::string *s2) const {
- return *s1 < *s2;
- }
-};
-#define LESS_CONST_STRING_P
-#endif // LESS_CONST_STRING_P
-
-#ifndef LESS_CONST_CHAR_P
-struct less<const char *>
-{
- bool operator()(const char* s1, const char* s2) const {
- return strcmp(s1, s2) < 0;
- }
-};
-#define LESS_CONST_CHAR_P
-#endif // LESS_CONST_CHAR_P
-
-#ifndef LESS_CONST_FLOAT_P
-struct less<const float *>
-{
- bool operator()(const float *n1, const float *n2) const {
- return *n1 < *n2;
- }
-};
-#define LESS_CONST_FLOAT_P
-#endif // LESS_CONST_FLOAT_P
-
-#ifndef EQUAL_TO_CONST_CHAR_P
-struct equal_to<const char *>
-{
- bool operator()(const char *s1, const char *s2) const {
- return strcmp (s1, s2) == 0;
- }
-};
-#define EQUAL_TO_CONST_CHAR_P
-#endif // EQUAL_TO_CONST_CHAR_P
-
-#ifndef EQUAL_TO_STRING_P
-struct equal_to<std::string *>
-{
- bool operator()(const std::string *s1, const std::string *s2) const {
- return *s1 == *s2;
- }
-};
-#define EQUAL_TO_STRING_P
-#endif // EQUAL_TO_STRING_P
-
-#ifndef LESS_CONST_STRING_R
-struct less<const std::string &> {
- bool operator() (const std::string &s1, const std::string &s2) {
- return s1 < s2;
- }
-};
-#define LESS_CONST_STRING_R
-#endif // EQUAL_TO_STRING_P
-
-#endif // __stl_functors_h__
diff --git a/libs/pbd3/pbd/strsplit.h b/libs/pbd3/pbd/strsplit.h
deleted file mode 100644
index e55ad1c825..0000000000
--- a/libs/pbd3/pbd/strsplit.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __pbd_strplit_h__
-#define __pbd_strplit_h__
-
-#include <string>
-#include <vector>
-
-extern void split (std::string, std::vector<std::string>&, char);
-
-#endif // __pbd_strplit_h__
diff --git a/libs/pbd3/pbd/thread.h b/libs/pbd3/pbd/thread.h
deleted file mode 100644
index c1d5c3c78d..0000000000
--- a/libs/pbd3/pbd/thread.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __qm_thread_h__
-#define __qm_thread_h__
-
-#include <pthread.h>
-
-/* A generic base class for Quasimodo objects requiring their own
- thread to do work.
-*/
-
-class QMThread
-
-{
- public:
- QMThread (const char *name,
- void *(start)(void *), void *,
- bool realtime = false, int rt_priority = 10);
-
- virtual ~QMThread();
-
- int run ();
- void poke ();
- void pause ();
- void stop ();
- void *wait ();
-
- /* This doesn't guarantee anything about the state of
- the thread, but if you do things the right way, and
- make sure that the do_work() routine checks
- work_no_more() at the right times, and that the
- thread is awake, then calling this will cause
- the thread to exit fairly quickly.
- */
-
- void halt() { _must_exit = true ; }
-
- void exit (void *status);
- pthread_t thread_id() { return _thread; }
-
- bool thread_ok () { return _have_thread; }
- bool thread_active() { return _thread_active; }
-
- bool thread_running () {
- /* XXX not atomic */
- return _running && _thread_active;
- }
-
- bool thread_waiting () { return _thread_waiting; }
-
- static void try_to_kill_all_threads() {
- all_threads_must_die = true;
- }
-
- protected:
- void *main ();
-
- bool work_no_more () { return (!_running || _must_exit || all_threads_must_die); }
-
- bool myself () {
- return pthread_equal (_thread, pthread_self());
- }
-
- void suspend() {
- _running = false;
- }
-
- void lock (pthread_mutex_t *lock) {
- pthread_mutex_lock (lock);
- }
-
- void unlock (pthread_mutex_t *lock) {
- pthread_mutex_unlock (lock);
- }
-
- virtual void *do_work () = 0;
-
- private:
- const char *_name;
- bool _must_exit;
- bool _running;
- bool _thread_active;
- bool _thread_waiting;
- bool _have_thread;
-
- size_t work_cnt;
-
- pthread_mutex_t status_lock;
- pthread_cond_t wake_up; /* protected by status_lock */
- pthread_cond_t asleep; /* protected by status_lock */
- pthread_cond_t running; /* protected by status_lock */
- pthread_cond_t exited; /* protected by status_lock */
- pthread_t _thread;
-
- void lock () {
- pthread_mutex_lock (&status_lock);
- }
-
- void unlock () {
- pthread_mutex_unlock (&status_lock);
- }
-
- static bool all_threads_must_die;
-
- static void signal_catcher (int sig);
- void setup_signals ();
-};
-
-#endif // __qm_thread_h__
diff --git a/libs/pbd3/pbd/thrown_error.h b/libs/pbd3/pbd/thrown_error.h
deleted file mode 100644
index 83cf8acfac..0000000000
--- a/libs/pbd3/pbd/thrown_error.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-#ifndef __qm_thrown_error_h__
-#define __qm_thrown_error_h__
-
-#include "transmitter.h"
-
-#define SAFE_THROW(T) \
- T *sent = new T; \
- (*sent) << rdbuf(); \
- throw sent
-
-class ThrownError : public Transmitter {
- public:
- ThrownError () : Transmitter (Transmitter::Throw) {}
- protected:
- virtual void deliver () = 0;
-};
-
-#endif // __qm_thrown_error_h__
-
-
diff --git a/libs/pbd3/pbd/touchable.h b/libs/pbd3/pbd/touchable.h
deleted file mode 100644
index 0298574dfa..0000000000
--- a/libs/pbd3/pbd/touchable.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- Copyright (C) 1999 Paul Barton-Davis
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __pbd_touchable_h__
-#define __pbd_touchable_h__
-
-class Touchable
-{
- public:
- Touchable() : _delete_after_touch (false) {}
- virtual ~Touchable() {}
-
- void set_delete_after_touch (bool yn) { _delete_after_touch = yn; }
- bool delete_after_touch() const { return _delete_after_touch; }
-
- virtual void touch () = 0;
-
- protected:
- bool _delete_after_touch;
-};
-
-template<class T>
-class DynamicTouchable : public Touchable
-{
- public:
- DynamicTouchable (T& t, void (T::*m)(void))
- : object (t), method (m) { set_delete_after_touch (true); }
-
- void touch () {
- (object.*method)();
- }
-
- protected:
- T& object;
- void (T::*method)(void);
-};
-
-template<class T1, class T2>
-class DynamicTouchable1 : public Touchable
-{
- public:
- DynamicTouchable1 (T1& t, void (T1::*m)(T2), T2 a)
- : object (t), method (m), arg (a) { set_delete_after_touch (true); }
-
- void touch () {
- (object.*method)(arg);
- }
-
- protected:
- T1& object;
- void (T1::*method)(T2);
- T2 arg;
-};
-
-template<class T1, class T2, class T3>
-class DynamicTouchable2 : public Touchable
-{
- public:
- DynamicTouchable2 (T1& t, void (T1::*m)(T2, T3), T2 a1, T3 a2)
- : object (t), method (m), arg1 (a1), arg2 (a2) { set_delete_after_touch (true); }
-
- void touch () {
- (object.*method)(arg1, arg2);
- }
-
- protected:
- T1& object;
- void (T1::*method)(T2,T3);
- T2 arg1;
- T3 arg2;
-};
-
-#endif // __pbd_touchable_h__
diff --git a/libs/pbd3/pbd/transmitter.h b/libs/pbd3/pbd/transmitter.h
deleted file mode 100644
index 357cb9965f..0000000000
--- a/libs/pbd3/pbd/transmitter.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __libmisc_transmitter_h__
-#define __libmisc_transmitter_h__
-
-#include <sstream>
-#include <iostream>
-
-#include <sigc++/sigc++.h>
-
-using std::cout;
-using std::cerr;
-using std::endl;
-
-class Transmitter : public std::stringstream
-
-{
- public:
- enum Channel {
- Info,
- Error,
- Warning,
- Fatal,
- Throw
- };
-
- Transmitter (Channel);
-
- sigc::signal<void,Channel, const char *> &sender() {
- return *send;
- }
-
- bool does_not_return ();
-
- protected:
- virtual void deliver ();
- friend std::ostream& endmsg (std::ostream &);
-
- private:
- Channel channel;
- sigc::signal<void, Channel, const char *> *send;
-
- sigc::signal<void, Channel, const char *> info;
- sigc::signal<void, Channel, const char *> warning;
- sigc::signal<void, Channel, const char *> error;
- sigc::signal<void, Channel, const char *> fatal;
-};
-
-/* for EGCS 2.91.66, if this function is not compiled within the same
- compilation unit as the one where a ThrownError is thrown, then
- nothing will catch the error. This is a pretty small function, so
- inlining it here seems like a reasonable workaround.
-*/
-
-inline std::ostream &
-endmsg (std::ostream &ostr)
-
-{
- Transmitter *t;
-
- /* There is a serious bug in the Cygnus/GCC libstdc++ library:
- cout is not actually an ostream, but a trick was played
- to make the compiler think that it is. This will cause
- the dynamic_cast<> to fail with SEGV. So, first check to
- see if ostr == cout, and handle it specially.
- */
-
- if (&ostr == &cout) {
- cout << endl;
- return ostr;
- } else if (&ostr == &cerr) {
- cerr << endl;
- return ostr;
- }
-
- if ((t = dynamic_cast<Transmitter *> (&ostr)) != 0) {
- t->deliver ();
- } else {
- /* hmm. not a Transmitter, so just put a newline on
- it and assume that that will be enough.
- */
-
- ostr << endl;
- }
-
- return ostr;
-}
-
-
-extern "C" { void pbd_c_error (const char *); }
-
-#endif // __libmisc_transmitter_h__
diff --git a/libs/pbd3/pbd/types.h b/libs/pbd3/pbd/types.h
deleted file mode 100644
index 52f067fd04..0000000000
--- a/libs/pbd3/pbd/types.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- Copyright (C) 1999 Paul Barton-Davis
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __pbd_types_h__
-#define __pbd_types_h__
-
-typedef unsigned char byte;
-typedef char int8;
-typedef unsigned short uint16;
-typedef short int16;
-typedef unsigned int uint32;
-typedef int int32;
-typedef unsigned long long int uint64;
-typedef long long int int64;
-
-#endif // __pbd_types_h__
diff --git a/libs/pbd3/pbd/undo.h b/libs/pbd3/pbd/undo.h
deleted file mode 100644
index f067635ed3..0000000000
--- a/libs/pbd3/pbd/undo.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- Copyright (C) 2002 Brett Viren & Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __lib_pbd_undo_h__
-#define __lib_pbd_undo_h__
-
-#include <string>
-#include <list>
-#include <sigc++/slot.h>
-#include <sys/time.h>
-
-using std::string;
-using std::list;
-
-typedef sigc::slot<void> UndoAction;
-
-class UndoCommand
-{
- public:
- UndoCommand ();
- UndoCommand (const UndoCommand&);
- UndoCommand& operator= (const UndoCommand&);
-
- void clear ();
-
- void add_undo (const UndoAction&);
- void add_redo (const UndoAction&);
- void add_redo_no_execute (const UndoAction&);
-
- void undo();
- void redo();
-
- void set_name (const string& str) {
- _name = str;
- }
- const string& name() const { return _name; }
-
- void set_timestamp (struct timeval &t) {
- _timestamp = t;
- }
-
- const struct timeval& timestamp() const {
- return _timestamp;
- }
-
- private:
- list<UndoAction> redo_actions;
- list<UndoAction> undo_actions;
- struct timeval _timestamp;
- string _name;
-};
-
-class UndoHistory
-{
- public:
- UndoHistory() {}
- ~UndoHistory() {}
-
- void add (UndoCommand uc);
- void undo (unsigned int n);
- void redo (unsigned int n);
-
- unsigned long undo_depth() const { return UndoList.size(); }
- unsigned long redo_depth() const { return RedoList.size(); }
-
- string next_undo() const { return (UndoList.empty() ? string("") : UndoList.back().name()); }
- string next_redo() const { return (RedoList.empty() ? string("") : RedoList.back().name()); }
-
- void clear ();
- void clear_undo ();
- void clear_redo ();
-
- private:
- list<UndoCommand> UndoList;
- list<UndoCommand> RedoList;
-};
-
-
-#endif /* __lib_pbd_undo_h__ */
diff --git a/libs/pbd3/pbd/unescape.h b/libs/pbd3/pbd/unescape.h
deleted file mode 100644
index 6596a86113..0000000000
--- a/libs/pbd3/pbd/unescape.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __unescape_h__
-#define __unescape_h__
-
-void unescape (char *);
-
-#endif // __unescape_h__
diff --git a/libs/pbd3/pbd/whitespace.h b/libs/pbd3/pbd/whitespace.h
deleted file mode 100644
index 6620a8fb50..0000000000
--- a/libs/pbd3/pbd/whitespace.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __pbd_whitespace_h__
-#define __pbd_whitespace_h__
-
-#include <string>
-
-extern void strip_whitespace_edges (std::string& str);
-
-#endif // __pbd_whitespace_h__
diff --git a/libs/pbd3/pbd/xml++.h b/libs/pbd3/pbd/xml++.h
deleted file mode 100644
index afb896e1d5..0000000000
--- a/libs/pbd3/pbd/xml++.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/* xml++.h
- * libxml++ and this file are copyright (C) 2000 by Ari Johnson, and
- * are covered by the GNU Lesser General Public License, which should be
- * included with libxml++ as the file COPYING.
- */
-
-#include <string>
-#include <list>
-#include <map>
-#include <cstdio>
-#include <cstdarg>
-
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-
-#ifndef __XML_H
-#define __XML_H
-
-using std::string;
-using std::map;
-using std::list;
-
-class XMLTree;
-class XMLNode;
-class XMLProperty;
-
-typedef list<XMLNode *> XMLNodeList;
-typedef XMLNodeList::iterator XMLNodeIterator;
-typedef XMLNodeList::const_iterator XMLNodeConstIterator;
-typedef list<XMLProperty*> XMLPropertyList;
-typedef XMLPropertyList::iterator XMLPropertyIterator;
-typedef XMLPropertyList::const_iterator XMLPropertyConstIterator;
-typedef map<string, XMLProperty*> XMLPropertyMap;
-
-class XMLTree {
-private:
- string _filename;
- XMLNode *_root;
- int _compression;
- bool _initialized;
-
-public:
- XMLTree();
- XMLTree(const string &fn);
- XMLTree(const XMLTree *);
- ~XMLTree();
-
- bool initialized() const { return _initialized; };
- XMLNode *root() const { return _root; };
- XMLNode *set_root(XMLNode *n) { _initialized = true; return _root = n; };
-
- const string & filename() const { return _filename; };
- const string & set_filename(const string &fn) { return _filename = fn; };
-
- int compression() const { return _compression; };
- int set_compression(int);
-
- bool read();
- bool read(const string &fn) { set_filename(fn); return read(); };
- bool read_buffer(const string &);
-
- bool write() const;
- bool write(const string &fn) { set_filename(fn); return write(); };
-
- void debug (FILE*) const;
-
- const string & write_buffer() const;
-};
-
-class XMLNode {
-private:
- bool _initialized;
- string _name;
- bool _is_content;
- string _content;
- XMLNodeList _children;
- XMLPropertyList _proplist;
- XMLPropertyMap _propmap;
-
-public:
- XMLNode(const string &);
- XMLNode(const string &, const string &);
- XMLNode(const XMLNode&);
- ~XMLNode();
-
- bool initialized() const { return _initialized; };
- const string name() const { return _name; };
-
- bool is_content() const { return _is_content; };
- const string & content() const { return _content; };
- const string & set_content(const string &);
- XMLNode *add_content(const string & = string());
-
- const XMLNodeList & children(const string & = string()) const;
- XMLNode *add_child(const char *);
- XMLNode *add_child_copy(const XMLNode&);
- void add_child_nocopy (XMLNode&);
-
- const XMLPropertyList & properties() const { return _proplist; };
- XMLProperty *property(const char * );
- const XMLProperty *property(const char * n) const
- { return ((XMLNode *) this)->property(n); };
- XMLProperty *add_property(const char *, const string &);
- XMLProperty *add_property(const char *, const char * = "");
-
- void remove_property(const string &);
-
- /** Remove all nodes with the name passed to remove_nodes */
- void remove_nodes(const string &);
- /** Remove and delete all nodes with the name passed to remove_nodes */
- void remove_nodes_and_delete(const string &);
-};
-
-class XMLProperty {
-private:
- string _name;
- string _value;
-
-public:
- XMLProperty(const string &n, const string &v = string());
- ~XMLProperty();
-
- const string & name() const { return _name; };
- const string & value() const { return _value; };
- const string & set_value(const string &v) { return _value = v; };
-};
-
-#endif /* __XML_H */
-
diff --git a/libs/pbd3/pool.cc b/libs/pbd3/pool.cc
deleted file mode 100644
index 089766482d..0000000000
--- a/libs/pbd3/pool.cc
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#include <iostream>
-#include <vector>
-
-#include <pbd/pool.h>
-#include <pbd/error.h>
-
-using namespace std;
-using namespace PBD;
-
-Pool::Pool (string n, unsigned long item_size, unsigned long nitems)
-{
- _name = n;
-
- free_list = new RingBuffer<void*> (nitems);
-
- /* since some overloaded ::operator new() might use this,
- its important that we use a "lower level" allocator to
- get more space.
- */
-
- block = malloc (nitems * item_size);
-
- void **ptrlist = (void **) malloc (sizeof (void *) * nitems);
-
- for (unsigned long i = 0; i < nitems; i++) {
- ptrlist[i] = static_cast<void *> (static_cast<char*>(block) + (i * item_size));
- }
-
- free_list->write (ptrlist, nitems);
-
- free (ptrlist);
-}
-
-Pool::~Pool ()
-{
- free (block);
-}
-
-void *
-Pool::alloc ()
-{
- void *ptr;
-
-// cerr << _name << " pool " << " alloc, thread = " << pthread_name() << " space = " << free_list->read_space() << endl;
-
- if (free_list->read (&ptr, 1) < 1) {
- fatal << "CRITICAL: " << _name << " POOL OUT OF MEMORY - RECOMPILE WITH LARGER SIZE!!" << endmsg;
- /*NOTREACHED*/
- return 0;
- } else {
- return ptr;
- }
-};
-
-void
-Pool::release (void *ptr)
-{
- free_list->write (&ptr, 1);
-// cerr << _name << ": release, now has " << free_list->read_space() << endl;
-}
-
-/*---------------------------------------------*/
-
-MultiAllocSingleReleasePool::MultiAllocSingleReleasePool (string n, unsigned long isize, unsigned long nitems)
- : Pool (n, isize, nitems),
- m_lock(0)
-{
-}
-
-MultiAllocSingleReleasePool::~MultiAllocSingleReleasePool ()
-{
- if(m_lock) delete m_lock;
-}
-
-SingleAllocMultiReleasePool::SingleAllocMultiReleasePool (string n, unsigned long isize, unsigned long nitems)
- : Pool (n, isize, nitems),
- m_lock(0)
-{
-}
-
-SingleAllocMultiReleasePool::~SingleAllocMultiReleasePool ()
-{
- if(m_lock) delete m_lock;
-}
-
-void*
-MultiAllocSingleReleasePool::alloc ()
-{
- void *ptr;
- if(!m_lock) {
- m_lock = new Glib::Mutex();
- // umm, I'm not sure that this doesn't also allocate memory.
- if(!m_lock) error << "cannot create Glib::Mutex in pool.cc" << endmsg;
- }
-
- Glib::Mutex::Lock guard(*m_lock);
- ptr = Pool::alloc ();
- return ptr;
-}
-
-void
-MultiAllocSingleReleasePool::release (void* ptr)
-{
- Pool::release (ptr);
-}
-
-void*
-SingleAllocMultiReleasePool::alloc ()
-{
- return Pool::alloc ();
-}
-
-void
-SingleAllocMultiReleasePool::release (void* ptr)
-{
- if(!m_lock) {
- m_lock = new Glib::Mutex();
- // umm, I'm not sure that this doesn't also allocate memory.
- if(!m_lock) error << "cannot create Glib::Mutex in pool.cc" << endmsg;
- }
- Glib::Mutex::Lock guard(*m_lock);
- Pool::release (ptr);
-}
-
diff --git a/libs/pbd3/pthread_utils.cc b/libs/pbd3/pthread_utils.cc
deleted file mode 100644
index db242cea7b..0000000000
--- a/libs/pbd3/pthread_utils.cc
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- Copyright (C) 2002 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#include <map>
-#include <iostream>
-#include <string>
-#include <stdint.h>
-
-#include <pbd/pthread_utils.h>
-
-using namespace std;
-
-typedef std::map<string,pthread_t> ThreadMap;
-static ThreadMap all_threads;
-static pthread_mutex_t thread_map_lock = PTHREAD_MUTEX_INITIALIZER;
-
-namespace PBD {
- sigc::signal<void,pthread_t,std::string> ThreadCreated;
- sigc::signal<void,pthread_t,std::string,uint32_t> ThreadCreatedWithRequestSize;
-}
-
-using namespace PBD;
-
-int
-pthread_create_and_store (string name, pthread_t *thread, pthread_attr_t *attr, void * (*start_routine)(void *), void * arg)
-{
- int ret;
-
- if ((ret = pthread_create (thread, attr, start_routine, arg)) == 0) {
- std::pair<string,pthread_t> newpair;
- newpair.first = name;
- newpair.second = *thread;
-
- pthread_mutex_lock (&thread_map_lock);
- all_threads.insert (newpair);
-
- pthread_mutex_unlock (&thread_map_lock);
- }
-
- return ret;
-}
-
-string
-pthread_name ()
-{
- pthread_t self = pthread_self();
- string str;
-
- pthread_mutex_lock (&thread_map_lock);
- for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
- if (i->second == self) {
- str = i->first;
- pthread_mutex_unlock (&thread_map_lock);
- return str;
- }
- }
- pthread_mutex_unlock (&thread_map_lock);
- return "unknown";
-}
-
-void
-pthread_kill_all (int signum)
-{
- pthread_mutex_lock (&thread_map_lock);
- for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
- if (i->second != pthread_self()) {
- pthread_kill (i->second, signum);
- }
- }
- all_threads.clear();
- pthread_mutex_unlock (&thread_map_lock);
-}
-
-void
-pthread_cancel_all ()
-{
- pthread_mutex_lock (&thread_map_lock);
- for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
- if (i->second != pthread_self()) {
- pthread_cancel (i->second);
- }
- }
- all_threads.clear();
- pthread_mutex_unlock (&thread_map_lock);
-}
-
-void
-pthread_cancel_one (pthread_t thread)
-{
- pthread_mutex_lock (&thread_map_lock);
- for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
- if (i->second == thread) {
- all_threads.erase (i);
- break;
- }
- }
-
- pthread_cancel (thread);
- pthread_mutex_unlock (&thread_map_lock);
-}
-
-void
-pthread_exit_pbd (void* status)
-{
- pthread_t thread = pthread_self();
-
- pthread_mutex_lock (&thread_map_lock);
- for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
- if (i->second == thread) {
- all_threads.erase (i);
- break;
- }
- }
- pthread_mutex_unlock (&thread_map_lock);
- pthread_exit (status);
-}
diff --git a/libs/pbd3/receiver.cc b/libs/pbd3/receiver.cc
deleted file mode 100644
index 5e7c10de70..0000000000
--- a/libs/pbd3/receiver.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#include <vector>
-
-#include <pbd/receiver.h>
-#include <pbd/transmitter.h>
-
-using namespace sigc;
-
-Receiver::Receiver () {}
-
-Receiver::~Receiver ()
-
-{
- hangup ();
-}
-
-void
-Receiver::hangup ()
-{
- vector<sigc::connection *>::iterator i;
-
- for (i = connections.begin(); i != connections.end (); i++) {
- (*i)->disconnect ();
- delete *i;
- }
-
- connections.erase (connections.begin(), connections.end());
-}
-
-void
-Receiver::listen_to (Transmitter &transmitter)
-
-{
- sigc::connection *c = new sigc::connection;
-
- (*c) = transmitter.sender().connect(mem_fun(*this, &Receiver::receive));
-
- connections.push_back (c);
-}
diff --git a/libs/pbd3/stacktrace.cc b/libs/pbd3/stacktrace.cc
deleted file mode 100644
index 1e7dfa08e9..0000000000
--- a/libs/pbd3/stacktrace.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <pbd/stacktrace.h>
-#include <iostream>
-
-/* Obtain a backtrace and print it to stdout. */
-
-#ifdef HAVE_EXECINFO
-
-#include <execinfo.h>
-#include <stdlib.h>
-
-void
-PBD::stacktrace (std::ostream& out)
-{
- void *array[200];
- size_t size;
- char **strings;
- size_t i;
-
- size = backtrace (array, 200);
- strings = backtrace_symbols (array, size);
-
- if (strings) {
-
- printf ("Obtained %zd stack frames.\n", size);
-
- for (i = 0; i < size; i++) {
- out << strings[i] << std::endl;
- }
-
- free (strings);
- }
-}
-
-#else
-
-void
-PBD::stacktrace (std::ostream& out)
-{
- out << "stack tracing is not enabled on this platform" << std::endl;
-}
-
-#endif /* HAVE_EXECINFO */
diff --git a/libs/pbd3/strsplit.cc b/libs/pbd3/strsplit.cc
deleted file mode 100644
index 7f29a77887..0000000000
--- a/libs/pbd3/strsplit.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <pbd/strsplit.h>
-
-using namespace std;
-
-void
-split (string str, vector<string>& result, char splitchar)
-{
- string::size_type pos;
- string remaining;
- string::size_type len = str.length();
- int cnt;
-
- cnt = 0;
-
- if (str.empty()) {
- return;
- }
-
- for (string::size_type n = 0; n < len; ++n) {
- if (str[n] == splitchar) {
- cnt++;
- }
- }
-
- if (cnt == 0) {
- result.push_back (str);
- return;
- }
-
- remaining = str;
-
- while ((pos = remaining.find_first_of (':')) != string::npos) {
- result.push_back (remaining.substr (0, pos));
- remaining = remaining.substr (pos+1);
- }
-
- if (remaining.length()) {
-
- result.push_back (remaining);
- }
-}
diff --git a/libs/pbd3/textreceiver.cc b/libs/pbd3/textreceiver.cc
deleted file mode 100644
index 43620e9830..0000000000
--- a/libs/pbd3/textreceiver.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#include <iostream>
-#include <cstdlib>
-
-#include <pbd/textreceiver.h>
-
-TextReceiver::TextReceiver (const string &n)
-
-{
- name = n;
-}
-
-void
-TextReceiver::receive (Transmitter::Channel chn, const char *str)
-
-{
- const char *prefix = "";
-
- switch (chn) {
- case Transmitter::Error:
- prefix = ": [ERROR]: ";
- break;
- case Transmitter::Info:
- prefix = ": [INFO]: ";
- break;
- case Transmitter::Warning:
- prefix = ": [WARNING]: ";
- break;
- case Transmitter::Fatal:
- prefix = ": [FATAL]: ";
- break;
- case Transmitter::Throw:
- /* this isn't supposed to happen */
- abort ();
- }
-
- /* note: iostreams are already thread-safe: no external
- lock required.
- */
-
- cout << name << prefix << str << endl;
-
- if (chn == Transmitter::Fatal) {
- exit (9);
- }
-}
-
diff --git a/libs/pbd3/transmitter.cc b/libs/pbd3/transmitter.cc
deleted file mode 100644
index 876a9d86e5..0000000000
--- a/libs/pbd3/transmitter.cc
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#include <cstdlib>
-#include <signal.h>
-#include <iostream>
-#include <string>
-
-#include <pbd/transmitter.h>
-#include <pbd/error.h>
-
-using std::string;
-using std::ios;
-
-Transmitter::Transmitter (Channel c)
-{
- channel = c;
- switch (c) {
- case Error:
- send = &error;
- break;
- case Warning:
- send = &warning;
- break;
- case Info:
- send = &info;
- break;
- case Fatal:
- send = &fatal;
- break;
- case Throw:
- /* we should never call Transmitter::deliver
- for thrown messages (because its overridden in the
- class heirarchy). force a segv if we do.
- */
- send = 0;
- break;
- }
-}
-
-void
-Transmitter::deliver ()
-
-{
- string foo;
-
- /* NOTE: this is just a default action for a Transmitter or a
- derived class. Any class can override this to produce some
- other action when deliver() is called.
- */
-
- *this << '\0';
-
- /* send the SigC++ signal */
-
- foo = str();
- (*send) (channel, foo.c_str());
-
- /* XXX when or how can we delete this ? */
- // delete foo;
-
- /* return to a pristine state */
-
- clear ();
- seekp (0, ios::beg);
- seekg (0, ios::beg);
-
- /* do the right thing if this should not return */
-
- if (does_not_return()) {
- sigset_t mask;
-
- sigemptyset (&mask);
- sigsuspend (&mask);
- /*NOTREACHED*/
- exit (1);
- }
-}
-
-bool
-Transmitter::does_not_return ()
-
-{
- if (channel == Fatal || channel == Throw) {
- return true;
- } else {
- return false;
- }
-}
-
-
-extern "C" {
- void pbd_c_error (const char *str)
-
- {
- PBD::error << str << endmsg;
- }
-}
diff --git a/libs/pbd3/undo.cc b/libs/pbd3/undo.cc
deleted file mode 100644
index f2f11b1c5c..0000000000
--- a/libs/pbd3/undo.cc
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- Copyright (C) 2001 Brett Viren & Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#include <iostream>
-
-#include <pbd/undo.h>
-
-using namespace std;
-using namespace sigc;
-
-UndoCommand::UndoCommand ()
-{
-}
-
-UndoCommand::UndoCommand (const UndoCommand& rhs)
-{
- _name = rhs._name;
- clear ();
- undo_actions.insert(undo_actions.end(),rhs.undo_actions.begin(),rhs.undo_actions.end());
- redo_actions.insert(redo_actions.end(),rhs.redo_actions.begin(),rhs.redo_actions.end());
-}
-
-UndoCommand&
-UndoCommand::operator= (const UndoCommand& rhs)
-{
- if (this == &rhs) return *this;
- _name = rhs._name;
- clear ();
- undo_actions.insert(undo_actions.end(),rhs.undo_actions.begin(),rhs.undo_actions.end());
- redo_actions.insert(redo_actions.end(),rhs.redo_actions.begin(),rhs.redo_actions.end());
- return *this;
-}
-
-void
-UndoCommand::add_undo (const UndoAction& action)
-{
- undo_actions.push_back (action);
-}
-
-void
-UndoCommand::add_redo (const UndoAction& action)
-{
- redo_actions.push_back (action);
- redo_actions.back()(); // operator()
-}
-
-void
-UndoCommand::add_redo_no_execute (const UndoAction& action)
-{
- redo_actions.push_back (action);
-}
-
-void
-UndoCommand::clear ()
-{
- undo_actions.clear ();
- redo_actions.clear ();
-}
-
-void
-UndoCommand::undo ()
-{
- cerr << "Undo " << _name << endl;
- for (list<UndoAction>::reverse_iterator i = undo_actions.rbegin(); i != undo_actions.rend(); ++i) {
- (*i)();
- }
-}
-
-void
-UndoCommand::redo ()
-{
- cerr << "Redo " << _name << endl;
- for (list<UndoAction>::iterator i = redo_actions.begin(); i != redo_actions.end(); ++i) {
- (*i)();
- }
-}
-
-void
-UndoHistory::add (UndoCommand uc)
-{
- UndoList.push_back (uc);
-}
-
-void
-UndoHistory::undo (unsigned int n)
-{
- while (n--) {
- if (UndoList.size() == 0) {
- return;
- }
- UndoCommand uc = UndoList.back ();
- UndoList.pop_back ();
- uc.undo ();
- RedoList.push_back (uc);
- }
-}
-
-void
-UndoHistory::redo (unsigned int n)
-{
- while (n--) {
- if (RedoList.size() == 0) {
- return;
- }
- UndoCommand cmd = RedoList.back ();
- RedoList.pop_back ();
- cmd.redo ();
- UndoList.push_back (cmd);
- }
-}
-
-void
-UndoHistory::clear_redo ()
-{
- RedoList.clear ();
-}
-
-void
-UndoHistory::clear_undo ()
-{
- UndoList.clear ();
-}
-
-void
-UndoHistory::clear ()
-{
- RedoList.clear ();
- UndoList.clear ();
-}
diff --git a/libs/pbd3/unescape.cc b/libs/pbd3/unescape.cc
deleted file mode 100644
index 2c79740e4a..0000000000
--- a/libs/pbd3/unescape.cc
+++ /dev/null
@@ -1,137 +0,0 @@
-#include <cstdlib>
-
-#include <pbd/unescape.h>
-
-void
-unescape (char *str)
-
-{
- char *p;
- bool escaped;
- long offset;
- char octal[4];
- int noct;
- char hex[3];
- int nhex;
-
- escaped = false;
- offset = 0;
- octal[3] = '\0';
- hex[2] = '\0';
-
- p = str;
-
- while (*p) {
- if (!escaped) {
- if (*p == '\\') {
- escaped = true;
- } else {
- *(p-offset) = *p;
- }
- p++;
- continue;
- }
-
- switch (*p) {
- case 'f':
- offset++;
- *(p-offset) = '\f';
- break;
- case 'r':
- offset++;
- *(p-offset) = '\r';
- break;
-
- case 'v':
- offset++;
- *(p-offset) = '\v';
- break;
-
- case 'n':
- offset++;
- *(p-offset) = '\n';
- break;
-
- case 't':
- offset++;
- *(p-offset) = '\t';
- break;
-
- case 'b':
- offset++;
- *(p-offset) = '\b';
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- noct = 0;
- while (noct < 3 &&
- (*p >= '0' && *p <= '7')) {
- octal[noct++] = *p;
- offset++;
- p++;
- }
- p--;
- *(p-offset) = strtol (octal, 0, 8);
- break;
-
- case 'x':
- nhex = 0;
- p++;
- offset++;
-
- while (nhex < 2 &&
- ((*p >= '0' && *p <= '9') ||
- (*p >= 'a' && *p <= 'f') ||
- (*p >= 'A' && *p <= 'F'))) {
- hex[nhex++] = *p;
- offset++;
- p++;
- }
- p--;
- *(p-offset) = strtol (hex, 0, 16);
- break;
-
- case '\\':
- offset++;
- *(p-offset) = '\\';
- break;
-
- case '"':
- offset++;
- *(p-offset) = '"';
- break;
-
- case '\'':
- offset++;
- *(p-offset) = '\'';
- break;
-
- default:
- *(p-offset) = *p;
- }
-
- escaped = false;
- p++;
- }
-
- *(p-offset) = '\0';
-}
-
-#ifdef TEST
-#include <cstdio>
-
-main (int argc, char *argv[])
-
-{
- unescape (argv[1]);
- printf ("%s\n", argv[1]);
-}
-
-#endif
diff --git a/libs/pbd3/whitespace.cc b/libs/pbd3/whitespace.cc
deleted file mode 100644
index 7f74940457..0000000000
--- a/libs/pbd3/whitespace.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <pbd/whitespace.h>
-
-using namespace std;
-
-void
-strip_whitespace_edges (string& str)
-{
- string::size_type i;
- string::size_type len;
- string::size_type s;
-
- len = str.length();
-
- for (i = 0; i < len; ++i) {
- if (isgraph (str[i])) {
- break;
- }
- }
-
- s = i;
-
- for (i = len - 1; i >= 0; --i) {
- if (isgraph (str[i])) {
- break;
- }
- }
-
- str = str.substr (s, (i - s) + 1);
-}
-
diff --git a/libs/pbd3/xml++.cc b/libs/pbd3/xml++.cc
deleted file mode 100644
index e496d8b2fd..0000000000
--- a/libs/pbd3/xml++.cc
+++ /dev/null
@@ -1,422 +0,0 @@
-/* xml++.cc
- * libxml++ and this file are copyright (C) 2000 by Ari Johnson, and
- * are covered by the GNU Lesser General Public License, which should be
- * included with libxml++ as the file COPYING.
- */
-
-#include <pbd/xml++.h>
-#include <libxml/debugXML.h>
-
-static XMLNode *readnode(xmlNodePtr);
-static void writenode(xmlDocPtr, XMLNode *, xmlNodePtr, int);
-
-XMLTree::XMLTree()
- : _filename(),
- _root(),
- _compression(0),
- _initialized(false)
-{
-}
-
-XMLTree::XMLTree(const string &fn)
- : _filename(fn),
- _root(0),
- _compression(0),
- _initialized(false)
-{
- read();
-}
-
-XMLTree::XMLTree(const XMLTree * from)
-{
- _filename = from->filename();
- _root = new XMLNode(*from->root());
- _compression = from->compression();
- _initialized = true;
-}
-
-XMLTree::~XMLTree()
-{
- if (_initialized && _root)
- delete _root;
-}
-
-int
-XMLTree::set_compression(int c)
-{
- if (c > 9)
- c = 9;
-
- if (c < 0)
- c = 0;
-
- _compression = c;
-
- return _compression;
-}
-
-bool
-XMLTree::read(void)
-{
- xmlDocPtr doc;
-
- if (_root) {
- delete _root;
- _root = 0;
- }
-
- xmlKeepBlanksDefault(0);
-
- doc = xmlParseFile(_filename.c_str());
- if (!doc) {
- _initialized = false;
- return false;
- }
-
- _root = readnode(xmlDocGetRootElement(doc));
- xmlFreeDoc(doc);
- _initialized = true;
-
- return true;
-}
-
-bool
-XMLTree::read_buffer(const string & buffer)
-{
- xmlDocPtr doc;
-
- _filename = "";
-
- if (_root) {
- delete _root;
- _root = 0;
- }
-
- doc = xmlParseMemory((char *) buffer.c_str(), buffer.length());
- if (!doc) {
- _initialized = false;
- return false;
- }
-
- _root = readnode(xmlDocGetRootElement(doc));
- xmlFreeDoc(doc);
- _initialized = true;
-
- return true;
-}
-
-bool
-XMLTree::write(void) const
-{
- xmlDocPtr doc;
- XMLNodeList children;
- int result;
-
- xmlKeepBlanksDefault(0);
- doc = xmlNewDoc((xmlChar *) "1.0");
- xmlSetDocCompressMode(doc, _compression);
- writenode(doc, _root, doc->children, 1);
- result = xmlSaveFormatFile(_filename.c_str(), doc, 1);
- xmlFreeDoc(doc);
-
- if (result == -1)
- return false;
-
- return true;
-}
-
-void
-XMLTree::debug(FILE* out) const
-{
- xmlDocPtr doc;
- XMLNodeList children;
-
- xmlKeepBlanksDefault(0);
- doc = xmlNewDoc((xmlChar *) "1.0");
- xmlSetDocCompressMode(doc, _compression);
- writenode(doc, _root, doc->children, 1);
- xmlDebugDumpDocument (out, doc);
- xmlFreeDoc(doc);
-}
-
-const string &
-XMLTree::write_buffer(void) const
-{
- static string retval;
- char *ptr;
- int len;
- xmlDocPtr doc;
- XMLNodeList children;
-
- xmlKeepBlanksDefault(0);
- doc = xmlNewDoc((xmlChar *) "1.0");
- xmlSetDocCompressMode(doc, _compression);
- writenode(doc, _root, doc->children, 1);
- xmlDocDumpMemory(doc, (xmlChar **) & ptr, &len);
- xmlFreeDoc(doc);
-
- retval = ptr;
-
- free(ptr);
-
- return retval;
-}
-
-XMLNode::XMLNode(const string & n)
- : _name(n), _is_content(false), _content(string())
-{
-
- if (_name.empty())
- _initialized = false;
- else
- _initialized = true;
-}
-
-XMLNode::XMLNode(const string & n, const string & c)
- :_name(string()), _is_content(true), _content(c)
-{
- _initialized = true;
-}
-
-XMLNode::XMLNode(const XMLNode& from)
- : _initialized(false)
-{
- XMLPropertyList props;
- XMLPropertyIterator curprop;
- XMLNodeList nodes;
- XMLNodeIterator curnode;
-
- _name = from.name();
- set_content(from.content());
-
- props = from.properties();
- for (curprop = props.begin(); curprop != props.end(); curprop++)
- add_property((*curprop)->name().c_str(), (*curprop)->value());
-
- nodes = from.children();
- for (curnode = nodes.begin(); curnode != nodes.end(); curnode++)
- add_child_copy(**curnode);
-}
-
-XMLNode::~XMLNode()
-{
- XMLNodeIterator curchild;
- XMLPropertyIterator curprop;
-
- for (curchild = _children.begin(); curchild != _children.end();
- curchild++)
- delete *curchild;
-
- for (curprop = _proplist.begin(); curprop != _proplist.end();
- curprop++)
- delete *curprop;
-}
-
-const string &
-XMLNode::set_content(const string & c)
-{
- if (c.empty())
- _is_content = false;
- else
- _is_content = true;
-
- _content = c;
-
- return _content;
-}
-
-const XMLNodeList &
-XMLNode::children(const string & n) const
-{
- static XMLNodeList retval;
- XMLNodeConstIterator cur;
-
- if (n.length() == 0)
- return _children;
-
- retval.erase(retval.begin(), retval.end());
-
- for (cur = _children.begin(); cur != _children.end(); cur++)
- if ((*cur)->name() == n)
- retval.insert(retval.end(), *cur);
-
- return retval;
-}
-
-XMLNode *
-XMLNode::add_child(const char * n)
-{
- return add_child_copy(XMLNode (n));
-}
-
-void
-XMLNode::add_child_nocopy (XMLNode& n)
-{
- _children.insert(_children.end(), &n);
-}
-
-XMLNode *
-XMLNode::add_child_copy(const XMLNode& n)
-{
- XMLNode *copy = new XMLNode (n);
- _children.insert(_children.end(), copy);
- return copy;
-}
-
-XMLNode *
-XMLNode::add_content(const string & c)
-{
- return add_child_copy(XMLNode (string(), c));
-}
-
-XMLProperty *
-XMLNode::property(const char * n)
-{
- string ns(n);
- if (_propmap.find(ns) == _propmap.end())
- return 0;
- return _propmap[ns];
-}
-
-XMLProperty *
-XMLNode::add_property(const char * n, const string & v)
-{
- string ns(n);
- if(_propmap.find(ns) != _propmap.end()){
- remove_property(ns);
- }
-
- XMLProperty *tmp = new XMLProperty(ns, v);
-
- if (!tmp)
- return 0;
-
- _propmap[tmp->name()] = tmp;
- _proplist.insert(_proplist.end(), tmp);
-
- return tmp;
-}
-
-XMLProperty *
-XMLNode::add_property(const char * n, const char * v)
-{
- string vs(v);
- return add_property(n, vs);
-}
-
-void
-XMLNode::remove_property(const string & n)
-{
- if (_propmap.find(n) != _propmap.end()) {
- _proplist.remove(_propmap[n]);
- _propmap.erase(n);
- }
-}
-
-void
-XMLNode::remove_nodes(const string & n)
-{
- XMLNodeIterator i = _children.begin();
- XMLNodeIterator tmp;
-
- while (i != _children.end()) {
- tmp = i;
- ++tmp;
- if ((*i)->name() == n) {
- _children.erase (i);
- }
- i = tmp;
- }
-}
-
-void
-XMLNode::remove_nodes_and_delete(const string & n)
-{
- XMLNodeIterator i = _children.begin();
- XMLNodeIterator tmp;
-
- while (i != _children.end()) {
- tmp = i;
- ++tmp;
- if ((*i)->name() == n) {
- delete *i;
- _children.erase (i);
- }
- i = tmp;
- }
-}
-
-XMLProperty::XMLProperty(const string &n, const string &v)
- : _name(n),
- _value(v)
-{
-}
-
-XMLProperty::~XMLProperty()
-{
-}
-
-static XMLNode *
-readnode(xmlNodePtr node)
-{
- string name, content;
- xmlNodePtr child;
- XMLNode *tmp;
- xmlAttrPtr attr;
-
- if (node->name)
- name = (char *) node->name;
-
- tmp = new XMLNode(name);
-
- for (attr = node->properties; attr; attr = attr->next) {
- content = "";
- if (attr->children)
- content = (char *) attr->children->content;
- tmp->add_property((char *) attr->name, content);
- }
-
- if (node->content)
- tmp->set_content((char *) node->content);
- else
- tmp->set_content(string());
-
- for (child = node->children; child; child = child->next)
- tmp->add_child_nocopy (*readnode(child));
-
- return tmp;
-}
-
-static void
-writenode(xmlDocPtr doc, XMLNode * n, xmlNodePtr p, int root =
- 0)
-{
- XMLPropertyList props;
- XMLPropertyIterator curprop;
- XMLNodeList children;
- XMLNodeIterator curchild;
- xmlNodePtr node;
-
- if (root)
- node = doc->children =
- xmlNewDocNode(doc, 0, (xmlChar *) n->name().c_str(), 0);
-
- else
- node = xmlNewChild(p, 0, (xmlChar *) n->name().c_str(), 0);
-
- if (n->is_content()) {
- node->type = XML_TEXT_NODE;
- xmlNodeSetContentLen(node, (const xmlChar *) n->content().c_str(),
- n->content().length());
- }
-
- props = n->properties();
- for (curprop = props.begin(); curprop != props.end(); curprop++)
- xmlSetProp(node, (xmlChar *) (*curprop)->name().c_str(),
- (xmlChar *) (*curprop)->value().c_str());
-
- children = n->children();
- for (curchild = children.begin(); curchild != children.end();
- curchild++)
- writenode(doc, *curchild, node);
-}
diff --git a/libs/surfaces/control_protocol/control_protocol/control_protocol.h b/libs/surfaces/control_protocol/control_protocol/control_protocol.h
index 69135f2b4b..2bd23f5b48 100644
--- a/libs/surfaces/control_protocol/control_protocol/control_protocol.h
+++ b/libs/surfaces/control_protocol/control_protocol/control_protocol.h
@@ -26,7 +26,7 @@
#include <vector>
#include <list>
#include <sigc++/sigc++.h>
-
+#include <pbd/stateful.h>
#include <control_protocol/basic_ui.h>
namespace ARDOUR {
@@ -34,7 +34,7 @@ namespace ARDOUR {
class Route;
class Session;
-class ControlProtocol : public sigc::trackable, public BasicUI {
+class ControlProtocol : public sigc::trackable, public Stateful, public BasicUI {
public:
ControlProtocol (Session&, std::string name);
virtual ~ControlProtocol();
diff --git a/libs/surfaces/generic_midi/SConscript b/libs/surfaces/generic_midi/SConscript
index 213a81a99d..f9c2de08f8 100644
--- a/libs/surfaces/generic_midi/SConscript
+++ b/libs/surfaces/generic_midi/SConscript
@@ -23,6 +23,7 @@ genericmidi.Append(POTFILE = domain + '.pot')
genericmidi_files=Split("""
interface.cc
generic_midi_control_protocol.cc
+midicontrollable.cc
""")
genericmidi.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc
index 5eac060fb7..4a8c2728c6 100644
--- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc
+++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc
@@ -1,20 +1,65 @@
+/*
+ Copyright (C) 2006 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <algorithm>
+
+#include <pbd/error.h>
+#include <pbd/failed_constructor.h>
+
#include <midi++/port.h>
+#include <midi++/manager.h>
+#include <midi++/port_request.h>
#include <ardour/route.h>
#include <ardour/session.h>
#include "generic_midi_control_protocol.h"
+#include "midicontrollable.h"
using namespace ARDOUR;
+using namespace PBD;
#include "i18n.h"
GenericMidiControlProtocol::GenericMidiControlProtocol (Session& s)
: ControlProtocol (s, _("GenericMIDI"))
{
- _port = s.midi_port();
- s.MIDI_PortChanged.connect (mem_fun (*this, &GenericMidiControlProtocol::port_change));
+ MIDI::Manager* mm = MIDI::Manager::instance();
+
+ /* XXX it might be nice to run "control" through i18n, but thats a bit tricky because
+ the name is defined in ardour.rc which is likely not internationalized.
+ */
+ _port = mm->port (X_("control"));
+
+ if (_port == 0) {
+ error << _("no MIDI port named \"control\" exists - generic MIDI control disabled") << endmsg;
+ throw failed_constructor();
+ }
+
+ _feedback_interval = 10000; // microseconds
+ last_feedback_time = 0;
+
+ Controllable::StartLearning.connect (mem_fun (*this, &GenericMidiControlProtocol::start_learning));
+ Controllable::StopLearning.connect (mem_fun (*this, &GenericMidiControlProtocol::stop_learning));
+ Session::SendFeedback.connect (mem_fun (*this, &GenericMidiControlProtocol::send_feedback));
}
GenericMidiControlProtocol::~GenericMidiControlProtocol ()
@@ -24,42 +69,166 @@ GenericMidiControlProtocol::~GenericMidiControlProtocol ()
int
GenericMidiControlProtocol::set_active (bool yn)
{
- /* start delivery/outbound thread */
+ /* start/stop delivery/outbound thread */
return 0;
}
void
-GenericMidiControlProtocol::port_change ()
+GenericMidiControlProtocol::set_feedback_interval (microseconds_t ms)
{
- _port = session->midi_port ();
+ _feedback_interval = ms;
}
-void
-GenericMidiControlProtocol::set_port (MIDI::Port* p)
+void
+GenericMidiControlProtocol::send_feedback ()
{
- _port = p;
+ microseconds_t now = get_microseconds ();
+
+ if (last_feedback_time != 0) {
+ if ((now - last_feedback_time) < _feedback_interval) {
+ return;
+ }
+ }
+
+ _send_feedback ();
+
+ last_feedback_time = now;
}
void
-GenericMidiControlProtocol::send_route_feedback (list<Route*>& routes)
+GenericMidiControlProtocol::_send_feedback ()
{
- if (_port != 0) {
-
- const int32_t bufsize = 16 * 1024;
- MIDI::byte buf[bufsize];
- int32_t bsize = bufsize;
- MIDI::byte* end = buf;
-
- for (list<Route*>::iterator r = routes.begin(); r != routes.end(); ++r) {
- end = (*r)->write_midi_feedback (end, bsize);
+ const int32_t bufsize = 16 * 1024;
+ MIDI::byte buf[bufsize];
+ int32_t bsize = bufsize;
+ MIDI::byte* end = buf;
+
+ for (MIDIControllables::iterator r = controllables.begin(); r != controllables.end(); ++r) {
+ end = (*r)->write_feedback (end, bsize);
+ }
+
+ if (end == buf) {
+ return;
+ }
+
+ // FIXME
+ //_port->write (buf, (int32_t) (end - buf));
+}
+
+bool
+GenericMidiControlProtocol::start_learning (Controllable* c)
+{
+ if (c == 0) {
+ return false;
+ }
+
+ MIDIControllable* mc = new MIDIControllable (*_port, *c);
+
+ {
+ Glib::Mutex::Lock lm (pending_lock);
+ std::pair<MIDIControllables::iterator,bool> result;
+ result = pending_controllables.insert (mc);
+ if (result.second) {
+ c->LearningFinished.connect (bind (mem_fun (*this, &GenericMidiControlProtocol::learning_stopped), mc));
}
-
- if (end == buf) {
- return;
- }
-
- _port->write (buf, 0, (int32_t) (end - buf));
- //cerr << "MIDI feedback: wrote " << (int32_t) (end - buf) << " to midi port\n";
}
+
+ mc->learn_about_external_control ();
+ return true;
}
+void
+GenericMidiControlProtocol::learning_stopped (MIDIControllable* mc)
+{
+ Glib::Mutex::Lock lm (pending_lock);
+ Glib::Mutex::Lock lm2 (controllables_lock);
+
+ MIDIControllables::iterator i = find (pending_controllables.begin(), pending_controllables.end(), mc);
+
+ if (i != pending_controllables.end()) {
+ pending_controllables.erase (i);
+ }
+
+ controllables.insert (mc);
+}
+
+void
+GenericMidiControlProtocol::stop_learning (Controllable* c)
+{
+ Glib::Mutex::Lock lm (pending_lock);
+
+ /* learning timed out, and we've been told to consider this attempt to learn to be cancelled. find the
+ relevant MIDIControllable and remove it from the pending list.
+ */
+
+ for (MIDIControllables::iterator i = pending_controllables.begin(); i != pending_controllables.end(); ++i) {
+ if (&(*i)->get_controllable() == c) {
+ (*i)->stop_learning ();
+ delete (*i);
+ pending_controllables.erase (i);
+ break;
+ }
+ }
+}
+
+XMLNode&
+GenericMidiControlProtocol::get_state ()
+{
+ XMLNode* node = new XMLNode (_name); /* node name must match protocol name */
+ XMLNode* children = new XMLNode (X_("controls"));
+
+ node->add_child_nocopy (*children);
+
+ Glib::Mutex::Lock lm2 (controllables_lock);
+ for (MIDIControllables::iterator i = controllables.begin(); i != controllables.end(); ++i) {
+ children->add_child_nocopy ((*i)->get_state());
+ }
+
+ return *node;
+}
+
+int
+GenericMidiControlProtocol::set_state (const XMLNode& node)
+{
+ XMLNodeList nlist;
+ XMLNodeConstIterator niter;
+ Controllable* c;
+
+ {
+ Glib::Mutex::Lock lm (pending_lock);
+ pending_controllables.clear ();
+ }
+
+ Glib::Mutex::Lock lm2 (controllables_lock);
+
+ controllables.clear ();
+
+ nlist = node.children();
+
+ if (nlist.empty()) {
+ return 0;
+ }
+
+ nlist = nlist.front()->children ();
+
+ for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
+
+ XMLProperty* prop;
+
+ if ((prop = (*niter)->property ("id")) != 0) {
+
+ ID id = prop->value ();
+
+ c = session->controllable_by_id (id);
+
+ if (c) {
+ MIDIControllable* mc = new MIDIControllable (*_port, *c);
+ if (mc->set_state (**niter) == 0) {
+ controllables.insert (mc);
+ }
+ }
+ }
+ }
+
+ return 0;
+}
diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.h b/libs/surfaces/generic_midi/generic_midi_control_protocol.h
index 70cbd181c8..5f5a470b13 100644
--- a/libs/surfaces/generic_midi/generic_midi_control_protocol.h
+++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.h
@@ -1,34 +1,58 @@
#ifndef ardour_generic_midi_control_protocol_h
#define ardour_generic_midi_control_protocol_h
+#include <set>
+#include <glibmm/thread.h>
+#include <ardour/types.h>
+
#include <control_protocol/control_protocol.h>
namespace MIDI {
class Port;
}
+namespace PBD {
+ class Controllable;
+}
+
namespace ARDOUR {
+ class Session;
+}
-class GenericMidiControlProtocol : public ControlProtocol {
+class MIDIControllable;
+
+class GenericMidiControlProtocol : public ARDOUR::ControlProtocol {
public:
- GenericMidiControlProtocol (Session&);
+ GenericMidiControlProtocol (ARDOUR::Session&);
virtual ~GenericMidiControlProtocol();
int set_active (bool yn);
static bool probe() { return true; }
- void set_port (MIDI::Port*);
MIDI::Port* port () const { return _port; }
+ void set_feedback_interval (ARDOUR::microseconds_t);
+
+ XMLNode& get_state ();
+ int set_state (const XMLNode&);
- void send_route_feedback (std::list<Route*>&);
-
private:
- void route_feedback (ARDOUR::Route&, bool);
MIDI::Port* _port;
+ ARDOUR::microseconds_t _feedback_interval;
+ ARDOUR::microseconds_t last_feedback_time;
- void port_change ();
-};
+ void _send_feedback ();
+ void send_feedback ();
-}
+ typedef std::set<MIDIControllable*> MIDIControllables;
+ MIDIControllables controllables;
+ MIDIControllables pending_controllables;
+ Glib::Mutex controllables_lock;
+ Glib::Mutex pending_lock;
+
+ bool start_learning (PBD::Controllable*);
+ void stop_learning (PBD::Controllable*);
+
+ void learning_stopped (MIDIControllable*);
+};
-#endif // ardour_generic_midi_control_protocol_h
+#endif /* ardour_generic_midi_control_protocol_h */
diff --git a/libs/surfaces/generic_midi/interface.cc b/libs/surfaces/generic_midi/interface.cc
index c6c59c6589..230be694f2 100644
--- a/libs/surfaces/generic_midi/interface.cc
+++ b/libs/surfaces/generic_midi/interface.cc
@@ -1,3 +1,5 @@
+#include <pbd/failed_constructor.h>
+
#include <control_protocol/control_protocol.h>
#include "generic_midi_control_protocol.h"
@@ -6,7 +8,13 @@ using namespace ARDOUR;
ControlProtocol*
new_generic_midi_protocol (ControlProtocolDescriptor* descriptor, Session* s)
{
- GenericMidiControlProtocol* gmcp = new GenericMidiControlProtocol (*s);
+ GenericMidiControlProtocol* gmcp;
+
+ try {
+ gmcp = new GenericMidiControlProtocol (*s);
+ } catch (failed_constructor& err) {
+ return 0;
+ }
if (gmcp->set_active (true)) {
delete gmcp;
diff --git a/libs/surfaces/generic_midi/midicontrollable.cc b/libs/surfaces/generic_midi/midicontrollable.cc
new file mode 100644
index 0000000000..aa3fd3e252
--- /dev/null
+++ b/libs/surfaces/generic_midi/midicontrollable.cc
@@ -0,0 +1,366 @@
+/*
+ Copyright (C) 1998-2006 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: midicontrollable.cc 629 2006-06-21 23:01:03Z paul $
+*/
+
+#include <cstdio> /* for sprintf, sigh */
+#include <climits>
+#include <pbd/error.h>
+#include <pbd/xml++.h>
+#include <midi++/port.h>
+#include <midi++/channel.h>
+
+#include "midicontrollable.h"
+
+using namespace sigc;
+using namespace MIDI;
+using namespace PBD;
+using namespace ARDOUR;
+
+bool MIDIControllable::_send_feedback = false;
+
+MIDIControllable::MIDIControllable (Port& p, Controllable& c, bool is_bistate)
+ : controllable (c), _port (p), bistate (is_bistate)
+{
+ setting = false;
+ last_written = 0; // got a better idea ?
+ control_type = none;
+ _control_description = "MIDI Control: none";
+ control_additional = (byte) -1;
+ connections = 0;
+ feedback = true; // for now
+
+ /* use channel 0 ("1") as the initial channel */
+
+ midi_rebind (0);
+}
+
+MIDIControllable::~MIDIControllable ()
+{
+ drop_external_control ();
+}
+
+void
+MIDIControllable::midi_forget ()
+{
+ /* stop listening for incoming messages, but retain
+ our existing event + type information.
+ */
+
+ if (connections > 0) {
+ midi_sense_connection[0].disconnect ();
+ }
+
+ if (connections > 1) {
+ midi_sense_connection[1].disconnect ();
+ }
+
+ connections = 0;
+ midi_learn_connection.disconnect ();
+
+}
+
+void
+MIDIControllable::midi_rebind (channel_t c)
+{
+ if (c >= 0) {
+ bind_midi (c, control_type, control_additional);
+ } else {
+ midi_forget ();
+ }
+}
+
+void
+MIDIControllable::learn_about_external_control ()
+{
+ drop_external_control ();
+ midi_learn_connection = _port.input()->any.connect (mem_fun (*this, &MIDIControllable::midi_receiver));
+}
+
+void
+MIDIControllable::stop_learning ()
+{
+ midi_learn_connection.disconnect ();
+}
+
+void
+MIDIControllable::drop_external_control ()
+{
+ if (connections > 0) {
+ midi_sense_connection[0].disconnect ();
+ }
+ if (connections > 1) {
+ midi_sense_connection[1].disconnect ();
+ }
+
+ connections = 0;
+ midi_learn_connection.disconnect ();
+
+ control_type = none;
+ control_additional = (byte) -1;
+}
+
+void
+MIDIControllable::midi_sense_note_on (Parser &p, EventTwoBytes *tb)
+{
+ midi_sense_note (p, tb, true);
+}
+
+void
+MIDIControllable::midi_sense_note_off (Parser &p, EventTwoBytes *tb)
+{
+ midi_sense_note (p, tb, false);
+}
+
+void
+MIDIControllable::midi_sense_note (Parser &p, EventTwoBytes *msg, bool is_on)
+{
+ if (!bistate) {
+ controllable.set_value (msg->note_number/127.0);
+ } else {
+
+ /* Note: parser handles the use of zero velocity to
+ mean note off. if we get called with is_on=true, then we
+ got a *real* note on.
+ */
+
+ if (msg->note_number == control_additional) {
+ controllable.set_value (is_on ? 1 : 0);
+ }
+ }
+}
+
+void
+MIDIControllable::midi_sense_controller (Parser &, EventTwoBytes *msg)
+{
+ if (control_additional == msg->controller_number) {
+ if (!bistate) {
+ controllable.set_value (msg->value/127.0);
+ } else {
+ if (msg->value > 64.0) {
+ controllable.set_value (1);
+ } else {
+ controllable.set_value (0);
+ }
+ }
+ }
+}
+
+void
+MIDIControllable::midi_sense_program_change (Parser &p, byte msg)
+{
+ /* XXX program change messages make no sense for bistates */
+
+ if (!bistate) {
+ controllable.set_value (msg/127.0);
+ }
+}
+
+void
+MIDIControllable::midi_sense_pitchbend (Parser &p, pitchbend_t pb)
+{
+ /* pitchbend messages make no sense for bistates */
+
+ /* XXX gack - get rid of assumption about typeof pitchbend_t */
+
+ controllable.set_value ((pb/(float) SHRT_MAX));
+}
+
+void
+MIDIControllable::midi_receiver (Parser &p, byte *msg, size_t len)
+{
+ /* we only respond to channel messages */
+
+ if ((msg[0] & 0xF0) < 0x80 || (msg[0] & 0xF0) > 0xE0) {
+ return;
+ }
+
+ /* if the our port doesn't do input anymore, forget it ... */
+
+ if (!_port.input()) {
+ return;
+ }
+
+ bind_midi ((channel_t) (msg[0] & 0xf), eventType (msg[0] & 0xF0), msg[1]);
+
+ controllable.LearningFinished ();
+}
+
+void
+MIDIControllable::bind_midi (channel_t chn, eventType ev, MIDI::byte additional)
+{
+ char buf[64];
+
+ drop_external_control ();
+
+ control_type = ev;
+ control_channel = chn;
+ control_additional = additional;
+
+ if (_port.input() == 0) {
+ return;
+ }
+
+ Parser& p = *_port.input();
+
+ int chn_i = chn;
+ switch (ev) {
+ case MIDI::off:
+ midi_sense_connection[0] = p.channel_note_off[chn_i].connect
+ (mem_fun (*this, &MIDIControllable::midi_sense_note_off));
+
+ /* if this is a bistate, connect to noteOn as well,
+ and we'll toggle back and forth between the two.
+ */
+
+ if (bistate) {
+ midi_sense_connection[1] = p.channel_note_on[chn_i].connect
+ (mem_fun (*this, &MIDIControllable::midi_sense_note_on));
+ connections = 2;
+ } else {
+ connections = 1;
+ }
+ _control_description = "MIDI control: NoteOff";
+ break;
+
+ case MIDI::on:
+ midi_sense_connection[0] = p.channel_note_on[chn_i].connect
+ (mem_fun (*this, &MIDIControllable::midi_sense_note_on));
+ if (bistate) {
+ midi_sense_connection[1] = p.channel_note_off[chn_i].connect
+ (mem_fun (*this, &MIDIControllable::midi_sense_note_off));
+ connections = 2;
+ } else {
+ connections = 1;
+ }
+ _control_description = "MIDI control: NoteOn";
+ break;
+
+ case MIDI::controller:
+ midi_sense_connection[0] = p.channel_controller[chn_i].connect
+ (mem_fun (*this, &MIDIControllable::midi_sense_controller));
+ connections = 1;
+ snprintf (buf, sizeof (buf), "MIDI control: Controller %d", control_additional);
+ _control_description = buf;
+ break;
+
+ case MIDI::program:
+ if (!bistate) {
+ midi_sense_connection[0] = p.channel_program_change[chn_i].connect
+ (mem_fun (*this,
+ &MIDIControllable::midi_sense_program_change));
+ connections = 1;
+ _control_description = "MIDI control: ProgramChange";
+ }
+ break;
+
+ case MIDI::pitchbend:
+ if (!bistate) {
+ midi_sense_connection[0] = p.channel_pitchbend[chn_i].connect
+ (mem_fun (*this, &MIDIControllable::midi_sense_pitchbend));
+ connections = 1;
+ _control_description = "MIDI control: Pitchbend";
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+MIDIControllable::send_feedback ()
+{
+ byte msg[3];
+
+ if (setting || !_send_feedback || control_type == none) {
+ return;
+ }
+
+ msg[0] = (control_type & 0xF0) | (control_channel & 0xF);
+ msg[1] = control_additional;
+ msg[2] = (byte) (controllable.get_value() * 127.0f);
+
+ //_port.write (msg, 3);
+}
+
+MIDI::byte*
+MIDIControllable::write_feedback (MIDI::byte* buf, int32_t& bufsize, bool force)
+{
+ if (control_type != none &&_send_feedback && bufsize > 2) {
+
+ MIDI::byte gm = (MIDI::byte) (controllable.get_value() * 127.0);
+
+ if (gm != last_written) {
+ *buf++ = (0xF0 & control_type) | (0xF & control_channel);
+ *buf++ = control_additional; /* controller number */
+ *buf++ = gm;
+ last_written = gm;
+ bufsize -= 3;
+ }
+ }
+
+ return buf;
+}
+
+int
+MIDIControllable::set_state (const XMLNode& node)
+{
+ const XMLProperty* prop;
+ int xx;
+
+ if ((prop = node.property ("event")) != 0) {
+ sscanf (prop->value().c_str(), "0x%x", &xx);
+ control_type = (MIDI::eventType) xx;
+ } else {
+ return -1;
+ }
+
+ if ((prop = node.property ("channel")) != 0) {
+ sscanf (prop->value().c_str(), "%d", &xx);
+ control_channel = (MIDI::channel_t) xx;
+ } else {
+ return -1;
+ }
+
+ if ((prop = node.property ("additional")) != 0) {
+ sscanf (prop->value().c_str(), "0x%x", &xx);
+ control_additional = (MIDI::byte) xx;
+ } else {
+ return -1;
+ }
+
+ return 0;
+}
+
+XMLNode&
+MIDIControllable::get_state ()
+{
+ char buf[32];
+ XMLNode& node (controllable.get_state ());
+
+ snprintf (buf, sizeof(buf), "0x%x", (int) control_type);
+ node.add_property ("event", buf);
+ snprintf (buf, sizeof(buf), "%d", (int) control_channel);
+ node.add_property ("channel", buf);
+ snprintf (buf, sizeof(buf), "0x%x", (int) control_additional);
+ node.add_property ("additional", buf);
+
+ return node;
+}
+
diff --git a/libs/surfaces/generic_midi/midicontrollable.h b/libs/surfaces/generic_midi/midicontrollable.h
new file mode 100644
index 0000000000..ab15f9f4ab
--- /dev/null
+++ b/libs/surfaces/generic_midi/midicontrollable.h
@@ -0,0 +1,97 @@
+/*
+ Copyright (C) 1998-2006 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id: controllable.h 4 2005-05-13 20:47:18Z taybin $
+*/
+
+#ifndef __gm_midicontrollable_h__
+#define __gm_midicontrollable_h__
+
+#include <string>
+
+#include <sigc++/sigc++.h>
+
+#include <midi++/types.h>
+#include <pbd/controllable.h>
+#include <pbd/stateful.h>
+#include <ardour/types.h>
+
+namespace MIDI {
+
+class Channel;
+class Port;
+class Parser;
+
+}
+
+class MIDIControllable : public Stateful
+{
+ public:
+ MIDIControllable (MIDI::Port&, PBD::Controllable&, bool bistate = false);
+ virtual ~MIDIControllable ();
+
+ void send_feedback ();
+ MIDI::byte* write_feedback (MIDI::byte* buf, int32_t& bufsize, bool force = false);
+
+ void midi_rebind (MIDI::channel_t channel=-1);
+ void midi_forget ();
+ void learn_about_external_control ();
+ void stop_learning ();
+ void drop_external_control ();
+
+ bool get_midi_feedback () { return feedback; }
+ void set_midi_feedback (bool val) { feedback = val; }
+
+ MIDI::Port& get_port() const { return _port; }
+ PBD::Controllable& get_controllable() const { return controllable; }
+
+ std::string control_description() const { return _control_description; }
+
+ XMLNode& get_state (void);
+ int set_state (const XMLNode&);
+
+ private:
+ PBD::Controllable& controllable;
+ MIDI::Port& _port;
+ bool setting;
+ MIDI::byte last_written;
+ bool bistate;
+ int midi_msg_id; /* controller ID or note number */
+ sigc::connection midi_sense_connection[2];
+ sigc::connection midi_learn_connection;
+ size_t connections;
+ MIDI::eventType control_type;
+ MIDI::byte control_additional;
+ MIDI::channel_t control_channel;
+ std::string _control_description;
+ bool feedback;
+
+ static bool _send_feedback;
+
+ void midi_receiver (MIDI::Parser &p, MIDI::byte *, size_t);
+ void midi_sense_note (MIDI::Parser &, MIDI::EventTwoBytes *, bool is_on);
+ void midi_sense_note_on (MIDI::Parser &p, MIDI::EventTwoBytes *tb);
+ void midi_sense_note_off (MIDI::Parser &p, MIDI::EventTwoBytes *tb);
+ void midi_sense_controller (MIDI::Parser &, MIDI::EventTwoBytes *);
+ void midi_sense_program_change (MIDI::Parser &, MIDI::byte);
+ void midi_sense_pitchbend (MIDI::Parser &, MIDI::pitchbend_t);
+
+ void bind_midi (MIDI::channel_t, MIDI::eventType, MIDI::byte);
+};
+
+#endif // __gm_midicontrollable_h__
+
diff --git a/libs/surfaces/tranzport/tranzport_control_protocol.cc b/libs/surfaces/tranzport/tranzport_control_protocol.cc
index ee8fa95bc2..1fe9b7231a 100644
--- a/libs/surfaces/tranzport/tranzport_control_protocol.cc
+++ b/libs/surfaces/tranzport/tranzport_control_protocol.cc
@@ -579,7 +579,7 @@ TranzportControlProtocol::monitor_work ()
if ((err = pthread_setschedparam (pthread_self(), SCHED_FIFO, &rtparam)) != 0) {
// do we care? not particularly.
- info << string_compose (_("%1: thread not running with realtime scheduling (%2)"), name(), strerror (errno)) << endmsg;
+ PBD::info << string_compose (_("%1: thread not running with realtime scheduling (%2)"), name(), strerror (errno)) << endmsg;
}
pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, 0);
@@ -1574,3 +1574,15 @@ TranzportControlProtocol::print (int row, int col, const char *text)
}
}
+XMLNode&
+TranzportControlProtocol::get_state ()
+{
+ XMLNode* node = new XMLNode (_name); /* node name must match protocol name */
+ return *node;
+}
+
+int
+TranzportControlProtocol::set_state (const XMLNode& node)
+{
+ return 0;
+}
diff --git a/libs/surfaces/tranzport/tranzport_control_protocol.h b/libs/surfaces/tranzport/tranzport_control_protocol.h
index 546cc2f2af..e6e1a83e46 100644
--- a/libs/surfaces/tranzport/tranzport_control_protocol.h
+++ b/libs/surfaces/tranzport/tranzport_control_protocol.h
@@ -23,6 +23,9 @@ class TranzportControlProtocol : public ARDOUR::ControlProtocol
static bool probe ();
+ XMLNode& get_state ();
+ int set_state (const XMLNode&);
+
private:
static const int VENDORID = 0x165b;
static const int PRODUCTID = 0x8101;