Remove unused read/write data count code.
authorCarl Hetherington <carl@carlh.net>
Mon, 24 Oct 2011 20:45:29 +0000 (20:45 +0000)
committerCarl Hetherington <carl@carlh.net>
Mon, 24 Oct 2011 20:45:29 +0000 (20:45 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@10300 d708f5d6-7413-0410-9779-e7cbd77b26cf

25 files changed:
libs/ardour/ardour/audioregion.h
libs/ardour/ardour/audiosource.h
libs/ardour/ardour/butler.h
libs/ardour/ardour/diskstream.h
libs/ardour/ardour/midi_source.h
libs/ardour/ardour/playlist.h
libs/ardour/ardour/public_diskstream.h
libs/ardour/ardour/region.h
libs/ardour/ardour/track.h
libs/ardour/audio_diskstream.cc
libs/ardour/audio_playlist.cc
libs/ardour/audioregion.cc
libs/ardour/audiosource.cc
libs/ardour/butler.cc
libs/ardour/coreaudiosource.cc
libs/ardour/diskstream.cc
libs/ardour/midi_diskstream.cc
libs/ardour/midi_playlist.cc
libs/ardour/midi_region.cc
libs/ardour/midi_source.cc
libs/ardour/playlist.cc
libs/ardour/region.cc
libs/ardour/smf_source.cc
libs/ardour/sndfilesource.cc
libs/ardour/track.cc

index b418a2c4093821df0a5ccee7e2e1e5615eda4fca..a13b8177181b3292184019d610353dff5af72cde 100644 (file)
@@ -102,8 +102,7 @@ class AudioRegion : public Region
                ReadOpsNone = 0x0,
                ReadOpsOwnAutomation = 0x1,
                ReadOpsOwnScaling = 0x2,
-               ReadOpsCount = 0x4,
-               ReadOpsFades = 0x8
+               ReadOpsFades = 0x4
        };
 
        virtual framecnt_t read (Sample*, framepos_t pos, framecnt_t cnt, int channel) const;
index c9eb3bfc45f72c4146d3de45db62e769385f7703..1d811bbfa3a8746550fc255871f0cefbcef5bfcd 100644 (file)
@@ -67,10 +67,6 @@ class AudioSource : virtual public Source,
        void set_captured_for (std::string str) { _captured_for = str; }
        std::string captured_for() const { return _captured_for; }
 
-       uint32_t read_data_count() const { return _read_data_count; }
-       uint32_t write_data_count() const { return _write_data_count; }
-       void dec_read_data_count (framecnt_t);
-
        int read_peaks (PeakData *peaks, framecnt_t npeaks,
                        framepos_t start, framecnt_t cnt, double samples_per_visual_peak) const;
 
@@ -131,9 +127,6 @@ class AudioSource : virtual public Source,
        std::string         peakpath;
        std::string        _captured_for;
 
-       mutable uint32_t _read_data_count;  // modified in read()
-       mutable uint32_t _write_data_count; // modified in write()
-
        int initialize_peakfile (bool newfile, std::string path);
        int build_peaks_from_scratch ();
        int compute_and_write_peaks (Sample* buf, framecnt_t first_frame, framecnt_t cnt,
index 9740099360b37b100ef8b78216db2c1fa16a41c6..120f5871f4e4fb9853e731e4736c3a269c647cf8 100644 (file)
@@ -51,9 +51,6 @@ class Butler : public SessionHandleRef
        bool transport_work_requested() const;
        void drop_references ();
 
-       float read_data_rate() const; ///< in usec
-       float write_data_rate() const;
-
        framecnt_t audio_diskstream_capture_buffer_size() const { return audio_dstream_capture_buffer_size; }
        framecnt_t audio_diskstream_playback_buffer_size() const { return audio_dstream_playback_buffer_size; }
        uint32_t midi_diskstream_buffer_size()  const { return midi_dstream_buffer_size; }
index 975c8d45da51663c48f264fa6441173ffe9b1476..039474b5bdabc86507bf482245bbd625cbb3d5cc 100644 (file)
@@ -175,9 +175,6 @@ class Diskstream : public SessionObject, public PublicDiskstream
        virtual void reset_write_sources (bool, bool force = false) = 0;
        virtual void non_realtime_input_change () = 0;
 
-       uint32_t read_data_count() const { return _read_data_count; }
-       uint32_t write_data_count() const { return _write_data_count; }
-
   protected:
        friend class Auditioner;
        virtual int  seek (framepos_t which_sample, bool complete_refill = false) = 0;
@@ -290,9 +287,6 @@ class Diskstream : public SessionObject, public PublicDiskstream
        framepos_t     playback_sample;
        framecnt_t     playback_distance;
 
-       uint32_t     _read_data_count;
-       uint32_t     _write_data_count;
-
        bool          in_set_state;
 
        Glib::Mutex state_lock;
index 735a38faa558bc954925ce93f7b05b1898be9593..3564fff4fcc4fa38d9e752311447629263f0704d 100644 (file)
@@ -95,9 +95,6 @@ class MidiSource : virtual public Source, public boost::enable_shared_from_this<
        std::string captured_for() const               { return _captured_for; }
        void        set_captured_for (std::string str) { _captured_for = str; }
 
-       uint32_t read_data_count()  const { return _read_data_count; }
-       uint32_t write_data_count() const { return _write_data_count; }
-
        framepos_t last_write_end() const { return _last_write_end; }
        void set_last_write_end (framepos_t pos) { _last_write_end = pos; }
 
@@ -155,8 +152,6 @@ class MidiSource : virtual public Source, public boost::enable_shared_from_this<
                                           framecnt_t cnt) = 0;
 
        std::string      _captured_for;
