A few type fixes.
authorCarl Hetherington <carl@carlh.net>
Thu, 2 Dec 2010 19:25:53 +0000 (19:25 +0000)
committerCarl Hetherington <carl@carlh.net>
Thu, 2 Dec 2010 19:25:53 +0000 (19:25 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8154 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/ardour/audioplaylist.h
libs/ardour/ardour/crossfade.h
libs/ardour/ardour/public_diskstream.h
libs/ardour/ardour/session.h
libs/ardour/audio_playlist.cc
libs/ardour/session_transport.cc
libs/surfaces/control_protocol/basic_ui.cc
libs/surfaces/control_protocol/control_protocol/basic_ui.h

index edf5008283a74cde03dea012cc8708f3b9201756..253329b38e7ab79e4a103fb03bc9e07033a0c296 100644 (file)
@@ -78,7 +78,7 @@ public:
 
        void clear (bool with_signals=true);
 
-        nframes_t read (Sample *dst, Sample *mixdown, float *gain_buffer, nframes_t start, nframes_t cnt, uint32_t chan_n=0);
+        framecnt_t read (Sample *dst, Sample *mixdown, float *gain_buffer, framepos_t start, framecnt_t cnt, uint32_t chan_n=0);
 
        int set_state (const XMLNode&, int version);
 
index 2ce504eacfc8d0190ec9e8cf897f1e7e80101a23..53fbe076166e82afc3120d18f0cc7e36f3869389 100644 (file)
@@ -114,7 +114,7 @@ class Crossfade : public ARDOUR::AudioRegion
 
        PBD::Signal1<void,boost::shared_ptr<Region> > Invalidated;
 
-       bool covers (framecnt_t frame) const {
+       bool covers (framepos_t frame) const {
                return _position <= frame && frame < _position + _length;
        }
 
index 41aaeb44ee5b44819eb1070b2c355a8eb004bea5..37bac7b71efd401ee2ceac38f7dd81faa7b43c62 100755 (executable)
@@ -48,8 +48,8 @@ public:
        virtual void set_pending_overwrite (bool) = 0;
        virtual int seek (framepos_t, bool complete_refill = false) = 0;
        virtual bool hidden () const = 0;
-       virtual int can_internal_playback_seek (framepos_t) = 0;
-       virtual int internal_playback_seek (framepos_t) = 0;
+       virtual int can_internal_playback_seek (framecnt_t) = 0;
+       virtual int internal_playback_seek (framecnt_t) = 0;
        virtual void non_realtime_input_change () = 0;
        virtual void non_realtime_locate (framepos_t) = 0;
        virtual void non_realtime_set_speed () = 0;
index a8daebabfb1f8a0770c9cdafca6496c7f8aef725..f1a79ba4f38fb5b7b14796133d4891a801b2ac3a 100644 (file)
@@ -289,10 +289,10 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        void queue_event (SessionEvent*);
 
-       void request_roll_at_and_return (nframes_t start, nframes_t return_to);
-       void request_bounded_roll (nframes_t start, nframes_t end);
+       void request_roll_at_and_return (framepos_t start, framepos_t return_to);
+       void request_bounded_roll (framepos_t start, framepos_t end);
        void request_stop (bool abort = false, bool clear_state = false);
-       void request_locate (nframes_t frame, bool with_roll = false);
+       void request_locate (framepos_t frame, bool with_roll = false);
 
        void request_play_loop (bool yn, bool leave_rolling = false);
        bool get_play_loop () const { return play_loop; }
index 9c3bce4196eb39b9560afa27e343c3a584fb45b3..1fa9c5adc4990659b8bca3de450f85b5b974b076 100644 (file)
@@ -184,14 +184,11 @@ struct RegionSortByLayer {
     }
 };
 
-ARDOUR::nframes_t
-AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, nframes_t start,
-                    nframes_t cnt, unsigned chan_n)
+ARDOUR::framecnt_t
+AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, framepos_t start,
+                    framecnt_t cnt, unsigned chan_n)
 {
-       nframes_t ret = cnt;
-       nframes_t end;
-       nframes_t read_frames;
-       nframes_t skip_frames;
+       framecnt_t ret = cnt;
 
        /* optimizing this memset() away involves a lot of conditionals
           that may well cause more of a hit due to cache misses
@@ -214,9 +211,9 @@ AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, nf
 
        Glib::RecMutex::Lock rm (region_lock);
 
-       end =  start + cnt - 1;
-       read_frames = 0;
-       skip_frames = 0;
+       framepos_t const end = start + cnt - 1;
+       framecnt_t read_frames = 0;
+       framecnt_t skip_frames = 0;
        _read_data_count = 0;
 
        _read_data_count = 0;
index 1d5f72e670b610adc565b4a6532d922e7d172652..3c500656846ac6fb806cca3bca2088830b765a75 100644 (file)
@@ -123,7 +123,7 @@ Session::request_stop (bool abort, bool clear_state)
 }
 
 void
-Session::request_locate (nframes_t target_frame, bool with_roll)
+Session::request_locate (framepos_t target_frame, bool with_roll)
 {
        SessionEvent *ev = new SessionEvent (with_roll ? SessionEvent::LocateRoll : SessionEvent::Locate, SessionEvent::Add, SessionEvent::Immediate, target_frame, 0, false);
        DEBUG_TRACE (DEBUG::Transport, string_compose ("Request locate to %1\n", target_frame));
@@ -1398,7 +1398,7 @@ Session::set_play_range (list<AudioRange>& range, bool leave_rolling)
 }
 
 void
-Session::request_bounded_roll (nframes_t start, nframes_t end)
+Session::request_bounded_roll (framepos_t start, framepos_t end)
 {
        AudioRange ar (start, end, 0);
        list<AudioRange> lar;
@@ -1407,7 +1407,7 @@ Session::request_bounded_roll (nframes_t start, nframes_t end)
        request_play_range (&lar, true);
 }
 void
-Session::request_roll_at_and_return (nframes_t start, nframes_t return_to)
+Session::request_roll_at_and_return (framepos_t start, framepos_t return_to)
 {
        SessionEvent *ev = new SessionEvent (SessionEvent::LocateRollLocate, SessionEvent::Add, SessionEvent::Immediate, return_to, 1.0);
        ev->target2_frame = start;
index 3d00b6283f4c6025d33f62544f38e6712acb64ce..9d55b3ac53db3573da1dd89612ff97be0b839500 100644 (file)
@@ -28,7 +28,6 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
-using ARDOUR::nframes_t;
 
 PBD::Signal2<void,std::string,std::string> BasicUI::AccessAction;
 
@@ -94,7 +93,7 @@ BasicUI::goto_end ()
 void       
 BasicUI::add_marker ()
 {
-       nframes_t when = session->audible_frame();
+       framepos_t when = session->audible_frame();
        session->locations()->add (new Location (*session, when, when, _("unnamed"), Location::IsMark));
 }
 
@@ -248,14 +247,14 @@ BasicUI::set_record_enable (bool yn)
        }
 }
 
-nframes_t
+framepos_t
 BasicUI::transport_frame ()
 {
        return session->transport_frame();
 }
 
 void
-BasicUI::locate (nframes_t where, bool roll_after_locate)
+BasicUI::locate (framepos_t where, bool roll_after_locate)
 {
        session->request_locate (where, roll_after_locate);
 }
@@ -272,26 +271,26 @@ BasicUI::locked ()
        return session->transport_locked ();
 }
 
-nframes_t
+ARDOUR::framecnt_t
 BasicUI::timecode_frames_per_hour ()
 {
        return session->timecode_frames_per_hour ();
 }
 
 void
-BasicUI::timecode_time (nframes_t where, Timecode::Time& timecode)
+BasicUI::timecode_time (framepos_t where, Timecode::Time& timecode)
 {
        session->timecode_time (where, *((Timecode::Time *) &timecode));
 }
 
 void 
-BasicUI::timecode_to_sample (Timecode::Time& timecode, int64_t& sample, bool use_offset, bool use_subframes) const
+BasicUI::timecode_to_sample (Timecode::Time& timecode, framepos_t & sample, bool use_offset, bool use_subframes) const
 {
        session->timecode_to_sample (*((Timecode::Time*)&timecode), sample, use_offset, use_subframes);
 }
 
 void 
-BasicUI::sample_to_timecode (int64_t sample, Timecode::Time& timecode, bool use_offset, bool use_subframes) const
+BasicUI::sample_to_timecode (framepos_t sample, Timecode::Time& timecode, bool use_offset, bool use_subframes) const
 {
        session->sample_to_timecode (sample, *((Timecode::Time*)&timecode), use_offset, use_subframes);
 }
index 7e25ea8a90cf4be9eb063b8ef040381a964d20d2..4f53ed43ae3139d71290590d36260181679d60d9 100644 (file)
@@ -26,6 +26,8 @@
 
 #include "pbd/signals.h"
 
+#include "ardour/types.h"
+
 #include <jack/types.h>
 
 #include "control_protocol/timecode.h"
@@ -58,8 +60,8 @@ class BasicUI {
        void set_transport_speed (double speed);
        double get_transport_speed ();
 
-       jack_nframes_t transport_frame ();
-       void locate (jack_nframes_t frame, bool play = false);
+       ARDOUR::framepos_t transport_frame ();
+       void locate (ARDOUR::framepos_t frame, bool play = false);
        bool locating ();
        bool locked ();
 
@@ -77,11 +79,11 @@ class BasicUI {
        void rec_enable_toggle ();
        void toggle_all_rec_enables ();
 
-       jack_nframes_t timecode_frames_per_hour ();
+       ARDOUR::framecnt_t timecode_frames_per_hour ();
 
-       void timecode_time (jack_nframes_t where, Timecode::Time&);
-       void timecode_to_sample (Timecode::Time& timecode, int64_t& sample, bool use_offset, bool use_subframes) const;
-       void sample_to_timecode (int64_t sample, Timecode::Time& timecode, bool use_offset, bool use_subframes) const;
+       void timecode_time (framepos_t where, Timecode::Time&);
+       void timecode_to_sample (Timecode::Time& timecode, framepos_t & sample, bool use_offset, bool use_subframes) const;
+       void sample_to_timecode (framepos_t sample, Timecode::Time& timecode, bool use_offset, bool use_subframes) const;
 
   protected:
        BasicUI ();