Remove some unused PostTransport enums and renumber others.
[ardour.git] / libs / ardour / audio_track.cc
index efd6e8ba86f7a564ec46a1219da2676b798ea17f..aa7768a22872a839433f09ef4acd7db2310885a7 100644 (file)
@@ -366,7 +366,7 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram
        Sample* tmpb;
        framepos_t transport_frame;
        boost::shared_ptr<AudioDiskstream> diskstream = audio_diskstream();
-        
+
        automation_snapshot (start_frame, false);
 
        if (n_outputs().n_total() == 0 && _processors.empty()) {
@@ -386,7 +386,6 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram
                   playback distance to zero, thus causing diskstream::commit
                   to do nothing.
                */
-               cerr << name() << " Can't operate at " << transport_frame << " since roll delay is only " << _roll_delay << endl;
                return diskstream->process (transport_frame, 0, can_record, rec_monitors_input, need_butler);
        }
 
@@ -529,15 +528,15 @@ AudioTrack::export_stuff (BufferSet& buffers, framepos_t start, framecnt_t nfram
        Glib::RWLock::ReaderLock rlock (_processor_lock);
 
        boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist>(diskstream->playlist());
-       assert(apl);
 
+       assert(apl);
+       assert(buffers.count().n_audio() >= 1);
        assert ((framecnt_t) buffers.get_audio(0).capacity() >= nframes);
 
        if (apl->read (buffers.get_audio(0).data(), mix_buffer.get(), gain_buffer.get(), start, nframes) != nframes) {
                return -1;
        }
 
-       assert(buffers.count().n_audio() >= 1);
        uint32_t n=1;
        Sample* b = buffers.get_audio(0).data();
        BufferSet::audio_iterator bi = buffers.audio_begin();
@@ -548,8 +547,7 @@ AudioTrack::export_stuff (BufferSet& buffers, framepos_t start, framecnt_t nfram
                                return -1;
                        }
                        b = bi->data();
-               }
-               else {
+               } else {
                        /* duplicate last across remaining buffers */
                        memcpy (bi->data(), b, sizeof (Sample) * nframes);
                }
@@ -570,7 +568,7 @@ AudioTrack::export_stuff (BufferSet& buffers, framepos_t start, framecnt_t nfram
                boost::shared_ptr<Processor> processor = boost::dynamic_pointer_cast<Processor> (*i);
                boost::shared_ptr<Delivery> delivery = boost::dynamic_pointer_cast<Delivery> (*i);
                boost::shared_ptr<PeakMeter> meter = boost::dynamic_pointer_cast<PeakMeter> (*i);
-               
+
                if (processor && (!delivery || !Delivery::role_requires_output_ports (delivery->role())) && !meter) {
                        processor->run (buffers, start, start+nframes, nframes, true);
                }
@@ -671,7 +669,7 @@ AudioTrack::freeze_me (InterThreadInfo& itt)
        /* create a new region from all filesources, keep it private */
 
        PropertyList plist;
-       
+
        plist.add (Properties::start, 0);
        plist.add (Properties::length, srcs[0]->length(srcs[0]->timeline_position()));
        plist.add (Properties::name, region_name);