-       mutable uint32_t _read_data_count;  ///< modified in read()
-       mutable uint32_t _write_data_count; ///< modified in write()
 
        boost::shared_ptr<MidiModel> _model;
        bool                         _writing;
index 934695633e33c57f351b3bb5b9cdaae9d45c5851..9e15b9cf5d10795f2d283d93eb866a3d12e296ea 100644 (file)
@@ -201,8 +201,6 @@ public:
        void raise_region_to_top (boost::shared_ptr<Region>);
        void lower_region_to_bottom (boost::shared_ptr<Region>);
 
-       uint32_t read_data_count() const { return _read_data_count; }
-
        /* XXX: use of diskstream here is a little unfortunate */
        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; }
@@ -292,7 +290,6 @@ public:
        bool             in_partition;
        bool            _frozen;
        uint32_t         subcnt;
-       uint32_t        _read_data_count;
        PBD::ID         _orig_diskstream_id;
        uint64_t         layer_op_counter;
        framecnt_t       freeze_length;
index 8dc720963a39dffc23f6831e348bfd71097917b8..3dadf2e8be776d6fc73f17e119ac1f84b112286e 100755 (executable)
@@ -43,8 +43,6 @@ public:
        virtual float capture_buffer_load () const = 0;
        virtual int do_refill () = 0;
        virtual int do_flush (RunContext, bool force = false) = 0;
-       virtual uint32_t read_data_count() const = 0;
-       virtual uint32_t write_data_count() const = 0;
        virtual void set_pending_overwrite (bool) = 0;
        virtual int seek (framepos_t, bool complete_refill = false) = 0;
        virtual bool hidden () const = 0;
index 4b3e4623af049750ae8aa5223c5316de875769e9..a2cc3f4cf76069b3ba42ca696757de8a59bad254 100644 (file)
@@ -221,8 +221,6 @@ class Region
 
        int apply (Filter &, Progress* progress = 0);
 
-       virtual uint64_t read_data_count () const { return _read_data_count; }
-
        boost::shared_ptr<ARDOUR::Playlist> playlist () const { return _playlist.lock(); }
        virtual void set_playlist (boost::weak_ptr<ARDOUR::Playlist>);
 
@@ -385,7 +383,6 @@ class Region
        Timecode::BBT_Time      _bbt_time;
        AnalysisFeatureList     _transients;
 
-       mutable uint64_t        _read_data_count;  ///< modified in read()
        uint64_t                _last_layer_op;  ///< timestamp
        SourceList              _sources;
        /** Used when timefx are applied, so we can always use the original source */
index 01b084641dfbef9c6528d0eadb96026127bee473..dd8a17f8cee935be56ecd719941827702b89aeea 100644 (file)
@@ -120,8 +120,6 @@ class Track : public Route, public PublicDiskstream
        float capture_buffer_load () const;
        int do_refill ();
        int do_flush (RunContext, bool force = false);
