diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-16 00:16:34 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-16 00:16:34 +0000 |
commit | 88f6395134c7b8e6fee9168580d43afb7b9bbb55 (patch) | |
tree | ac4e661b985bf3bce8d05cb6fb43f3cc6bb28bf0 /libs/ardour/audio_playlist.cc | |
parent | 674a7b3ac01eaa0d65c3db693135b483b2b15998 (diff) |
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
Diffstat (limited to 'libs/ardour/audio_playlist.cc')
-rw-r--r-- | libs/ardour/audio_playlist.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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<const AudioPlaylist> other, stri AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, framepos_t start, framecnt_t cnt, string name, bool hidden) : Playlist (other, start, cnt, name, hidden) { - RegionLock rlock2 (const_cast<AudioPlaylist*> (other.get())); + RegionReadLock rlock2 (const_cast<AudioPlaylist*> (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> region) bool changed = false; { - RegionLock rlock (this); + RegionWriteLock rlock (this); for (RegionList::iterator i = regions.begin(); i != regions.end(); ) { |