when stopping transport, revert _default_transport_speed to 1.0 if current speed...
[ardour.git] / libs / ardour / audio_playlist_source.cc
index 773deb93ab68a2acbee30db59f04800293f9d3d5..915aee9595ec685293148965911fbf75e018001f 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"
 
@@ -136,7 +131,6 @@ AudioPlaylistSource::read_unlocked (Sample* dst, framepos_t start, framecnt_t cn
        boost::shared_ptr<gain_t> gbuf;
        framecnt_t to_read;
        framecnt_t to_zero;
-       pair<framepos_t,framepos_t> extent = _playlist->get_extent();
 
        /* we must be careful not to read beyond the end of our "section" of
         * the playlist, because otherwise we may read data that exists, but
@@ -157,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];
        }
@@ -172,7 +166,7 @@ AudioPlaylistSource::read_unlocked (Sample* dst, framepos_t start, framecnt_t cn
 }
 
 framecnt_t
-AudioPlaylistSource::write_unlocked (Sample *src, framecnt_t cnt)
+AudioPlaylistSource::write_unlocked (Sample *, framecnt_t)
 {
        fatal << string_compose (_("programming error: %1"), "AudioPlaylistSource::write() called - should be impossible") << endmsg;
        /*NOTREACHED*/
@@ -218,7 +212,7 @@ AudioPlaylistSource::sample_rate () const
 int
 AudioPlaylistSource::setup_peakfile ()
 {
-       _peak_path = Glib::build_filename (_session.session_directory().peak_path().to_string(), name() + ARDOUR::peakfile_suffix);
+       _peak_path = Glib::build_filename (_session.session_directory().peak_path(), name() + ARDOUR::peakfile_suffix);
        return initialize_peakfile (false, string());
 }