-       uint32_t read_data_count() const;
-       uint32_t write_data_count() const;
        void set_pending_overwrite (bool);
        int seek (framepos_t, bool complete_refill = false);
        bool hidden () const;
index 7b0e466ae0bd86a3cb52c5575d8f0bb3606d8f7b..80b484f9265f37f1ef8b58c98c983ddb902fec35 100644 (file)
@@ -940,8 +940,6 @@ AudioDiskstream::read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer,
                        return -1;
                }
 
-               _read_data_count = _playlist->read_data_count();
-
                if (reversed) {
 
                        swap_by_ptr (buf, buf + this_read - 1);
@@ -1218,8 +1216,6 @@ AudioDiskstream::do_flush (RunContext /*context*/, bool force_flush)
        RingBufferNPT<CaptureTransition>::rw_vector transvec;
        framecnt_t total;
 
-       _write_data_count = 0;
-
        transvec.buf[0] = 0;
        transvec.buf[1] = 0;
        vector.buf[0] = 0;
@@ -1325,8 +1321,6 @@ AudioDiskstream::do_flush (RunContext /*context*/, bool force_flush)
                                return -1;
                        }
 
-                       _write_data_count += (*chan)->write_source->write_data_count();
-
                        (*chan)->capture_buf->increment_read_ptr (to_write);
                        (*chan)->curr_capture_cnt += to_write;
                }
index 094191084d9c78da818e540e3e5255b8be35a971..b62aeb3ee7ddadb9bf6a5d0fe70a70303565a45d 100644 (file)
@@ -286,9 +286,6 @@ AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, fr
        Glib::RecMutex::Lock rm (region_lock);
 
        framepos_t const end = start + cnt - 1;
-       _read_data_count = 0;
-
-       _read_data_count = 0;
 
        RegionList* rlist = regions_to_read (start, start+cnt);
 
@@ -346,16 +343,11 @@ AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, fr
                         DEBUG_TRACE (DEBUG::AudioPlayback, string_compose ("read from region %1\n", ar->name()));
                        assert(ar);
                        ar->read_at (buf, mixdown_buffer, gain_buffer, start, cnt, chan_n);
-                       _read_data_count += ar->read_data_count();
                }
 
                for (vector<boost::shared_ptr<Crossfade> >::iterator i = x.begin(); i != x.end(); ++i) {
                         DEBUG_TRACE (DEBUG::AudioPlayback, string_compose ("read from xfade between %1 & %2\n", (*i)->out()->name(), (*i)->in()->name()));
                        (*i)->read_at (buf, mixdown_buffer, gain_buffer, start, cnt, chan_n);
-
-                       /* don't JACK up _read_data_count, since its the same data as we just
-                          read from the regions, and the OS should handle that for us.
-                       */
                }
        }
 
index 93c229d52fc945e3fb17bed173328bc25d400df4..9b8df441eec7a5c370d83a7d06f5fe4b7d3520fd 100644 (file)
@@ -433,10 +433,6 @@ AudioRegion::_read_at (const SourceList& srcs, framecnt_t limit,
                mixdown_buffer += buf_offset;
        }
 
-       if (rops & ReadOpsCount) {
-               _read_data_count = 0;
-       }
-
        if (chan_n < n_channels()) {
 
                boost::shared_ptr<AudioSource> src = boost::dynamic_pointer_cast<AudioSource> (srcs[chan_n]);
@@ -444,10 +440,6 @@ AudioRegion::_read_at (const SourceList& srcs, framecnt_t limit,
                        return 0; /* "read nothing" */
                }
 
-               if (rops & ReadOpsCount) {
-                       _read_data_count += src->read_data_count();
-               }
-
        } else {
 
                /* track is N-channel, this region has less channels; silence the ones
@@ -465,8 +457,6 @@ AudioRegion::_read_at (const SourceList& srcs, framecnt_t limit,
                                return 0; /* "read nothing" */
                        }
 
-                       /* adjust read data count appropriately since this was a duplicate read */
-                       src->dec_read_data_count (to_read);
                } else {
                        memset (mixdown_buffer, 0, sizeof (Sample) * cnt);
                }
index 612c4bd73f84fabfaeb1c1adff45b8a727c695a4..e9e7228421233e07bf25d310570091e5bdb49e3c 100644 (file)
@@ -68,8 +68,6 @@ AudioSource::AudioSource (Session& s, string name)
        _peaks_built = false;
        _peak_byte_max = 0;
        _peakfile_descriptor = 0;
