NO-OP: whitespace and re-organization
authorRobin Gareus <robin@gareus.org>
Fri, 23 Nov 2018 21:09:13 +0000 (22:09 +0100)
committerRobin Gareus <robin@gareus.org>
Fri, 23 Nov 2018 21:09:13 +0000 (22:09 +0100)
libs/ardour/ardour/auditioner.h
libs/ardour/auditioner.cc

index 8e13f47ecbd076efb9968bfdbd1c7e41275a7059..d849eaecb5d8d7939a4d264faf528232b2bb6df8 100644 (file)
@@ -37,37 +37,29 @@ class MidiRegion;
 
 class LIBARDOUR_API Auditioner : public Track
 {
-  public:
+public:
        Auditioner (Session&);
        ~Auditioner ();
 
        int init ();
        int connect ();
 
+       bool auditioning() const;
        void audition_region (boost::shared_ptr<Region>);
-
-       void seek_to_sample (sampleoffset_t pos) { if (_seek_sample < 0 && !_seeking) { _seek_sample = pos; }}
-       void seek_to_percent (float const pos) { if (_seek_sample < 0 && !_seeking) { _seek_sample = floorf(length * pos / 100.0); }}
-
        int play_audition (samplecnt_t nframes);
+       void cancel_audition ();
 
-       MonitorState monitoring_state () const;
+       void seek_to_sample (sampleoffset_t pos);
+       void seek_to_percent (float const pos);
+       sampleoffset_t seek_sample() const { return _seeking ? _seek_sample : -1;}
+       void seek_response(sampleoffset_t pos);
 
-       void cancel_audition () {
-               g_atomic_int_set (&_auditioning, 0);
-       }
+       MonitorState monitoring_state () const;
 
-       bool auditioning() const { return g_atomic_int_get (&_auditioning); }
        bool needs_monitor() const { return via_monitor; }
 
        virtual ChanCount input_streams () const;
 
-       sampleoffset_t seek_sample() const { return _seeking ? _seek_sample : -1;}
-       void seek_response(sampleoffset_t pos) {
-               _seek_complete = true;
-               if (_seeking) { current_sample = pos; _seek_complete = true;}
-       }
-
        PBD::Signal2<void, ARDOUR::samplecnt_t, ARDOUR::samplecnt_t> AuditionProgress;
 
        /* Track */
@@ -84,16 +76,17 @@ class LIBARDOUR_API Auditioner : public Track
        void freeze_me (InterThreadInfo&) {}
        void unfreeze () {}
 
-       boost::shared_ptr<Region> bounce (InterThreadInfo&)
-               { return boost::shared_ptr<Region> (); }
+       boost::shared_ptr<Region> bounce (InterThreadInfo&) {
+               return boost::shared_ptr<Region> ();
+       }
 
-       boost::shared_ptr<Region> bounce_range (samplepos_t, samplepos_t, InterThreadInfo&, boost::shared_ptr<Processor>, bool)
-               { return boost::shared_ptr<Region> (); }
+       boost::shared_ptr<Region> bounce_range (samplepos_t, samplepos_t, InterThreadInfo&, boost::shared_ptr<Processor>, bool) {
+               return boost::shared_ptr<Region> ();
+       }
 
-       int export_stuff (BufferSet&, samplepos_t, samplecnt_t, boost::shared_ptr<Processor>, bool, bool, bool)
-               { return -1; }
+       int export_stuff (BufferSet&, samplepos_t, samplecnt_t, boost::shared_ptr<Processor>, bool, bool, bool) { return -1; }
 
-  private:
+private:
        boost::shared_ptr<AudioRegion> the_region;
        boost::shared_ptr<MidiRegion> midi_region;
        samplepos_t current_sample;
index 7edc85254916cf667942d37c2241695701cb1930..cf070a8ca4e36a48a4b5ff20bd44ac0de4ab522f 100644 (file)
@@ -231,7 +231,6 @@ Auditioner::connect ()
        return 0;
 }
 
-
 DataType
 Auditioner::data_type () const {
        if (_midi_audition) {
@@ -476,6 +475,41 @@ Auditioner::play_audition (samplecnt_t nframes)
        }
 }
 
+void
+Auditioner::cancel_audition () {
+       g_atomic_int_set (&_auditioning, 0);
+}
+
+bool
+Auditioner::auditioning() const {
+       return g_atomic_int_get (&_auditioning);
+}
+
+void
+Auditioner::seek_to_sample (sampleoffset_t pos) {
+       if (_seek_sample < 0 && !_seeking) {
+               _seek_sample = pos;
+       }
+}
+
+void
+Auditioner::seek_to_percent (float const pos) {
+       if (_seek_sample < 0 && !_seeking) {
+               _seek_sample = floorf(length * pos / 100.0);
+       }
+}
+
+void
+Auditioner::seek_response (sampleoffset_t pos) {
+       /* called from the butler thread */
+       _seek_complete = true;
+       if (_seeking) {
+               current_sample = pos;
+               _seek_complete = true;
+       }
+}
+
+
 void
 Auditioner::output_changed (IOChange change, void* /*src*/)
 {