X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fdisk_io.cc;h=47f3117d0566ddc407e4f8e0ab3b6a2e920e2b92;hb=9775c5c9f1b81340f3177ede038f02faed71c887;hp=60e7ea56bbc046d822cc459d339de201cb17888f;hpb=30b087ab3d28f1585987fa3f6ae006562ae192e3;p=ardour.git diff --git a/libs/ardour/disk_io.cc b/libs/ardour/disk_io.cc index 60e7ea56bb..47f3117d05 100644 --- a/libs/ardour/disk_io.cc +++ b/libs/ardour/disk_io.cc @@ -19,7 +19,6 @@ #include "pbd/debug.h" #include "pbd/error.h" -#include "pbd/i18n.h" #include "ardour/audioplaylist.h" #include "ardour/butler.h" @@ -36,6 +35,8 @@ #include "ardour/session.h" #include "ardour/session_playlists.h" +#include "pbd/i18n.h" + using namespace ARDOUR; using namespace PBD; using namespace std; @@ -54,9 +55,9 @@ DiskIOProcessor::DiskIOProcessor (Session& s, string const & str, Flag f) , _slaved (false) , loop_location (0) , in_set_state (false) - , playback_sample (0) - , wrap_buffer_size (0) - , speed_buffer_size (0) + , playback_sample (0) + , wrap_buffer_size (0) + , speed_buffer_size (0) , _need_butler (false) , channels (new ChannelList) , _midi_buf (new MidiRingBuffer (s.butler()->midi_diskstream_buffer_size())) @@ -334,36 +335,33 @@ DiskIOProcessor::midi_playlist () const int DiskIOProcessor::use_playlist (DataType dt, boost::shared_ptr playlist) { - if (!playlist) { - return 0; - } + if (!playlist) { + return 0; + } - DEBUG_TRACE (DEBUG::DiskIO, string_compose ("%1: set to use playlist %2 (%3)\n", name(), playlist->name(), dt.to_string())); + DEBUG_TRACE (DEBUG::DiskIO, string_compose ("%1: set to use playlist %2 (%3)\n", name(), playlist->name(), dt.to_string())); - if (playlist == _playlists[dt]) { - DEBUG_TRACE (DEBUG::DiskIO, string_compose ("%1: already using that playlist\n", name())); - return 0; - } + if (playlist == _playlists[dt]) { + DEBUG_TRACE (DEBUG::DiskIO, string_compose ("%1: already using that playlist\n", name())); + return 0; + } - playlist_connections.drop_connections (); + playlist_connections.drop_connections (); - if (_playlists[dt]) { - _playlists[dt]->release(); - } + if (_playlists[dt]) { + _playlists[dt]->release(); + } - _playlists[dt] = playlist; - playlist->use(); + _playlists[dt] = playlist; + playlist->use(); - playlist->ContentsChanged.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_modified, this)); - playlist->LayeringChanged.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_modified, this)); - playlist->DropReferences.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_deleted, this, boost::weak_ptr(playlist))); - playlist->RangesMoved.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_ranges_moved, this, _1, _2)); + playlist->ContentsChanged.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_modified, this)); + playlist->LayeringChanged.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_modified, this)); + playlist->DropReferences.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_deleted, this, boost::weak_ptr(playlist))); + playlist->RangesMoved.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_ranges_moved, this, _1, _2)); DEBUG_TRACE (DEBUG::DiskIO, string_compose ("%1 now using playlist %1 (%2)\n", name(), playlist->name(), playlist->id())); - PlaylistChanged (dt); /* EMIT SIGNAL */ - _session.set_dirty (); - return 0; }