-       _read_data_count = 0;
-       _write_data_count = 0;
        peak_leftover_cnt = 0;
        peak_leftover_size = 0;
        peak_leftovers = 0;
@@ -83,8 +81,6 @@ AudioSource::AudioSource (Session& s, const XMLNode& node)
        _peaks_built = false;
        _peak_byte_max = 0;
        _peakfile_descriptor = 0;
-       _read_data_count = 0;
-       _write_data_count = 0;
        peak_leftover_cnt = 0;
        peak_leftover_size = 0;
        peak_leftovers = 0;
@@ -950,18 +946,6 @@ AudioSource::available_peaks (double zoom_factor) const
        return (end/sizeof(PeakData)) * _FPP;
 }
 
-void
-AudioSource::dec_read_data_count (framecnt_t cnt)
-{
-        uint32_t val = cnt * sizeof (Sample);
-
-        if (val < _read_data_count) {
-                _read_data_count -= val;
-        } else {
-                _read_data_count = 0;
-        }
-}
-
 void
 AudioSource::mark_streaming_write_completed ()
 {
index 46bb830cbe19717070dc9e5a7f99754c0a1921e9..7a5d50d06dd572c85cd4f14b5cd6feb7fc292914 100644 (file)
@@ -35,9 +35,6 @@
 
 using namespace PBD;
 
-static float _read_data_rate;
-static float _write_data_rate;
-
 namespace ARDOUR {
 
 Butler::Butler(Session& s)
@@ -144,9 +141,6 @@ void *
 Butler::thread_work ()
 {
        uint32_t err = 0;
-       int32_t bytes;
-       bool compute_io;
-       microseconds_t begin, end;
 
        struct pollfd pfd[1];
        bool disk_work_outstanding = false;
@@ -217,9 +211,6 @@ Butler::thread_work ()
                }
 
 
-               bytes = 0;
-               compute_io = true;
-
 restart:
                disk_work_outstanding = false;
 
@@ -227,8 +218,6 @@ restart:
                        _session.butler_transport_work ();
                }
 
-               begin = get_microseconds();
-
                boost::shared_ptr<RouteList> rl = _session.get_routes();
 
                RouteList rl_with_auditioner = *rl;
@@ -254,16 +243,11 @@ restart:
                        }
 
                        switch (tr->do_refill ()) {
-                       case 0:
-                               bytes += tr->read_data_count();
-                               break;
                        case 1:
-                               bytes += tr->read_data_count();
                                disk_work_outstanding = true;
                                break;
 
                        default:
-                               compute_io = false;
                                error << string_compose(_("Butler read ahead failure on dstream %1"), (*i)->name()) << endmsg;
                                break;
                        }
@@ -279,19 +263,6 @@ restart:
                        goto restart;
                }
 
