fixes for various bugs including dangling ref to route in session, opening sessions...
[ardour.git] / libs / ardour / audiofilesource.cc
index 256286b7296e780efdf2f02e89e58ecfc6009703..9564fff53b79b6bf7183caf7907ec9f423b320a3 100644 (file)
@@ -101,7 +101,6 @@ AudioFileSource::AudioFileSource (Session& s, const XMLNode& node)
 AudioFileSource::~AudioFileSource ()
 {
        if (removable()) {
-               cerr << "Removing file " << _path << " because its removable\n";
                unlink (_path.c_str());
                unlink (peakpath.c_str());
        }
@@ -119,6 +118,7 @@ AudioFileSource::init (string pathstr, bool must_exist)
        bool is_new = false;
 
        _length = 0;
+       timeline_position = 0;
        next_peak_clear_should_notify = false;
        
        if (!find (pathstr, must_exist, is_new)) {
@@ -503,14 +503,14 @@ AudioFileSource::set_search_path (string p)
 }
 
 void
-AudioFileSource::set_header_position_offset (jack_nframes_t offset)
+AudioFileSource::set_header_position_offset (nframes_t offset)
 {
        header_position_offset = offset;
        HeaderPositionOffsetChanged ();
 }
 
 void
-AudioFileSource::set_timeline_position (jack_nframes_t pos)
+AudioFileSource::set_timeline_position (nframes_t pos)
 {
        timeline_position = pos;
 }