Remove unused header includes
[ardour.git] / libs / ardour / session.cc
index 04c86dc979e896316135fe9cd703acece4b2b989..95d319b4d85af962310dffde7cc0acc46e436f55 100644 (file)
@@ -38,7 +38,6 @@
 
 #include "pbd/error.h"
 #include "pbd/boost_debug.h"
-#include "pbd/pathscanner.h"
 #include "pbd/stl_delete.h"
 #include "pbd/basename.h"
 #include "pbd/stacktrace.h"
@@ -3311,7 +3310,7 @@ Session::source_by_id (const PBD::ID& id)
 }
 
 boost::shared_ptr<AudioFileSource>
-Session::source_by_path_and_channel (const string& path, uint16_t chn) const
+Session::audio_source_by_path_and_channel (const string& path, uint16_t chn) const
 {
        /* Restricted to audio files because only audio sources have channel
           as a property.
@@ -3332,7 +3331,7 @@ Session::source_by_path_and_channel (const string& path, uint16_t chn) const
 }
 
 boost::shared_ptr<MidiSource>
-Session::source_by_path (const std::string& path) const
+Session::midi_source_by_path (const std::string& path) const
 {
        /* Restricted to MIDI files because audio sources require a channel
           for unique identification, in addition to a path.
@@ -3487,7 +3486,7 @@ Session::new_audio_source_name (const string& base, uint32_t nchan, uint32_t cha
 
                        string possible_path = Glib::build_filename (spath, buf);
 
-                       if (source_by_path (possible_path)) {
+                       if (audio_source_by_path_and_channel (possible_path, chan)) {
                                existing++;
                                break;
                        }
@@ -3553,7 +3552,7 @@ Session::new_midi_source_name (const string& owner_name)
                                existing++;
                        }
 
-                       if (source_by_path (possible_path)) {
+                       if (midi_source_by_path (possible_path)) {
                                existing++;
                        }
                }
@@ -4124,7 +4123,7 @@ Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end,
                          bool /*overwrite*/, vector<boost::shared_ptr<Source> >& srcs,
                          InterThreadInfo& itt, 
                          boost::shared_ptr<Processor> endpoint, bool include_endpoint,
-                         bool for_export)
+                         bool for_export, bool for_freeze)
 {
        boost::shared_ptr<Region> result;
        boost::shared_ptr<Playlist> playlist;
@@ -4150,7 +4149,8 @@ Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end,
                return result;
        }
 
-       diskstream_channels = track.bounce_get_output_streams (diskstream_channels, endpoint, include_endpoint, for_export);
+       diskstream_channels = track.bounce_get_output_streams (diskstream_channels, endpoint,
+                       include_endpoint, for_export, for_freeze);
 
        if (diskstream_channels.n_audio() < 1) {
                error << _("Cannot write a range with no audio.") << endmsg;
@@ -4217,7 +4217,7 @@ Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end,
 
        position = start;
        to_do = len;
-       latency_skip = track.bounce_get_latency (endpoint, include_endpoint, for_export);
+       latency_skip = track.bounce_get_latency (endpoint, include_endpoint, for_export, for_freeze);
 
        /* create a set of reasonably-sized buffers */
        for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
@@ -4235,7 +4235,7 @@ Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end,
 
                this_chunk = min (to_do, bounce_chunk_size);
 
-               if (track.export_stuff (buffers, start, this_chunk, endpoint, include_endpoint, for_export)) {
+               if (track.export_stuff (buffers, start, this_chunk, endpoint, include_endpoint, for_export, for_freeze)) {
                        goto out;
                }
 
@@ -4264,14 +4264,14 @@ Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end,
        }
 
        /* post-roll, pick up delayed processor output */
-       latency_skip = track.bounce_get_latency (endpoint, include_endpoint, for_export);
+       latency_skip = track.bounce_get_latency (endpoint, include_endpoint, for_export, for_freeze);
 
        while (latency_skip && !itt.cancel) {
                this_chunk = min (latency_skip, bounce_chunk_size);
                latency_skip -= this_chunk;
 
                buffers.silence (this_chunk, 0);
-               track.bounce_process (buffers, start, this_chunk, endpoint, include_endpoint, for_export);
+               track.bounce_process (buffers, start, this_chunk, endpoint, include_endpoint, for_export, for_freeze);
 
                uint32_t n = 0;
                for (vector<boost::shared_ptr<Source> >::iterator src=srcs.begin(); src != srcs.end(); ++src, ++n) {