summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/amp.h2
-rw-r--r--libs/ardour/ardour/audio_track.h2
-rw-r--r--libs/ardour/ardour/audioanalyser.h4
-rw-r--r--libs/ardour/ardour/audiofilesource.h4
-rw-r--r--libs/ardour/ardour/audioregion.h8
-rw-r--r--libs/ardour/ardour/beats_frames_converter.h10
-rw-r--r--libs/ardour/ardour/caimportable.h2
-rw-r--r--libs/ardour/ardour/coreaudiosource.h2
-rw-r--r--libs/ardour/ardour/delivery.h6
-rw-r--r--libs/ardour/ardour/export_handler.h12
-rw-r--r--libs/ardour/ardour/io.h2
-rw-r--r--libs/ardour/ardour/location.h28
-rw-r--r--libs/ardour/ardour/midi_port.h2
-rw-r--r--libs/ardour/ardour/midi_source.h22
-rw-r--r--libs/ardour/ardour/midi_state_tracker.h4
-rw-r--r--libs/ardour/ardour/midi_track.h6
-rw-r--r--libs/ardour/ardour/pi_controller.h14
-rw-r--r--libs/ardour/ardour/port.h2
-rw-r--r--libs/ardour/ardour/region.h18
-rw-r--r--libs/ardour/ardour/return.h2
-rw-r--r--libs/ardour/ardour/route.h18
-rw-r--r--libs/ardour/ardour/session.h28
-rw-r--r--libs/ardour/ardour/session_event.h12
-rw-r--r--libs/ardour/ardour/slave.h50
-rw-r--r--libs/ardour/ardour/smf_source.h16
-rw-r--r--libs/ardour/ardour/sndfilesource.h6
-rw-r--r--libs/ardour/ardour/source.h6
-rw-r--r--libs/ardour/ardour/tempo.h78
-rw-r--r--libs/ardour/ardour/types.h31
29 files changed, 202 insertions, 195 deletions
diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h
index 011fef13c0..0ec493e8ce 100644
--- a/libs/ardour/ardour/amp.h
+++ b/libs/ardour/ardour/amp.h
@@ -48,7 +48,7 @@ public:
bool apply_gain() const { return _apply_gain; }
void apply_gain(bool yn) { _apply_gain = yn; }
- void setup_gain_automation (sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
+ void setup_gain_automation (framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
bool apply_gain_automation() const { return _apply_gain_automation; }
void apply_gain_automation(bool yn) { _apply_gain_automation = yn; }
diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h
index ecd88b94e5..8e31db34fd 100644
--- a/libs/ardour/ardour/audio_track.h
+++ b/libs/ardour/ardour/audio_track.h
@@ -49,7 +49,7 @@ class AudioTrack : public Track
return DataType::AUDIO;
}
- int export_stuff (BufferSet& bufs, sframes_t start_frame, nframes_t nframes, bool enable_processing = true);
+ int export_stuff (BufferSet& bufs, framepos_t start_frame, framecnt_t nframes, bool enable_processing = true);
void freeze_me (InterThreadInfo&);
void unfreeze ();
diff --git a/libs/ardour/ardour/audioanalyser.h b/libs/ardour/ardour/audioanalyser.h
index 627dc3f137..f16a2b1e49 100644
--- a/libs/ardour/ardour/audioanalyser.h
+++ b/libs/ardour/ardour/audioanalyser.h
@@ -56,8 +56,8 @@ class AudioAnalyser : public boost::noncopyable {
AnalysisPlugin* plugin;
AnalysisPluginKey plugin_key;
- nframes64_t bufsize;
- nframes64_t stepsize;
+ nframes_t bufsize;
+ nframes_t stepsize;
int initialize_plugin (AnalysisPluginKey name, float sample_rate);
int analyse (const std::string& path, Readable*, uint32_t channel);
diff --git a/libs/ardour/ardour/audiofilesource.h b/libs/ardour/ardour/audiofilesource.h
index bd3d223fc1..57b5ced93c 100644
--- a/libs/ardour/ardour/audiofilesource.h
+++ b/libs/ardour/ardour/audiofilesource.h
@@ -58,8 +58,8 @@ public:
/* this block of methods do nothing for regular file sources, but are significant
for files used in destructive recording.
*/
- virtual sframes_t last_capture_start_frame() const { return 0; }
- virtual void mark_capture_start (sframes_t) {}
+ virtual framepos_t last_capture_start_frame() const { return 0; }
+ virtual void mark_capture_start (framepos_t) {}
virtual void mark_capture_end () {}
virtual void clear_capture_marks() {}
virtual bool one_of_several_channels () const { return false; }
diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h
index 71a948c352..b294082273 100644
--- a/libs/ardour/ardour/audioregion.h
+++ b/libs/ardour/ardour/audioregion.h
@@ -177,12 +177,12 @@ class AudioRegion : public Region
void resume_fade_in ();
void resume_fade_out ();
- void add_transient (nframes64_t where);
- void remove_transient (nframes64_t where);
+ void add_transient (framepos_t where);
+ void remove_transient (framepos_t where);
int set_transients (AnalysisFeatureList&);
int get_transients (AnalysisFeatureList&, bool force_new = false);
- int update_transient (nframes64_t old_position, nframes64_t new_position);
- int adjust_transients (nframes64_t delta);
+ int update_transient (framepos_t old_position, framepos_t new_position);
+ int adjust_transients (framepos_t delta);
std::list<std::pair<frameoffset_t, framecnt_t> > find_silence (Sample, framecnt_t, InterThreadInfo&) const;
diff --git a/libs/ardour/ardour/beats_frames_converter.h b/libs/ardour/ardour/beats_frames_converter.h
index b1e44adbef..816721ebad 100644
--- a/libs/ardour/ardour/beats_frames_converter.h
+++ b/libs/ardour/ardour/beats_frames_converter.h
@@ -29,15 +29,15 @@ namespace ARDOUR {
class TempoMap;
-class BeatsFramesConverter : public Evoral::TimeConverter<double,sframes_t> {
+class BeatsFramesConverter : public Evoral::TimeConverter<double,framepos_t> {
public:
- BeatsFramesConverter(const TempoMap& tempo_map, sframes_t origin)
- : Evoral::TimeConverter<double, sframes_t> (origin)
+ BeatsFramesConverter(const TempoMap& tempo_map, framepos_t origin)
+ : Evoral::TimeConverter<double, framepos_t> (origin)
, _tempo_map(tempo_map)
{}
- sframes_t to(double beats) const;
- double from(sframes_t frames) const;
+ framepos_t to(double beats) const;
+ double from(framepos_t frames) const;
private:
const TempoMap& _tempo_map;
diff --git a/libs/ardour/ardour/caimportable.h b/libs/ardour/ardour/caimportable.h
index dbf93dbb73..1fe94b8953 100644
--- a/libs/ardour/ardour/caimportable.h
+++ b/libs/ardour/ardour/caimportable.h
@@ -38,7 +38,7 @@ class CAImportableSource : public ImportableSource {
nframes_t length() const;
nframes_t samplerate() const;
void seek (nframes_t pos);
- nframes64_t natural_position() const { return 0; }
+ framepos_t natural_position() const { return 0; }
protected:
mutable CAAudioFile af;
diff --git a/libs/ardour/ardour/coreaudiosource.h b/libs/ardour/ardour/coreaudiosource.h
index 649c57c3ca..c83b63934f 100644
--- a/libs/ardour/ardour/coreaudiosource.h
+++ b/libs/ardour/ardour/coreaudiosource.h
@@ -45,7 +45,7 @@ class CoreAudioSource : public AudioFileSource {
static int get_soundfile_info (string path, SoundFileInfo& _info, string& error_msg);
protected:
- nframes_t read_unlocked (Sample *dst, sframes_t start, nframes_t cnt) const;
+ nframes_t read_unlocked (Sample *dst, framepos_t start, nframes_t cnt) const;
nframes_t write_unlocked (Sample *dst, nframes_t cnt) { return 0; }
private:
diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h
index f7cbc29af7..c920fadc2c 100644
--- a/libs/ardour/ardour/delivery.h
+++ b/libs/ardour/ardour/delivery.h
@@ -66,15 +66,15 @@ public:
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
bool configure_io (ChanCount in, ChanCount out);
- void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes, bool);
+ void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool);
/* supplemental method used with MIDI */
- void flush_buffers (nframes_t nframes, nframes64_t time);
+ void flush_buffers (nframes_t nframes, framepos_t time);
void no_outs_cuz_we_no_monitor(bool);
void cycle_start (nframes_t);
void increment_output_offset (nframes_t);
- void transport_stopped (sframes_t frame);
+ void transport_stopped (framepos_t frame);
BufferSet& output_buffers() { return *_output_buffers; }
diff --git a/libs/ardour/ardour/export_handler.h b/libs/ardour/ardour/export_handler.h
index 49400a9363..f826e09bf5 100644
--- a/libs/ardour/ardour/export_handler.h
+++ b/libs/ardour/ardour/export_handler.h
@@ -141,7 +141,7 @@ class ExportHandler : public ExportElementFactory
TimespanBounds timespan_bounds;
PBD::ScopedConnection process_connection;
- sframes_t process_position;
+ framepos_t process_position;
/* CD Marker stuff */
@@ -161,13 +161,13 @@ class ExportHandler : public ExportElementFactory
/* Track info */
uint32_t track_number;
- sframes_t track_position;
- sframes_t track_duration;
- sframes_t track_start_frame;
+ framepos_t track_position;
+ framepos_t track_duration;
+ framepos_t track_start_frame;
/* Index info */
uint32_t index_number;
- sframes_t index_position;
+ framepos_t index_position;
};
@@ -182,7 +182,7 @@ class ExportHandler : public ExportElementFactory
void write_index_info_cue (CDMarkerStatus & status);
void write_index_info_toc (CDMarkerStatus & status);
- void frames_to_cd_frames_string (char* buf, sframes_t when);
+ void frames_to_cd_frames_string (char* buf, framepos_t when);
int cue_tracknum;
int cue_indexnum;
diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h
index 1facfb8ec2..6793072cba 100644
--- a/libs/ardour/ardour/io.h
+++ b/libs/ardour/ardour/io.h
@@ -163,7 +163,7 @@ class IO : public SessionObject, public Latent
/* three utility functions - this just seems to be simplest place to put them */
void collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset);
- void process_input (boost::shared_ptr<Processor>, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
+ void process_input (boost::shared_ptr<Processor>, framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
void copy_to_outputs (BufferSet& bufs, DataType type, nframes_t nframes, nframes_t offset);
/* AudioTrack::deprecated_use_diskstream_connections() needs these */
diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h
index f3c322e2d4..c2da2c04cb 100644
--- a/libs/ardour/ardour/location.h
+++ b/libs/ardour/ardour/location.h
@@ -52,7 +52,7 @@ class Location : public SessionHandleRef, public PBD::StatefulDestructible
};
Location (Session &);
- Location (Session &, nframes64_t, nframes64_t, const std::string &, Flags bits = Flags(0));
+ Location (Session &, framepos_t, framepos_t, const std::string &, Flags bits = Flags(0));
Location (const Location& other);
Location (Session &, const XMLNode&);
Location* operator= (const Location& other);
@@ -61,15 +61,15 @@ class Location : public SessionHandleRef, public PBD::StatefulDestructible
void lock ();
void unlock ();
- nframes64_t start() const { return _start; }
- nframes64_t end() const { return _end; }
- nframes64_t length() const { return _end - _start; }
+ framepos_t start() const { return _start; }
+ framepos_t end() const { return _end; }
+ framepos_t length() const { return _end - _start; }
- int set_start (nframes64_t s, bool force = false, bool allow_bbt_recompute = true);
- int set_end (nframes64_t e, bool force = false, bool allow_bbt_recompute = true);
- int set (nframes64_t start, nframes64_t end, bool allow_bbt_recompute = true);
+ int set_start (framepos_t s, bool force = false, bool allow_bbt_recompute = true);
+ int set_end (framepos_t e, bool force = false, bool allow_bbt_recompute = true);
+ int set (framepos_t start, framepos_t end, bool allow_bbt_recompute = true);
- int move_to (nframes64_t pos);
+ int move_to (framepos_t pos);
const std::string& name() const { return _name; }
void set_name (const std::string &str) { _name = str; name_changed(this); }
@@ -116,9 +116,9 @@ class Location : public SessionHandleRef, public PBD::StatefulDestructible
private:
std::string _name;
- nframes64_t _start;
+ framepos_t _start;
BBT_Time _bbt_start;
- nframes64_t _end;
+ framepos_t _end;
BBT_Time _bbt_end;
Flags _flags;
bool _locked;
@@ -159,12 +159,12 @@ class Locations : public SessionHandleRef, public PBD::StatefulDestructible
int set_current (Location *, bool want_lock = true);
Location *current () const { return current_location; }
- Location* first_location_before (nframes64_t, bool include_special_ranges = false);
- Location* first_location_after (nframes64_t, bool include_special_ranges = false);
+ Location* first_location_before (framepos_t, bool include_special_ranges = false);
+ Location* first_location_after (framepos_t, bool include_special_ranges = false);
- void marks_either_side (nframes64_t const, nframes64_t &, nframes64_t &) const;
+ void marks_either_side (framepos_t const, framepos_t &, framepos_t &) const;
- void find_all_between (nframes64_t start, nframes64_t, LocationList&, Location::Flags);
+ void find_all_between (framepos_t start, framepos_t, LocationList&, Location::Flags);
enum Change {
ADDITION, ///< a location was added, but nothing else changed
diff --git a/libs/ardour/ardour/midi_port.h b/libs/ardour/ardour/midi_port.h
index 10d8c7b6ca..8b6095c470 100644
--- a/libs/ardour/ardour/midi_port.h
+++ b/libs/ardour/ardour/midi_port.h
@@ -41,7 +41,7 @@ class MidiPort : public Port {
void cycle_end (nframes_t nframes);
void cycle_split ();
- void flush_buffers (nframes_t nframes, nframes64_t time, nframes_t offset = 0);
+ void flush_buffers (nframes_t nframes, framepos_t time, nframes_t offset = 0);
void transport_stopped ();
size_t raw_buffer_size(jack_nframes_t nframes) const;
diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h
index 71c4eaca6d..3bad6d6ddc 100644
--- a/libs/ardour/ardour/midi_source.h
+++ b/libs/ardour/ardour/midi_source.h
@@ -59,25 +59,25 @@ class MidiSource : virtual public Source
* \param tracker an optional pointer to MidiStateTracker object, for note on/off tracking
*/
virtual nframes_t midi_read (Evoral::EventSink<nframes_t>& dst,
- sframes_t source_start,
- sframes_t start, nframes_t cnt,
+ framepos_t source_start,
+ framepos_t start, nframes_t cnt,
MidiStateTracker*,
std::set<Evoral::Parameter> const &) const;
virtual nframes_t midi_write (MidiRingBuffer<nframes_t>& src,
- sframes_t source_start,
+ framepos_t source_start,
nframes_t cnt);
virtual void append_event_unlocked_beats(const Evoral::Event<Evoral::MusicalTime>& ev) = 0;
virtual void append_event_unlocked_frames(const Evoral::Event<nframes_t>& ev,
- sframes_t source_start) = 0;
+ framepos_t source_start) = 0;
virtual bool empty () const;
virtual framecnt_t length (framepos_t pos) const;
virtual void update_length (framepos_t pos, framecnt_t cnt);
- virtual void mark_streaming_midi_write_started (NoteMode mode, sframes_t start_time);
+ virtual void mark_streaming_midi_write_started (NoteMode mode, framepos_t start_time);
virtual void mark_streaming_write_started ();
virtual void mark_streaming_write_completed ();
@@ -92,7 +92,7 @@ class MidiSource : virtual public Source
static PBD::Signal1<void,MidiSource*> MidiSourceCreated;
// Signal a range of recorded data is available for reading from model()
- mutable PBD::Signal2<void,sframes_t,nframes_t> ViewDataRangeReady;
+ mutable PBD::Signal2<void,framepos_t,nframes_t> ViewDataRangeReady;
XMLNode& get_state ();
int set_state (const XMLNode&, int version);
@@ -134,12 +134,12 @@ class MidiSource : virtual public Source
virtual void flush_midi() = 0;
virtual nframes_t read_unlocked (Evoral::EventSink<nframes_t>& dst,
- sframes_t position,
- sframes_t start, nframes_t cnt,
+ framepos_t position,
+ framepos_t start, nframes_t cnt,
MidiStateTracker* tracker) const = 0;
virtual nframes_t write_unlocked (MidiRingBuffer<nframes_t>& dst,
- sframes_t position,
+ framepos_t position,
nframes_t cnt) = 0;
std::string _captured_for;
@@ -153,8 +153,8 @@ class MidiSource : virtual public Source
mutable bool _model_iter_valid;
mutable double _length_beats;
- mutable sframes_t _last_read_end;
- sframes_t _last_write_end;
+ mutable framepos_t _last_read_end;
+ framepos_t _last_write_end;
/** Map of interpolation styles to use for Parameters; if they are not in this map,
* the correct interpolation style can be obtained from EventTypeMap::interpolation_of ()
diff --git a/libs/ardour/ardour/midi_state_tracker.h b/libs/ardour/ardour/midi_state_tracker.h
index 5c65c1f018..9720649a10 100644
--- a/libs/ardour/ardour/midi_state_tracker.h
+++ b/libs/ardour/ardour/midi_state_tracker.h
@@ -41,8 +41,8 @@ public:
void track (const MidiBuffer::iterator& from, const MidiBuffer::iterator& to, bool& looped);
void add (uint8_t note, uint8_t chn);
void remove (uint8_t note, uint8_t chn);
- void resolve_notes (MidiBuffer& buffer, nframes64_t time);
- void resolve_notes (Evoral::EventSink<nframes_t>& buffer, nframes64_t time);
+ void resolve_notes (MidiBuffer& buffer, framepos_t time);
+ void resolve_notes (Evoral::EventSink<nframes_t>& buffer, framepos_t time);
void resolve_notes (MidiSource& src, Evoral::MusicalTime time);
void dump (std::ostream&);
void reset ();
diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h
index ea2b0804f8..0475f3f5ea 100644
--- a/libs/ardour/ardour/midi_track.h
+++ b/libs/ardour/ardour/midi_track.h
@@ -54,7 +54,7 @@ public:
void set_latency_delay (nframes_t);
- int export_stuff (BufferSet& bufs, nframes_t nframes, sframes_t end_frame);
+ int export_stuff (BufferSet& bufs, nframes_t nframes, framepos_t end_frame);
void freeze_me (InterThreadInfo&);
void unfreeze ();
@@ -110,7 +110,7 @@ protected:
private:
boost::shared_ptr<MidiDiskstream> midi_diskstream () const;
- void write_out_of_band_data (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
+ void write_out_of_band_data (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
void set_state_part_two ();
void set_state_part_three ();
@@ -122,7 +122,7 @@ private:
uint8_t _default_channel;
bool _midi_thru;
- int no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
+ int no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool state_changing, bool can_record, bool rec_monitors_input);
void push_midi_input_to_step_edit_ringbuffer (nframes_t nframes);
};
diff --git a/libs/ardour/ardour/pi_controller.h b/libs/ardour/ardour/pi_controller.h
index 250c943de9..a118fd739f 100644
--- a/libs/ardour/ardour/pi_controller.h
+++ b/libs/ardour/ardour/pi_controller.h
@@ -60,24 +60,24 @@ class PIChaser {
PIChaser();
~PIChaser();
- double get_ratio( nframes64_t chasetime_measured, nframes64_t chasetime, nframes64_t slavetime_measured, nframes64_t slavetime, bool in_control, int period_size );
+ double get_ratio( framepos_t chasetime_measured, framepos_t chasetime, framepos_t slavetime_measured, framepos_t slavetime, bool in_control, int period_size );
void reset();
- nframes64_t want_locate() { return want_locate_val; }
+ framepos_t want_locate() { return want_locate_val; }
private:
PIController *pic;
- nframes64_t realtime_stamps[ESTIMATOR_SIZE];
- nframes64_t chasetime_stamps[ESTIMATOR_SIZE];
+ framepos_t realtime_stamps[ESTIMATOR_SIZE];
+ framepos_t chasetime_stamps[ESTIMATOR_SIZE];
int array_index;
- nframes64_t want_locate_val;
+ framepos_t want_locate_val;
- void feed_estimator( nframes64_t realtime, nframes64_t chasetime );
+ void feed_estimator( framepos_t realtime, framepos_t chasetime );
double get_estimate();
double speed;
double speed_threshold;
- nframes64_t pos_threshold;
+ framepos_t pos_threshold;
};
diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h
index 8b2b3dcbd3..23b42a55ea 100644
--- a/libs/ardour/ardour/port.h
+++ b/libs/ardour/ardour/port.h
@@ -109,7 +109,7 @@ public:
virtual void cycle_end (nframes_t) = 0;
virtual void cycle_split () = 0;
virtual Buffer& get_buffer (nframes_t nframes, nframes_t offset = 0) = 0;
- virtual void flush_buffers (nframes_t nframes, nframes64_t /*time*/, nframes_t offset = 0) {
+ virtual void flush_buffers (nframes_t nframes, framepos_t /*time*/, nframes_t offset = 0) {
assert(offset < nframes);
}
virtual void transport_stopped () {}
diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h
index b09e89d3a0..b78699d906 100644
--- a/libs/ardour/ardour/region.h
+++ b/libs/ardour/ardour/region.h
@@ -103,8 +103,8 @@ class Region
* START: first frame of the region within its source(s)
* LENGTH: number of frames the region represents
*/
- sframes_t position () const { return _position; }
- sframes_t start () const { return _start; }
+ framepos_t position () const { return _position; }
+ framepos_t start () const { return _start; }
framecnt_t length() const { return _length; }
layer_t layer () const { return _layer; }
@@ -112,15 +112,15 @@ class Region
/* these two are valid ONLY during a StateChanged signal handler */
- sframes_t last_position() const { return _last_position; }
+ framepos_t last_position() const { return _last_position; }
framecnt_t last_length() const { return _last_length; }
- sframes_t ancestral_start () const { return _ancestral_start; }
+ framepos_t ancestral_start () const { return _ancestral_start; }
framecnt_t ancestral_length () const { return _ancestral_length; }
float stretch() const { return _stretch; }
float shift() const { return _shift; }
- void set_ancestral_data (nframes64_t start, nframes64_t length, float stretch, float shift);
+ void set_ancestral_data (framepos_t start, framepos_t length, float stretch, float shift);
frameoffset_t sync_offset(int& dir) const;
framepos_t sync_position() const;
@@ -247,16 +247,16 @@ class Region
virtual int exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&) = 0;
- virtual void add_transient (nframes64_t) {
+ virtual void add_transient (framepos_t) {
// no transients, but its OK
}
- virtual int update_transient (nframes64_t /* old_position */, nframes64_t /* new_position */) {
+ virtual int update_transient (framepos_t /* old_position */, framepos_t /* new_position */) {
// no transients, but its OK
return 0;
}
- virtual void remove_transient (nframes64_t /* where */) {
+ virtual void remove_transient (framepos_t /* where */) {
// no transients, but its OK
}
@@ -271,7 +271,7 @@ class Region
return 0;
}
- virtual int adjust_transients (nframes64_t /*delta*/) {
+ virtual int adjust_transients (framepos_t /*delta*/) {
// no transients, but its OK
return 0;
}
diff --git a/libs/ardour/ardour/return.h b/libs/ardour/ardour/return.h
index 2dcb6eb270..cf709ed2f2 100644
--- a/libs/ardour/ardour/return.h
+++ b/libs/ardour/ardour/return.h
@@ -74,7 +74,7 @@ private:
uint32_t _bitslot;
void collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset=ChanCount::ZERO);
- void just_meter_input (sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
+ void just_meter_input (framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
};
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index b49cb77788..9a874b459d 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -101,13 +101,13 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
/* these are the core of the API of a Route. see the protected sections as well */
- virtual int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
+ virtual int roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
- virtual int no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
+ virtual int no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool state_changing, bool can_record, bool rec_monitors_input);
- virtual int silent_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
+ virtual int silent_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool can_record, bool rec_monitors_input, bool& need_butler);
virtual void toggle_monitor_input ();
@@ -120,7 +120,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
/* end of vfunc-based API */
- void shift (nframes64_t, nframes64_t);
+ void shift (framepos_t, framepos_t);
void set_gain (gain_t val, void *src);
void inc_gain (gain_t delta, void *src);
@@ -382,20 +382,20 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
void mod_solo_by_others_downstream (int32_t);
bool has_external_redirects() const;
void curve_reallocate ();
- void just_meter_input (sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
+ void just_meter_input (framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
virtual void set_block_size (nframes_t nframes);
protected:
nframes_t check_initial_delay (nframes_t, nframes_t&);
- void passthru (sframes_t start_frame, sframes_t end_frame,
+ void passthru (framepos_t start_frame, framepos_t end_frame,
nframes_t nframes, int declick);
- virtual void write_out_of_band_data (BufferSet& /* bufs */, sframes_t /* start_frame */, sframes_t /* end_frame */,
+ virtual void write_out_of_band_data (BufferSet& /* bufs */, framepos_t /* start_frame */, framepos_t /* end_frame */,
nframes_t /* nframes */) {}
virtual void process_output_buffers (BufferSet& bufs,
- sframes_t start_frame, sframes_t end_frame,
+ framepos_t start_frame, framepos_t end_frame,
nframes_t nframes, bool with_processors, int declick);
boost::shared_ptr<IO> _input;
@@ -444,7 +444,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
int configure_processors (ProcessorStreams*);
- void passthru_silence (sframes_t start_frame, sframes_t end_frame,
+ void passthru_silence (framepos_t start_frame, framepos_t end_frame,
nframes_t nframes, int declick);
void silence (nframes_t);
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 315ad887ae..93d15b8439 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -212,7 +212,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
boost::shared_ptr<RouteList> get_routes_with_internal_returns() const;
- boost::shared_ptr<RouteList> get_routes_with_regions_at (nframes64_t const) const;
+ boost::shared_ptr<RouteList> get_routes_with_regions_at (framepos_t const) const;
uint32_t nroutes() const { return routes.reader()->size(); }
uint32_t ntracks () const;
@@ -270,8 +270,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
/* Transport mechanism signals */
PBD::Signal0<void> TransportStateChange; /* generic */
- PBD::Signal1<void,nframes64_t> PositionChanged; /* sent after any non-sequential motion */
- PBD::Signal1<void,nframes64_t> Xrun;
+ PBD::Signal1<void,framepos_t> PositionChanged; /* sent after any non-sequential motion */
+ PBD::Signal1<void,framepos_t> Xrun;
PBD::Signal0<void> TransportLooped;
/** emitted when a locate has occurred */
@@ -428,9 +428,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
/* Time */
- nframes64_t transport_frame () const {return _transport_frame; }
- nframes64_t audible_frame () const;
- nframes64_t requested_return_frame() const { return _requested_return_frame; }
+ framepos_t transport_frame () const {return _transport_frame; }
+ framepos_t audible_frame () const;
+ framepos_t requested_return_frame() const { return _requested_return_frame; }
enum PullupFormat {
pullup_Plus4Plus1,
@@ -774,8 +774,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
boost::shared_ptr<SessionPlaylists> playlists;
- void send_mmc_locate (nframes64_t);
- int send_full_time_code (nframes64_t);
+ void send_mmc_locate (framepos_t);
+ int send_full_time_code (framepos_t);
PBD::Signal0<void> RouteOrderKeyChanged;
@@ -822,7 +822,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
nframes_t _nominal_frame_rate; //ignores audioengine setting, "native" SR
int transport_sub_state;
mutable gint _record_status;
- volatile nframes64_t _transport_frame;
+ volatile framepos_t _transport_frame;
Location* _session_range_location; ///< session range, or 0 if there is nothing in the session yet
Slave* _slave;
bool _silent;
@@ -834,9 +834,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
CubicInterpolation interpolation;
bool auto_play_legal;
- nframes64_t _last_slave_transport_frame;
+ framepos_t _last_slave_transport_frame;
nframes_t maximum_output_latency;
- volatile nframes64_t _requested_return_frame;
+ volatile framepos_t _requested_return_frame;
nframes_t current_block_size;
nframes_t _worst_output_latency;
nframes_t _worst_input_latency;
@@ -1147,9 +1147,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void overwrite_some_buffers (Track *);
void flush_all_inserts ();
int micro_locate (nframes_t distance);
- void locate (nframes64_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false, bool with_mmc=true);
- void start_locate (nframes64_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false);
- void force_locate (nframes64_t frame, bool with_roll = false);
+ void locate (framepos_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false, bool with_mmc=true);
+ void start_locate (framepos_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false);
+ void force_locate (framepos_t frame, bool with_roll = false);
void set_track_speed (Track *, double speed);
void set_transport_speed (double speed, bool abort = false, bool clear_state = false);
void stop_transport (bool abort = false, bool clear_state = false);
diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h
index 396f4e778b..5c31217045 100644
--- a/libs/ardour/ardour/session_event.h
+++ b/libs/ardour/ardour/session_event.h
@@ -53,14 +53,14 @@ struct SessionEvent {
Type type;
Action action;
- nframes64_t action_frame;
- nframes64_t target_frame;
+ framepos_t action_frame;
+ framepos_t target_frame;
double speed;
union {
void* ptr;
bool yes_or_no;
- nframes64_t target2_frame;
+ framepos_t target2_frame;
Slave* slave;
Route* route;
};
@@ -148,13 +148,13 @@ protected:
void dump_events () const;
void merge_event (SessionEvent*);
- void replace_event (SessionEvent::Type, nframes64_t action_frame, nframes64_t target = 0);
+ void replace_event (SessionEvent::Type, framepos_t action_frame, framepos_t target = 0);
bool _replace_event (SessionEvent*);
bool _remove_event (SessionEvent *);
void _clear_event_type (SessionEvent::Type);
- void add_event (nframes64_t action_frame, SessionEvent::Type type, nframes64_t target_frame = 0);
- void remove_event (nframes64_t frame, SessionEvent::Type type);
+ void add_event (framepos_t action_frame, SessionEvent::Type type, framepos_t target_frame = 0);
+ void remove_event (framepos_t frame, SessionEvent::Type type);
virtual void process_event(SessionEvent*) = 0;
virtual void set_next_event () = 0;
diff --git a/libs/ardour/ardour/slave.h b/libs/ardour/ardour/slave.h
index 111564cc23..74cf4371b0 100644
--- a/libs/ardour/ardour/slave.h
+++ b/libs/ardour/ardour/slave.h
@@ -113,7 +113,7 @@ class Slave {
* @param position - The transport position requested
* @return - The return value is currently ignored (see Session::follow_slave)
*/
- virtual bool speed_and_position (double& speed, nframes64_t& position) = 0;
+ virtual bool speed_and_position (double& speed, framepos_t& position) = 0;
/**
* reports to ARDOUR whether the Slave is currently synced to its external
@@ -156,7 +156,7 @@ class Slave {
* only if requires_seekahead() returns true.
*/
- virtual nframes64_t seekahead_distance() const { return 0; }
+ virtual framepos_t seekahead_distance() const { return 0; }
/**
* @return - when returning true, ARDOUR will use transport speed 1.0 no matter what
@@ -176,12 +176,12 @@ class ISlaveSessionProxy {
virtual ~ISlaveSessionProxy() {}
virtual TempoMap& tempo_map() const { return *((TempoMap *) 0); }
virtual nframes_t frame_rate() const { return 0; }
- virtual nframes64_t audible_frame () const { return 0; }
- virtual nframes64_t transport_frame () const { return 0; }
+ virtual framepos_t audible_frame () const { return 0; }
+ virtual framepos_t transport_frame () const { return 0; }
virtual nframes_t frames_since_cycle_start () const { return 0; }
- virtual nframes64_t frame_time () const { return 0; }
+ virtual framepos_t frame_time () const { return 0; }
- virtual void request_locate (nframes64_t /*frame*/, bool with_roll = false) {
+ virtual void request_locate (framepos_t /*frame*/, bool with_roll = false) {
(void) with_roll;
}
virtual void request_transport_speed (double /*speed*/) {}
@@ -197,19 +197,19 @@ class SlaveSessionProxy : public ISlaveSessionProxy {
TempoMap& tempo_map() const;
nframes_t frame_rate() const;
- nframes64_t audible_frame () const;
- nframes64_t transport_frame () const;
+ framepos_t audible_frame () const;
+ framepos_t transport_frame () const;
nframes_t frames_since_cycle_start () const;
- nframes64_t frame_time () const;
+ framepos_t frame_time () const;
- void request_locate (nframes64_t frame, bool with_roll = false);
+ void request_locate (framepos_t frame, bool with_roll = false);
void request_transport_speed (double speed);
};
struct SafeTime {
volatile int guard1;
- nframes64_t position;
- nframes64_t timestamp;
+ framepos_t position;
+ framepos_t timestamp;
double speed;
volatile int guard2;
@@ -228,7 +228,7 @@ class MTC_Slave : public Slave {
~MTC_Slave ();
void rebind (MIDI::Port&);
- bool speed_and_position (double&, nframes64_t&);
+ bool speed_and_position (double&, framepos_t&);
bool locked() const;
bool ok() const;
@@ -236,7 +236,7 @@ class MTC_Slave : public Slave {
nframes_t resolution() const;
bool requires_seekahead () const { return true; }
- nframes64_t seekahead_distance() const;
+ framepos_t seekahead_distance() const;
bool give_slave_full_control_over_transport_speed() const;
private:
@@ -275,8 +275,8 @@ class MTC_Slave : public Slave {
void update_mtc_time (const MIDI::byte *, bool, nframes_t);
void update_mtc_status (MIDI::MTC_Status);
void read_current (SafeTime *) const;
- void reset_window (nframes64_t);
- bool outside_window (nframes64_t) const;
+ void reset_window (framepos_t);
+ bool outside_window (framepos_t) const;
void process_apparent_speed (double);
};
@@ -289,7 +289,7 @@ class MIDIClock_Slave : public Slave {
~MIDIClock_Slave ();
void rebind (MIDI::Port&);
- bool speed_and_position (double&, nframes64_t&);
+ bool speed_and_position (double&, framepos_t&);
bool locked() const;
bool ok() const;
@@ -344,17 +344,17 @@ class MIDIClock_Slave : public Slave {
double b, c, omega;
void reset ();
- void start (MIDI::Parser& parser, nframes64_t timestamp);
- void contineu (MIDI::Parser& parser, nframes64_t timestamp);
- void stop (MIDI::Parser& parser, nframes64_t timestamp);
+ void start (MIDI::Parser& parser, framepos_t timestamp);
+ void contineu (MIDI::Parser& parser, framepos_t timestamp);
+ void stop (MIDI::Parser& parser, framepos_t timestamp);
void position (MIDI::Parser& parser, MIDI::byte* message, size_t size);
// we can't use continue because it is a C++ keyword
- void calculate_one_ppqn_in_frames_at(nframes64_t time);
- nframes64_t calculate_song_position(uint16_t song_position_in_sixteenth_notes);
+ void calculate_one_ppqn_in_frames_at(framepos_t time);
+ framepos_t calculate_song_position(uint16_t song_position_in_sixteenth_notes);
void calculate_filter_coefficients();
- void update_midi_clock (MIDI::Parser& parser, nframes64_t timestamp);
+ void update_midi_clock (MIDI::Parser& parser, framepos_t timestamp);
void read_current (SafeTime *) const;
- bool stop_if_no_more_clock_events(nframes64_t& pos, nframes64_t now);
+ bool stop_if_no_more_clock_events(framepos_t& pos, framepos_t now);
/// whether transport should be rolling
bool _started;
@@ -370,7 +370,7 @@ class JACK_Slave : public Slave
JACK_Slave (jack_client_t*);
~JACK_Slave ();
- bool speed_and_position (double& speed, nframes64_t& pos);
+ bool speed_and_position (double& speed, framepos_t& pos);
bool starting() const { return _starting; }
bool locked() const;
diff --git a/libs/ardour/ardour/smf_source.h b/libs/ardour/ardour/smf_source.h
index 165e03e483..bd1428a129 100644
--- a/libs/ardour/ardour/smf_source.h
+++ b/libs/ardour/ardour/smf_source.h
@@ -52,9 +52,9 @@ public:
bool set_name (const std::string& newname) { return (set_source_name(newname, false) == 0); }
void append_event_unlocked_beats (const Evoral::Event<Evoral::MusicalTime>& ev);
- void append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, sframes_t source_start);
+ void append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, framepos_t source_start);
- void mark_streaming_midi_write_started (NoteMode mode, sframes_t start_time);
+ void mark_streaming_midi_write_started (NoteMode mode, framepos_t start_time);
void mark_streaming_write_completed ();
XMLNode& get_state ();
@@ -74,21 +74,21 @@ public:
private:
nframes_t read_unlocked (Evoral::EventSink<nframes_t>& dst,
- sframes_t position,
- sframes_t start,
+ framepos_t position,
+ framepos_t start,
nframes_t cnt,
MidiStateTracker* tracker) const;
nframes_t write_unlocked (MidiRingBuffer<nframes_t>& src,
- sframes_t position,
+ framepos_t position,
nframes_t cnt);
double _last_ev_time_beats;
- sframes_t _last_ev_time_frames;
+ framepos_t _last_ev_time_frames;
/** end time (start + duration) of last call to read_unlocked */
- mutable sframes_t _smf_last_read_end;
+ mutable framepos_t _smf_last_read_end;
/** time (in SMF ticks, 1 tick per _ppqn) of the last event read by read_unlocked */
- mutable sframes_t _smf_last_read_time;
+ mutable framepos_t _smf_last_read_time;
};
}; /* namespace ARDOUR */
diff --git a/libs/ardour/ardour/sndfilesource.h b/libs/ardour/ardour/sndfilesource.h
index 06e329a74b..ae2cba449a 100644
--- a/libs/ardour/ardour/sndfilesource.h
+++ b/libs/ardour/ardour/sndfilesource.h
@@ -47,10 +47,10 @@ class SndFileSource : public AudioFileSource {
int update_header (framepos_t when, struct tm&, time_t);
int flush_header ();
- nframes64_t natural_position () const;
+ framepos_t natural_position () const;
- sframes_t last_capture_start_frame() const;
- void mark_capture_start (sframes_t);
+ framepos_t last_capture_start_frame() const;
+ void mark_capture_start (framepos_t);
void mark_capture_end ();
void clear_capture_marks();
diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h
index ebe8cdf0f5..b8b3c9c229 100644
--- a/libs/ardour/ardour/source.h
+++ b/libs/ardour/ardour/source.h
@@ -97,8 +97,8 @@ class Source : public SessionObject
std::string get_transients_path() const;
int load_transients (const std::string&);
- sframes_t timeline_position() const { return _timeline_position; }
- virtual void set_timeline_position (sframes_t pos);
+ framepos_t timeline_position() const { return _timeline_position; }
+ virtual void set_timeline_position (framepos_t pos);
void set_allow_remove_if_empty (bool yn);
@@ -114,7 +114,7 @@ class Source : public SessionObject
DataType _type;
Flag _flags;
time_t _timestamp;
- sframes_t _timeline_position;
+ framepos_t _timeline_position;
bool _analysed;
mutable Glib::Mutex _lock;
mutable Glib::Mutex _analysis_lock;
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h
index 21a1185725..e692334234 100644
--- a/libs/ardour/ardour/tempo.h
+++ b/libs/ardour/ardour/tempo.h
@@ -80,18 +80,18 @@ class MetricSection {
public:
MetricSection (const BBT_Time& start)
: _start (start), _frame (0), _movable (true) {}
- MetricSection (nframes64_t start)
+ MetricSection (framepos_t start)
: _frame (start), _movable (true) {}
virtual ~MetricSection() {}
const BBT_Time& start() const { return _start; }
- nframes64_t frame() const { return _frame; }
+ framepos_t frame() const { return _frame; }
void set_movable (bool yn) { _movable = yn; }
bool movable() const { return _movable; }
- virtual void set_frame (nframes64_t f) {
+ virtual void set_frame (framepos_t f) {
_frame = f;
}
@@ -109,7 +109,7 @@ class MetricSection {
private:
BBT_Time _start;
- nframes64_t _frame;
+ framepos_t _frame;
bool _movable;
};
@@ -117,7 +117,7 @@ class MeterSection : public MetricSection, public Meter {
public:
MeterSection (const BBT_Time& start, double bpb, double note_type)
: MetricSection (start), Meter (bpb, note_type) {}
- MeterSection (nframes64_t start, double bpb, double note_type)
+ MeterSection (framepos_t start, double bpb, double note_type)
: MetricSection (start), Meter (bpb, note_type) {}
MeterSection (const XMLNode&);
@@ -130,7 +130,7 @@ class TempoSection : public MetricSection, public Tempo {
public:
TempoSection (const BBT_Time& start, double qpm, double note_type)
: MetricSection (start), Tempo (qpm, note_type) {}
- TempoSection (nframes64_t start, double qpm, double note_type)
+ TempoSection (framepos_t start, double qpm, double note_type)
: MetricSection (start), Tempo (qpm, note_type) {}
TempoSection (const XMLNode&);
@@ -150,25 +150,25 @@ class TempoMetric {
void set_tempo (const Tempo& t) { _tempo = &t; }
void set_meter (const Meter& m) { _meter = &m; }
- void set_frame (nframes64_t f) { _frame = f; }
+ void set_frame (framepos_t f) { _frame = f; }
void set_start (const BBT_Time& t) { _start = t; }
const Meter& meter() const { return *_meter; }
const Tempo& tempo() const { return *_tempo; }
- nframes64_t frame() const { return _frame; }
+ framepos_t frame() const { return _frame; }
const BBT_Time& start() const { return _start; }
private:
const Meter* _meter;
const Tempo* _tempo;
- nframes64_t _frame;
+ framepos_t _frame;
BBT_Time _start;
};
class TempoMap : public PBD::StatefulDestructible
{
public:
- TempoMap (nframes64_t frame_rate);
+ TempoMap (nframes_t frame_rate);
~TempoMap();
/* measure-based stuff */
@@ -180,13 +180,13 @@ class TempoMap : public PBD::StatefulDestructible
struct BBTPoint {
BBTPointType type;
- nframes64_t frame;
+ framepos_t frame;
const Meter* meter;
const Tempo* tempo;
uint32_t bar;
uint32_t beat;
- BBTPoint (const Meter& m, const Tempo& t, nframes64_t f,
+ BBTPoint (const Meter& m, const Tempo& t, framepos_t f,
BBTPointType ty, uint32_t b, uint32_t e)
: type (ty), frame (f), meter (&m), tempo (&t), bar (b), beat (e) {}
};
@@ -198,27 +198,27 @@ class TempoMap : public PBD::StatefulDestructible
(obj.*method)(*metrics);
}
- BBTPointList *get_points (nframes64_t start, nframes64_t end) const;
+ BBTPointList *get_points (framepos_t start, framepos_t end) const;
- void bbt_time (nframes64_t when, BBT_Time&) const;
- nframes64_t frame_time (const BBT_Time&) const;
- nframes64_t bbt_duration_at (nframes64_t, const BBT_Time&, int dir) const;
+ void bbt_time (framepos_t when, BBT_Time&) const;
+ framecnt_t frame_time (const BBT_Time&) const;
+ framecnt_t bbt_duration_at (framepos_t, const BBT_Time&, int dir) const;
- void bbt_time_add (nframes64_t origin, BBT_Time& start, const BBT_Time& shift);
+ void bbt_time_add (framepos_t origin, BBT_Time& start, const BBT_Time& shift);
static const Tempo& default_tempo() { return _default_tempo; }
static const Meter& default_meter() { return _default_meter; }
- const Tempo& tempo_at (nframes64_t) const;
- const Meter& meter_at (nframes64_t) const;
+ const Tempo& tempo_at (framepos_t) const;
+ const Meter& meter_at (framepos_t) const;
- const TempoSection& tempo_section_at (nframes64_t);
+ const TempoSection& tempo_section_at (framepos_t);
void add_tempo(const Tempo&, BBT_Time where);
void add_meter(const Meter&, BBT_Time where);
- void add_tempo(const Tempo&, nframes64_t where);
- void add_meter(const Meter&, nframes64_t where);
+ void add_tempo(const Tempo&, framepos_t where);
+ void add_meter(const Meter&, framepos_t where);
void move_tempo (TempoSection&, const BBT_Time& to);
void move_meter (MeterSection&, const BBT_Time& to);
@@ -229,12 +229,12 @@ class TempoMap : public PBD::StatefulDestructible
void replace_tempo (TempoSection& existing, const Tempo& replacement);
void replace_meter (MeterSection& existing, const Meter& replacement);
- nframes64_t round_to_bar (nframes64_t frame, int dir);
- nframes64_t round_to_beat (nframes64_t frame, int dir);
- nframes64_t round_to_beat_subdivision (nframes64_t fr, int sub_num, int dir);
- nframes64_t round_to_tick (nframes64_t frame, int dir);
+ framepos_t round_to_bar (framepos_t frame, int dir);
+ framepos_t round_to_beat (framepos_t frame, int dir);
+ framepos_t round_to_beat_subdivision (framepos_t fr, int sub_num, int dir);
+ framepos_t round_to_tick (framepos_t frame, int dir);
- void set_length (nframes64_t frames);
+ void set_length (framepos_t frames);
XMLNode& get_state (void);
int set_state (const XMLNode&, int version);
@@ -243,17 +243,17 @@ class TempoMap : public PBD::StatefulDestructible
void clear ();
TempoMetric metric_at (BBT_Time bbt) const;
- TempoMetric metric_at (nframes64_t) const;
- void bbt_time_with_metric (nframes64_t, BBT_Time&, const TempoMetric&) const;
+ TempoMetric metric_at (framepos_t) const;
+ void bbt_time_with_metric (framepos_t, BBT_Time&, const TempoMetric&) const;
BBT_Time bbt_add (const BBT_Time&, const BBT_Time&, const TempoMetric&) const;
BBT_Time bbt_add (const BBT_Time& a, const BBT_Time& b) const;
BBT_Time bbt_subtract (const BBT_Time&, const BBT_Time&) const;
- void change_existing_tempo_at (nframes64_t, double bpm, double note_type);
+ void change_existing_tempo_at (framepos_t, double bpm, double note_type);
void change_initial_tempo (double bpm, double note_type);
- void insert_time (nframes64_t, nframes64_t);
+ void insert_time (framepos_t, framecnt_t);
int n_tempos () const;
int n_meters () const;
@@ -266,27 +266,27 @@ class TempoMap : public PBD::StatefulDestructible
Metrics* metrics;
nframes_t _frame_rate;
- nframes64_t last_bbt_when;
+ framepos_t last_bbt_when;
bool last_bbt_valid;
BBT_Time last_bbt;
mutable Glib::RWLock lock;
void timestamp_metrics (bool use_bbt);
- nframes64_t round_to_type (nframes64_t fr, int dir, BBTPointType);
+ framepos_t round_to_type (framepos_t fr, int dir, BBTPointType);
- nframes64_t frame_time_unlocked (const BBT_Time&) const;
+ framepos_t frame_time_unlocked (const BBT_Time&) const;
- void bbt_time_unlocked (nframes64_t, BBT_Time&) const;
+ void bbt_time_unlocked (framepos_t, BBT_Time&) const;
- nframes64_t bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, int dir) const;
+ framecnt_t bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, int dir) const;
const MeterSection& first_meter() const;
const TempoSection& first_tempo() const;
- nframes64_t count_frames_between (const BBT_Time&, const BBT_Time&) const;
- nframes64_t count_frames_between_metrics (const Meter&, const Tempo&,
- const BBT_Time&, const BBT_Time&) const;
+ framecnt_t count_frames_between (const BBT_Time&, const BBT_Time&) const;
+ framecnt_t count_frames_between_metrics (const Meter&, const Tempo&,
+ const BBT_Time&, const BBT_Time&) const;
int move_metric_section (MetricSection&, const BBT_Time& to);
void do_insert (MetricSection* section, bool with_bbt);
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index f91b67bb5a..cc36941ba8 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -53,13 +53,20 @@ namespace ARDOUR {
typedef uint32_t layer_t;
typedef uint64_t microseconds_t;
typedef uint32_t nframes_t;
- typedef int64_t nframes64_t;
- typedef int64_t sframes_t;
+ /* Any position measured in audio frames.
+ Assumed to be non-negative but not enforced.
+ */
typedef int64_t framepos_t;
- /* any offset from a framepos_t, measured in audio frames */
+
+ /* Any distance from a given framepos_t.
+ Maybe positive or negative.
+ */
typedef int64_t frameoffset_t;
- /* any count of audio frames */
+
+ /* Any count of audio frames.
+ Assumed to be positive but not enforced.
+ */
typedef int64_t framecnt_t;
static const framepos_t max_framepos = INT64_MAX;
@@ -422,7 +429,7 @@ namespace ARDOUR {
int opts; // really RubberBandStretcher::Options
};
- typedef std::list<nframes64_t> AnalysisFeatureList;
+ typedef std::list<framepos_t> AnalysisFeatureList;
typedef std::list<boost::shared_ptr<Route> > RouteList;
@@ -533,22 +540,22 @@ std::ostream& operator<<(std::ostream& o, const ARDOUR::WaveformScale& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::WaveformShape& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::PositionLockStyle& sf);
-static inline ARDOUR::nframes64_t
-session_frame_to_track_frame (ARDOUR::nframes64_t session_frame, double speed)
+static inline ARDOUR::framepos_t
+session_frame_to_track_frame (ARDOUR::framepos_t session_frame, double speed)
{
- return (ARDOUR::nframes64_t)( (double)session_frame * speed );
+ return (ARDOUR::framepos_t)( (double)session_frame * speed );
}
-static inline ARDOUR::nframes64_t
-track_frame_to_session_frame (ARDOUR::nframes64_t track_frame, double speed)
+static inline ARDOUR::framepos_t
+track_frame_to_session_frame (ARDOUR::framepos_t track_frame, double speed)
{
- return (ARDOUR::nframes64_t)( (double)track_frame / speed );
+ return (ARDOUR::framepos_t)( (double)track_frame / speed );
}
/* for now, break the rules and use "using" to make these "global" */
using ARDOUR::nframes_t;
-using ARDOUR::nframes64_t;
+using ARDOUR::framepos_t;
#endif /* __ardour_types_h__ */