-               if (compute_io) {
-                       end = get_microseconds();
-                       if (end - begin > 0) {
-                               _read_data_rate = (float) bytes / (float) (end - begin);
-                       } else {
-                               _read_data_rate = 0; // infinity better
-                       }
-               }
-
-               bytes = 0;
-               compute_io = true;
-               begin = get_microseconds();
-
                for (i = rl->begin(); !transport_work_requested() && should_run && i != rl->end(); ++i) {
                        // cerr << "write behind for " << (*i)->name () << endl;
 
@@ -305,17 +276,12 @@ restart:
                         */
 
                        switch (tr->do_flush (ButlerContext)) {
-                       case 0:
-                               bytes += tr->write_data_count();
-                               break;
                        case 1:
-                               bytes += tr->write_data_count();
                                disk_work_outstanding = true;
                                break;
 
                        default:
                                err++;
-                               compute_io = false;
                                error << string_compose(_("Butler write-behind failure on dstream %1"), (*i)->name()) << endmsg;
                                /* don't break - try to flush all streams in case they
                                   are split across disks.
@@ -339,16 +305,6 @@ restart:
                        goto restart;
                }
 
-               if (compute_io) {
-                       // there are no apparent users for this calculation?
-                       end = get_microseconds();
-                       if (end - begin > 0) {
-                               _write_data_rate = (float) bytes / (float) (end - begin);
-                       } else {
-                               _write_data_rate = 0; // Well, infinity would be better
-                       }
-               }
-
                if (!disk_work_outstanding) {
                        _session.refresh_disk_space ();
                }
@@ -414,24 +370,6 @@ Butler::transport_work_requested () const
        return g_atomic_int_get(&should_do_transport_work);
 }
 
-float
-Butler::read_data_rate () const
-{
-       /* disk i/o in excess of 10000MB/sec indicate the buffer cache
-          in action. ignore it.
-       */
-       return _read_data_rate > 10485.7600000f ? 0.0f : _read_data_rate;
-}
-
-float
-Butler::write_data_rate () const
-{
-       /* disk i/o in excess of 10000MB/sec indicate the buffer cache
-          in action. ignore it.
-       */
-       return _write_data_rate > 10485.7600000f ? 0.0f : _write_data_rate;
-}
-
 void
 Butler::empty_pool_trash ()
 {
index 09e06a49bcd96a40d2b2eaa6c7db3826f633c019..ef99b9afcfb7c5adcb15009837f19c21ed93f95e 100644 (file)
@@ -174,7 +174,6 @@ CoreAudioSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) c
 
                if (n_channels == 1) {
                        if (safe_read (dst, start, file_cnt, abl) == 0) {
-                               _read_data_count = cnt * sizeof (Sample);
                                return cnt;
                        }
                        return 0;
@@ -187,8 +186,6 @@ CoreAudioSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) c
                return 0;
        }
 
-       _read_data_count = cnt * sizeof(float);
-
        Sample *ptr = interleave_buf + _channel;
 
        /* stride through the interleaved data */
index 21bbbbd849630512f01ddc29f8473a30da91b8eb..3c79d31f98a4f032a178ee99ce96394f023e03cb 100644 (file)
@@ -110,8 +110,6 @@ Diskstream::Diskstream (Session &sess, const string &name, Flag flag)
         , file_frame (0)
         , playback_sample (0)
         , playback_distance (0)
-        , _read_data_count (0)
-        , _write_data_count (0)
         , in_set_state (false)
         , _flags (flag)
         , deprecated_io_node (0)
@@ -153,8 +151,6 @@ Diskstream::Diskstream (Session& sess, const XMLNode& /*node*/)
         , file_frame (0)
         , playback_sample (0)
         , playback_distance (0)
-        , _read_data_count (0)
-        , _write_data_count (0)
         , in_set_state (false)
         , _flags (Recordable)
         , deprecated_io_node (0)
index f252c8741eb33f8bc23118ef6e9464a0bac93478..d9e7c54f2d3df4f5d2f230bdae2ce570cc185d1b 100644 (file)
@@ -769,8 +769,6 @@ MidiDiskstream::read (framepos_t& start, framecnt_t dur, bool reversed)
 
                g_atomic_int_add(&_frames_written_to_ringbuffer, this_read);
 
