mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-19 05:06:31 +01:00
Fix a few framecnt / framepos type confusions.
git-svn-id: svn://localhost/ardour2/branches/3.0@11975 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
c8228ba985
commit
cc7d4db5fe
25 changed files with 34 additions and 34 deletions
|
|
@ -310,7 +310,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
double compute_x_delta (GdkEvent const *, ARDOUR::framecnt_t *);
|
||||
double compute_x_delta (GdkEvent const *, ARDOUR::framepos_t *);
|
||||
bool y_movement_allowed (int, double) const;
|
||||
|
||||
bool _brushing;
|
||||
|
|
|
|||
|
|
@ -2953,7 +2953,7 @@ MidiRegionView::nudge_notes (bool forward)
|
|||
|
||||
framepos_t ref_point = source_beats_to_absolute_frames ((*(_selection.begin()))->note()->time());
|
||||
framepos_t unused;
|
||||
framepos_t distance;
|
||||
framecnt_t distance;
|
||||
|
||||
if (trackview.editor().snap_mode() == Editing::SnapOff) {
|
||||
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ RhythmFerret::run_analysis ()
|
|||
}
|
||||
|
||||
int
|
||||
RhythmFerret::run_percussion_onset_analysis (boost::shared_ptr<Readable> readable, framepos_t /*offset*/, AnalysisFeatureList& results)
|
||||
RhythmFerret::run_percussion_onset_analysis (boost::shared_ptr<Readable> readable, frameoffset_t /*offset*/, AnalysisFeatureList& results)
|
||||
{
|
||||
TransientDetector t (_session->frame_rate());
|
||||
|
||||
|
|
@ -263,7 +263,7 @@ RhythmFerret::get_note_onset_function ()
|
|||
}
|
||||
|
||||
int
|
||||
RhythmFerret::run_note_onset_analysis (boost::shared_ptr<Readable> readable, framepos_t /*offset*/, AnalysisFeatureList& results)
|
||||
RhythmFerret::run_note_onset_analysis (boost::shared_ptr<Readable> readable, frameoffset_t /*offset*/, AnalysisFeatureList& results)
|
||||
{
|
||||
try {
|
||||
OnsetDetector t (_session->frame_rate());
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ TimeAxisViewItem::get_position() const
|
|||
*/
|
||||
|
||||
bool
|
||||
TimeAxisViewItem::set_duration (framepos_t dur, void* src)
|
||||
TimeAxisViewItem::set_duration (framecnt_t dur, void* src)
|
||||
{
|
||||
if ((dur > max_item_duration) || (dur < min_item_duration)) {
|
||||
warning << string_compose (_("new duration %1 frames is out of bounds for %2"), get_item_name(), dur)
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
|
|||
|
||||
protected:
|
||||
TimeAxisViewItem(const std::string &, ArdourCanvas::Group&, TimeAxisView&, double, Gdk::Color const &,
|
||||
framepos_t, framepos_t, bool recording = false, bool automation = false, Visibility v = Visibility (0));
|
||||
framepos_t, framecnt_t, bool recording = false, bool automation = false, Visibility v = Visibility (0));
|
||||
|
||||
TimeAxisViewItem (const TimeAxisViewItem&);
|
||||
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ class AudioRegion : public Region
|
|||
int set_transients (AnalysisFeatureList&);
|
||||
int get_transients (AnalysisFeatureList&, bool force_new = false);
|
||||
int update_transient (framepos_t old_position, framepos_t new_position);
|
||||
int adjust_transients (framepos_t delta);
|
||||
int adjust_transients (frameoffset_t delta);
|
||||
|
||||
AudioIntervalResult find_silence (Sample, framecnt_t, InterThreadInfo&) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public:
|
|||
virtual uint32_t channels() const = 0;
|
||||
virtual framecnt_t length() const = 0;
|
||||
virtual framecnt_t samplerate() const = 0;
|
||||
virtual void seek (framecnt_t pos) = 0;
|
||||
virtual void seek (framepos_t pos) = 0;
|
||||
virtual framepos_t natural_position() const = 0;
|
||||
|
||||
virtual bool clamped_at_unity () const = 0;
|
||||
|
|
|
|||
|
|
@ -60,12 +60,12 @@ protected:
|
|||
|
||||
void flush_midi();
|
||||
|
||||
framepos_t read_unlocked (Evoral::EventSink<framepos_t>& dst,
|
||||
framecnt_t read_unlocked (Evoral::EventSink<framepos_t>& dst,
|
||||
framepos_t position,
|
||||
framepos_t start, framecnt_t cnt,
|
||||
MidiStateTracker* tracker) const;
|
||||
|
||||
framepos_t write_unlocked (MidiRingBuffer<framepos_t>& dst,
|
||||
framecnt_t write_unlocked (MidiRingBuffer<framepos_t>& dst,
|
||||
framepos_t position,
|
||||
framecnt_t cnt);
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class MidiRegion : public Region
|
|||
NoteMode mode = Sustained,
|
||||
MidiStateTracker* tracker = 0) const;
|
||||
|
||||
framepos_t master_read_at (MidiRingBuffer<framepos_t>& dst,
|
||||
framecnt_t master_read_at (MidiRingBuffer<framepos_t>& dst,
|
||||
framepos_t position,
|
||||
framecnt_t dur,
|
||||
uint32_t chan_n = 0,
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public:
|
|||
boost::shared_ptr<Region> bounce (InterThreadInfo&);
|
||||
boost::shared_ptr<Region> bounce_range (framepos_t start, framepos_t end, InterThreadInfo&,
|
||||
boost::shared_ptr<Processor> endpoint, bool include_endpoint);
|
||||
int export_stuff (BufferSet& bufs, framecnt_t nframes, framepos_t end_frame,
|
||||
int export_stuff (BufferSet& bufs, framepos_t start_frame, framecnt_t end_frame,
|
||||
boost::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export);
|
||||
|
||||
int set_state (const XMLNode&, int version);
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class Region
|
|||
float stretch () const { return _stretch; }
|
||||
float shift () const { return _shift; }
|
||||
|
||||
void set_ancestral_data (framepos_t start, framepos_t length, float stretch, float shift);
|
||||
void set_ancestral_data (framepos_t start, framecnt_t length, float stretch, float shift);
|
||||
|
||||
frameoffset_t sync_offset (int& dir) const;
|
||||
framepos_t sync_position () const;
|
||||
|
|
@ -282,7 +282,7 @@ class Region
|
|||
return 0;
|
||||
}
|
||||
|
||||
virtual int adjust_transients (framepos_t /*delta*/) {
|
||||
virtual int adjust_transients (frameoffset_t /*delta*/) {
|
||||
// no transients, but its OK
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class ResampledImportableSource : public ImportableSource
|
|||
uint32_t channels() const { return source->channels(); }
|
||||
framecnt_t length() const { return source->length(); }
|
||||
framecnt_t samplerate() const { return source->samplerate(); }
|
||||
void seek (framecnt_t);
|
||||
void seek (framepos_t);
|
||||
framepos_t natural_position() const;
|
||||
|
||||
bool clamped_at_unity () const {
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
|
|||
|
||||
/* end of vfunc-based API */
|
||||
|
||||
void shift (framepos_t, framepos_t);
|
||||
void shift (framepos_t, framecnt_t);
|
||||
|
||||
void set_gain (gain_t val, void *src);
|
||||
void inc_gain (gain_t delta, void *src);
|
||||
|
|
@ -435,7 +435,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
|
|||
virtual void set_block_size (pframes_t nframes);
|
||||
|
||||
protected:
|
||||
virtual framecnt_t check_initial_delay (framecnt_t nframes, framecnt_t&) { return nframes; }
|
||||
virtual framecnt_t check_initial_delay (framecnt_t nframes, framepos_t&) { return nframes; }
|
||||
|
||||
void passthru (framepos_t start_frame, framepos_t end_frame,
|
||||
pframes_t nframes, int declick);
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ class Slave {
|
|||
* only if requires_seekahead() returns true.
|
||||
*/
|
||||
|
||||
virtual framepos_t seekahead_distance() const { return 0; }
|
||||
virtual framecnt_t seekahead_distance() const { return 0; }
|
||||
|
||||
/**
|
||||
* @return - when returning true, ARDOUR will use transport speed 1.0 no matter what
|
||||
|
|
@ -235,7 +235,7 @@ class MTC_Slave : public Slave {
|
|||
|
||||
framecnt_t resolution () const;
|
||||
bool requires_seekahead () const { return true; }
|
||||
framepos_t seekahead_distance() const;
|
||||
framecnt_t seekahead_distance() const;
|
||||
bool give_slave_full_control_over_transport_speed() const;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class SndFileImportableSource : public ImportableSource {
|
|||
uint32_t channels() const;
|
||||
framecnt_t length() const;
|
||||
framecnt_t samplerate() const;
|
||||
void seek (framecnt_t pos);
|
||||
void seek (framepos_t pos);
|
||||
framepos_t natural_position() const;
|
||||
bool clamped_at_unity () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ class TempoMap : public PBD::StatefulDestructible
|
|||
to provide an answer.
|
||||
*/
|
||||
void bbt_time_rt (framepos_t when, Timecode::BBT_Time&);
|
||||
framecnt_t frame_time (const Timecode::BBT_Time&);
|
||||
framepos_t frame_time (const Timecode::BBT_Time&);
|
||||
framecnt_t bbt_duration_at (framepos_t, const Timecode::BBT_Time&, int dir);
|
||||
|
||||
/* TEMPO-SENSITIVE FUNCTIONS
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ class Track : public Route, public PublicDiskstream
|
|||
|
||||
boost::shared_ptr<RecEnableControl> _rec_enable_control;
|
||||
|
||||
framecnt_t check_initial_delay (framecnt_t nframes, framecnt_t&);
|
||||
framecnt_t check_initial_delay (framecnt_t nframes, framepos_t&);
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace ARDOUR {
|
|||
* supplied to the constructor. Returns the equivalent number of frames,
|
||||
* taking tempo changes into account.
|
||||
*/
|
||||
framecnt_t
|
||||
framepos_t
|
||||
BeatsFramesConverter::to (double beats) const
|
||||
{
|
||||
if (beats < 0) {
|
||||
|
|
@ -47,7 +47,7 @@ BeatsFramesConverter::to (double beats) const
|
|||
* taking tempo changes into account.
|
||||
*/
|
||||
double
|
||||
BeatsFramesConverter::from (framecnt_t frames) const
|
||||
BeatsFramesConverter::from (framepos_t frames) const
|
||||
{
|
||||
double b = _tempo_map.framewalk_to_beats (_origin_b, frames);
|
||||
return b;
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ Crossfade::initialize ()
|
|||
}
|
||||
|
||||
framecnt_t
|
||||
Crossfade::read_raw_internal (Sample* buf, framecnt_t start, framecnt_t cnt, int channel) const
|
||||
Crossfade::read_raw_internal (Sample* buf, framepos_t start, framecnt_t cnt, int channel) const
|
||||
{
|
||||
Sample* mixdown = new Sample[cnt];
|
||||
float* gain = new float[cnt];
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ MidiPlaylistSource::length (framepos_t) const
|
|||
return extent.second - extent.first;
|
||||
}
|
||||
|
||||
framepos_t
|
||||
framecnt_t
|
||||
MidiPlaylistSource::read_unlocked (Evoral::EventSink<framepos_t>& dst,
|
||||
framepos_t /*position*/,
|
||||
framepos_t start, framecnt_t cnt,
|
||||
|
|
@ -141,7 +141,7 @@ MidiPlaylistSource::read_unlocked (Evoral::EventSink<framepos_t>& dst,
|
|||
return mp->read (dst, start, cnt);
|
||||
}
|
||||
|
||||
framepos_t
|
||||
framecnt_t
|
||||
MidiPlaylistSource::write_unlocked (MidiRingBuffer<framepos_t>& dst,
|
||||
framepos_t,
|
||||
framecnt_t)
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ MidiTrack::write_out_of_band_data (BufferSet& bufs, framepos_t /*start*/, framep
|
|||
}
|
||||
|
||||
int
|
||||
MidiTrack::export_stuff (BufferSet& /*bufs*/, framecnt_t /*nframes*/, framepos_t /*end_frame*/,
|
||||
MidiTrack::export_stuff (BufferSet& /*bufs*/, framepos_t /*start_frame*/, framecnt_t /*nframes*/,
|
||||
boost::shared_ptr<Processor> /*endpoint*/, bool /*include_endpoint*/, bool /*forexport*/)
|
||||
{
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -2964,7 +2964,7 @@ Route::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, in
|
|||
return 0;
|
||||
}
|
||||
|
||||
framecnt_t unused = 0;
|
||||
framepos_t unused = 0;
|
||||
|
||||
if ((nframes = check_initial_delay (nframes, unused)) == 0) {
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ Source::mark_for_remove ()
|
|||
}
|
||||
|
||||
void
|
||||
Source::set_timeline_position (int64_t pos)
|
||||
Source::set_timeline_position (framepos_t pos)
|
||||
{
|
||||
_timeline_position = pos;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class TestSlaveSessionProxy : public ISlaveSessionProxy {
|
|||
framepos_t audible_frame () const { return _transport_frame; }
|
||||
framepos_t transport_frame () const { return _transport_frame; }
|
||||
pframes_t frames_since_cycle_start () const { return 0; }
|
||||
framecnt_t frame_time () const { return _frame_time; }
|
||||
framepos_t frame_time () const { return _frame_time; }
|
||||
|
||||
void request_locate (framepos_t frame, bool with_roll = false) {
|
||||
_transport_frame = frame;
|
||||
|
|
|
|||
|
|
@ -577,13 +577,13 @@ Track::hidden () const
|
|||
}
|
||||
|
||||
int
|
||||
Track::can_internal_playback_seek (framepos_t p)
|
||||
Track::can_internal_playback_seek (framecnt_t p)
|
||||
{
|
||||
return _diskstream->can_internal_playback_seek (p);
|
||||
}
|
||||
|
||||
int
|
||||
Track::internal_playback_seek (framepos_t p)
|
||||
Track::internal_playback_seek (framecnt_t p)
|
||||
{
|
||||
return _diskstream->internal_playback_seek (p);
|
||||
}
|
||||
|
|
@ -859,7 +859,7 @@ Track::maybe_declick (BufferSet& bufs, framecnt_t nframes, int declick)
|
|||
}
|
||||
|
||||
framecnt_t
|
||||
Track::check_initial_delay (framecnt_t nframes, framecnt_t& transport_frame)
|
||||
Track::check_initial_delay (framecnt_t nframes, framepos_t& transport_frame)
|
||||
{
|
||||
if (_roll_delay > nframes) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue