take read-lock when saving processor order
[ardour.git] / libs / ardour / audio_playlist_source.cc
index ea09d200561360638e1273d8d626de5df7260e2e..7ac487815caf9307d022258a6f80e6a3eeb32903 100644 (file)
@@ -108,7 +108,7 @@ AudioPlaylistSource::set_state (const XMLNode& node, int version, bool with_desc
                }
        }
 
-       const XMLProperty* prop;
+       XMLProperty const * prop;
        pair<framepos_t,framepos_t> extent = _playlist->get_extent();
 
        AudioSource::_length = extent.second - extent.first;
@@ -127,8 +127,8 @@ AudioPlaylistSource::set_state (const XMLNode& node, int version, bool with_desc
 framecnt_t
 AudioPlaylistSource::read_unlocked (Sample* dst, framepos_t start, framecnt_t cnt) const
 {
-       boost::shared_ptr<Sample> sbuf;
-       boost::shared_ptr<gain_t> gbuf;
+       boost::shared_array<Sample> sbuf;
+       boost::shared_array<gain_t> gbuf;
        framecnt_t to_read;
        framecnt_t to_zero;
 
@@ -151,7 +151,7 @@ AudioPlaylistSource::read_unlocked (Sample* dst, framepos_t start, framecnt_t cn
                   with any changes to the list of buffers caused
                   by creating new nested playlists/sources
                */
-               Glib::Mutex::Lock lm (_level_buffer_lock);
+               Glib::Threads::Mutex::Lock lm (_level_buffer_lock);
                sbuf = _mixdown_buffers[_level-1];
                gbuf = _gain_buffers[_level-1];
        }
@@ -169,7 +169,7 @@ framecnt_t
 AudioPlaylistSource::write_unlocked (Sample *, framecnt_t)
 {
        fatal << string_compose (_("programming error: %1"), "AudioPlaylistSource::write() called - should be impossible") << endmsg;
-       /*NOTREACHED*/
+       abort(); /*NOTREACHED*/
        return 0;
 }
 
@@ -213,11 +213,11 @@ int
 AudioPlaylistSource::setup_peakfile ()
 {
        _peak_path = Glib::build_filename (_session.session_directory().peak_path(), name() + ARDOUR::peakfile_suffix);
-       return initialize_peakfile (false, string());
+       return initialize_peakfile (string());
 }
 
 string
-AudioPlaylistSource::peak_path (string /*audio_path_IGNORED*/)
+AudioPlaylistSource::construct_peak_filepath (const string& /*audio_path_*/, const bool /* in_session */, const bool /* old_peak_name */) const
 {
        return _peak_path;
 }