-               _read_data_count = _playlist->read_data_count();
-
                if (reversed) {
 
                        // Swap note ons with note offs here.  etc?
@@ -873,8 +871,6 @@ MidiDiskstream::do_flush (RunContext /*context*/, bool force_flush)
 
        assert (!destructive());
 
-       _write_data_count = 0;
-
        total = _session.transport_frame() - _write_source->last_write_end();
 
        if (total == 0 || 
index f2b8722ce33f5533107a00bb72668e7f302124a7..3486c387543a2470c929c30f2b5f094a166ce48e 100644 (file)
@@ -102,8 +102,6 @@ MidiPlaylist::read (Evoral::EventSink<framepos_t>& dst, framepos_t start, framec
 
        framepos_t end = start + dur - 1;
 
-       _read_data_count = 0;
-
        // relevent regions overlapping start <--> end
        vector< boost::shared_ptr<Region> > regs;
        typedef pair<MidiStateTracker*,framepos_t> TrackerInfo;
@@ -181,8 +179,6 @@ MidiPlaylist::read (Evoral::EventSink<framepos_t>& dst, framepos_t start, framec
                                _note_trackers.insert (newpair);
                                DEBUG_TRACE (DEBUG::MidiPlaylistIO, "\tadded tracker to trackers\n");
                        }
-
-                       _read_data_count += mr->read_data_count();
                }
 
        } else {
@@ -234,7 +230,6 @@ MidiPlaylist::read (Evoral::EventSink<framepos_t>& dst, framepos_t start, framec
 
 
                        mr->read_at (evlist, start, dur, chan_n, _note_mode, tracker);
-                       _read_data_count += mr->read_data_count();
 
 #ifndef NDEBUG
                        DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("After %1 (%2 .. %3) we now have %4\n", mr->name(), mr->position(), mr->last_frame(), evlist.size()));
index 124998b5dfa48a086a9be2f2934ca57e668865af..f501390c2403275764cc10c9feac424d3e151fd6 100644 (file)
@@ -222,8 +222,6 @@ MidiRegion::_read_at (const SourceList& /*srcs*/, Evoral::EventSink<framepos_t>&
                return 0; /* read nothing */
        }
 
-       _read_data_count = 0;
-
        boost::shared_ptr<MidiSource> src = midi_source(chan_n);
        src->set_note_mode(mode);
 
@@ -248,8 +246,6 @@ MidiRegion::_read_at (const SourceList& /*srcs*/, Evoral::EventSink<framepos_t>&
                return 0; /* "read nothing" */
        }
 
-       _read_data_count += src->read_data_count();
-
        return to_read;
 }
 
index 1f4525b7b865c31783f1d6192bd8095c390036a7..1093cb2c4b69bc3280743c79bb5bb37780917726 100644 (file)
@@ -55,8 +55,6 @@ PBD::Signal1<void,MidiSource*> MidiSource::MidiSourceCreated;
 
 MidiSource::MidiSource (Session& s, string name, Source::Flag flags)
        : Source(s, DataType::MIDI, name, flags)
-       , _read_data_count(0)
-       , _write_data_count(0)
        , _writing(false)
        , _model_iter_valid(false)
        , _length_beats(0.0)
@@ -67,17 +65,12 @@ MidiSource::MidiSource (Session& s, string name, Source::Flag flags)
 
 MidiSource::MidiSource (Session& s, const XMLNode& node)
        : Source(s, node)
-       , _read_data_count(0)
-       , _write_data_count(0)
        , _writing(false)
        , _model_iter_valid(false)
        , _length_beats(0.0)
        , _last_read_end(0)
        , _last_write_end(0)
 {
-       _read_data_count = 0;
-       _write_data_count = 0;
-
        if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
index 0e86d72bb14ca37911f74cc96b791ed67363f1f2..3bc5f57577d7349d0647880245adf7d05dfd67d9 100644 (file)
@@ -185,7 +185,6 @@ Playlist::Playlist (boost::shared_ptr<const Playlist> other, string namestr, boo
        in_flush = false;
        in_partition = false;
        subcnt = 0;
-       _read_data_count = 0;
        _frozen = other->_frozen;
 
        layer_op_counter = other->layer_op_counter;
@@ -319,7 +318,6 @@ Playlist::init (bool hide)
        in_flush = false;
        in_partition = false;
        subcnt = 0;
-       _read_data_count = 0;
        _frozen = false;
        layer_op_counter = 0;
        freeze_length = 0;
index c0156903b34cd78ca32551250e79d497287633e0..dc3f39daee0132937b92b01f8fecbd4178c2daf7 100644 (file)
@@ -217,7 +217,6 @@ Region::Region (Session& s, framepos_t start, framecnt_t length, const string& n
        , _last_length (length)
        , _last_position (0)
        , _first_edit (EditChangesNothing)
-       , _read_data_count(0)
        , _last_layer_op(0)
        , _pending_explicit_relayer (false)
 {
@@ -234,7 +233,6 @@ Region::Region (const SourceList& srcs)
        , _last_length (0)
        , _last_position (0)
        , _first_edit (EditChangesNothing)
-       , _read_data_count(0)
        , _last_layer_op (0)
        , _pending_explicit_relayer (false)
 {
@@ -256,7 +254,6 @@ Region::Region (boost::shared_ptr<const Region> other)
        , _last_length (other->_last_length)
        , _last_position(other->_last_position) \
        , _first_edit (EditChangesNothing)
-       , _read_data_count(0)
        , _last_layer_op (0)
        , _pending_explicit_relayer (false)
 
@@ -329,7 +326,6 @@ Region::Region (boost::shared_ptr<const Region> other, frameoffset_t offset)
        , _last_length (other->_last_length)
        , _last_position(other->_last_position) \
        , _first_edit (EditChangesNothing)
-       , _read_data_count(0)
        , _last_layer_op (0)
        , _pending_explicit_relayer (false)
 
@@ -387,7 +383,6 @@ Region::Region (boost::shared_ptr<const Region> other, const SourceList& srcs)
        , _last_length (other->_last_length)
        , _last_position (other->_last_position)
        , _first_edit (EditChangesID)
-       , _read_data_count (0)
        , _last_layer_op (other->_last_layer_op)
        , _pending_explicit_relayer (false)
 {
index 877882abcbbf0fa6cf5359847200a27d74dce6a7..822e518e3f8b0672d2bcd6819fd65c61dca8e434 100644 (file)
@@ -127,8 +127,6 @@ SMFSource::read_unlocked (Evoral::EventSink<framepos_t>& destination, framepos_t
 
        DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("SMF read_unlocked: start %1 duration %2\n", start, duration));
 
-       _read_data_count = 0;
-
        // Output parameters for read_event (which will allocate scratch in buffer as needed)
        uint32_t ev_delta_t = 0;
        uint32_t ev_type    = 0;
@@ -203,8 +201,6 @@ SMFSource::read_unlocked (Evoral::EventSink<framepos_t>& destination, framepos_t
                        break;
                }
 
-               _read_data_count += ev_size;
-
                if (ev_size > scratch_size) {
                        scratch_size = ev_size;
                }
@@ -225,8 +221,6 @@ SMFSource::write_unlocked (MidiRingBuffer<framepos_t>& source, framepos_t positi
                 mark_streaming_write_started ();
         }
 
-       _write_data_count = 0;
-
        framepos_t        time;
        Evoral::EventType type;
        uint32_t          size;
@@ -335,9 +329,6 @@ SMFSource::append_event_unlocked_beats (const Evoral::Event<double>& ev)
 
        Evoral::SMF::append_event_delta(delta_time_ticks, ev.size(), ev.buffer(), event_id);
        _last_ev_time_beats = ev.time();
-
-       _write_data_count += ev.size();
-
 }
 
 /** Append an event with a timestamp in frames (framepos_t) */
@@ -385,9 +376,6 @@ SMFSource::append_event_unlocked_frames (const Evoral::Event<framepos_t>& ev, fr
 
        Evoral::SMF::append_event_delta(delta_time_ticks, ev.size(), ev.buffer(), event_id);
        _last_ev_time_frames = ev.time();
-
-       _write_data_count += ev.size();
-
 }
 
 XMLNode&
index 47571cead6bc9286e69b5238b9674e87df98e952..ee4d976f160472fd3f3c2cdef9a20ddaa932e683 100644 (file)
@@ -327,7 +327,6 @@ SndFileSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) con
 
                if (_info.channels == 1) {
                        framecnt_t ret = sf_read_float (sf, dst, file_cnt);
-                       _read_data_count = ret * sizeof(float);
                        if (ret != file_cnt) {
                                char errbuf[256];
                                sf_error_str (0, errbuf, sizeof (errbuf) - 1);
@@ -353,8 +352,6 @@ SndFileSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) con
                ptr += _info.channels;
        }
 
-       _read_data_count = cnt * sizeof(float);
-
        _descriptor->release ();
        return nread;
 }
@@ -401,8 +398,6 @@ SndFileSource::nondestructive_write_unlocked (Sample *data, framecnt_t cnt)
                compute_and_write_peaks (data, frame_pos, cnt, false, true);
        }
 
-       _write_data_count = cnt;
-
        return cnt;
 }
 
index 734c8f994d1403581417b3e50a8da9d84977e365..a91d31fe52df1f68ccb242d8d13702ecedd71533 100644 (file)
@@ -618,12 +618,6 @@ Track::use_new_playlist ()
        return _diskstream->use_new_playlist ();
 }
 
-uint32_t
-Track::read_data_count () const
-{
-       return _diskstream->read_data_count ();
-}
-
 void
 Track::set_align_style (AlignStyle s, bool force)
 {
@@ -636,12 +630,6 @@ Track::set_align_choice (AlignChoice s, bool force)
        _diskstream->set_align_choice (s, force);
 }
 
-uint32_t
-Track::write_data_count () const
-{
-       return _diskstream->write_data_count ();
-}
-
 PBD::ID const &
 Track::diskstream_id () const
 {