Rename 'position' parameter of MidiSource::midi_read to clearer 'source_start'.
authorDavid Robillard <d@drobilla.net>
Thu, 30 Apr 2009 21:56:40 +0000 (21:56 +0000)
committerDavid Robillard <d@drobilla.net>
Thu, 30 Apr 2009 21:56:40 +0000 (21:56 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@5021 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/ardour/midi_source.h
libs/ardour/ardour/smf_source.h
libs/ardour/smf_source.cc

index e84c21f638261345c8561dbf81df9a07268f532b..cf49e594584255af7e94655786d2b798d593d75e 100644 (file)
@@ -50,25 +50,25 @@ class MidiSource : virtual public Source
        /** Read the data in a given time range from the MIDI source.
         * All time stamps in parameters are in audio frames (even if the source has tempo time).
         * \param dst Ring buffer where read events are written
-        * \param position Start position of the SOURCE in this read context
+        * \param source_start Start position of the SOURCE in this read context
         * \param start Start of range to be read
         * \param cnt Length of range to be read (in audio frames)
         * \param stamp_offset Offset to add to event times written to dst
         * \param negative_stamp_offset Offset to subtract from event times written to dst
         */
        virtual nframes_t midi_read (MidiRingBuffer<nframes_t>& dst,
-                       sframes_t position,
+                       sframes_t source_start,
                        sframes_t start, nframes_t cnt,
                        sframes_t stamp_offset, sframes_t negative_stamp_offset) const;
 
        virtual nframes_t midi_write (MidiRingBuffer<nframes_t>& src,
-                       sframes_t position,
+                       sframes_t source_start,
                        nframes_t cnt);
 
        virtual void append_event_unlocked_beats(const Evoral::Event<double>& ev) = 0;
 
        virtual void append_event_unlocked_frames(const Evoral::Event<nframes_t>& ev,
-                       sframes_t position) = 0;
+                       sframes_t source_start) = 0;
        
        virtual sframes_t length (sframes_t pos) const;
        virtual void      update_length (sframes_t pos, sframes_t cnt);
index 3321a089b7bde44a8b429c344d72d818ac5cf449..dc9cbeee55bd8a8fa620260f56a194e0a3cacea2 100644 (file)
@@ -52,7 +52,7 @@ public:
        bool set_name (const std::string& newname) { return (set_source_name(newname, false) == 0); }
        
        void append_event_unlocked_beats (const Evoral::Event<double>& ev);
-       void append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, sframes_t position);
+       void append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, sframes_t source_start);
 
        void mark_streaming_midi_write_started (NoteMode mode, sframes_t start_time);
        void mark_streaming_write_completed ();
index 1c08e95360f82034ac6e7d4ae32a07bd7b50cade..5c420bf986d7ec37cd9216b6c8e3d492c686617a 100644 (file)
@@ -95,7 +95,7 @@ SMFSource::~SMFSource ()
 
 /** All stamps in audio frames */
 nframes_t
-SMFSource::read_unlocked (MidiRingBuffer<nframes_t>& destination, sframes_t position,
+SMFSource::read_unlocked (MidiRingBuffer<nframes_t>& destination, sframes_t source_start,
                sframes_t start, nframes_t duration,
                sframes_t stamp_offset, sframes_t negative_stamp_offset) const
 {
@@ -112,7 +112,7 @@ SMFSource::read_unlocked (MidiRingBuffer<nframes_t>& destination, sframes_t posi
 
        size_t scratch_size = 0; // keep track of scratch to minimize reallocs
        
-       BeatsFramesConverter converter(_session, position);
+       BeatsFramesConverter converter(_session, source_start);
 
        const uint64_t start_ticks = (uint64_t)(converter.from(start) * ppqn());