From 88f6395134c7b8e6fee9168580d43afb7b9bbb55 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 16 May 2012 00:16:34 +0000 Subject: switch to a RWLock for Playlist, to allow simultaneous reads (which can happen occasionally, eg. peak and butler threads) git-svn-id: svn://localhost/ardour2/branches/3.0@12301 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/audio_playlist.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/ardour/audio_playlist.cc') diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc index 9b433d160b..da6f84a4ae 100644 --- a/libs/ardour/audio_playlist.cc +++ b/libs/ardour/audio_playlist.cc @@ -66,7 +66,7 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr other, stri AudioPlaylist::AudioPlaylist (boost::shared_ptr other, framepos_t start, framecnt_t cnt, string name, bool hidden) : Playlist (other, start, cnt, name, hidden) { - RegionLock rlock2 (const_cast (other.get())); + RegionReadLock rlock2 (const_cast (other.get())); in_set_state++; framepos_t const end = start + cnt - 1; @@ -186,7 +186,7 @@ AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, fr its OK to block (for short intervals). */ - Playlist::RegionLock rl (this, false); + Playlist::RegionReadLock rl (this); /* Find all the regions that are involved in the bit we are reading, and sort them by descending layer and ascending position. @@ -437,7 +437,7 @@ AudioPlaylist::destroy_region (boost::shared_ptr region) bool changed = false; { - RegionLock rlock (this); + RegionWriteLock rlock (this); for (RegionList::iterator i = regions.begin(); i != regions.end(); ) { -- cgit v1.2.3