expose more info from plugin-strip (for GUI display)
[ardour.git] / libs / ardour / audio_playlist_source.cc
index 141a8495f9eb75b326e1244615ed03e3db37ca2f..8effdd0c808145f866056338f1ea02e203e01f41 100644 (file)
 #include <glibmm/miscutils.h>
 
 #include "pbd/error.h"
-#include "pbd/convert.h"
-#include "pbd/enumwriter.h"
 
 #include "ardour/audioplaylist.h"
 #include "ardour/audio_playlist_source.h"
 #include "ardour/audioregion.h"
-#include "ardour/debug.h"
 #include "ardour/filename_extensions.h"
 #include "ardour/session.h"
 #include "ardour/session_directory.h"
-#include "ardour/session_playlists.h"
-#include "ardour/source_factory.h"
 
 #include "i18n.h"
 
@@ -132,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;
 
@@ -156,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];
        }
@@ -174,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;
 }
 
@@ -217,12 +212,12 @@ AudioPlaylistSource::sample_rate () const
 int
 AudioPlaylistSource::setup_peakfile ()
 {
-       _peak_path = Glib::build_filename (_session.session_directory().peak_path().to_string(), name() + ARDOUR::peakfile_suffix);
-       return initialize_peakfile (false, string());
+       _peak_path = Glib::build_filename (_session.session_directory().peak_path(), name() + ARDOUR::peakfile_suffix);
+       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;
 }