diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-11-11 03:22:41 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-11-11 03:22:41 +0000 |
commit | 55b143d013166cf5c869f589b4f1ee3539ac5f09 (patch) | |
tree | 016712040db0921dde049067e86c9481f4a1c6d3 /libs/ardour/audio_diskstream.cc | |
parent | 90263f9a6dcec5de1bf6cd305d194118333a81ef (diff) |
fix reload of region gain envelopes, freeze works from start ... end instead of zero ... end; prep for bouncing-before-tape-mode
git-svn-id: svn://localhost/ardour2/trunk@1105 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audio_diskstream.cc')
-rw-r--r-- | libs/ardour/audio_diskstream.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 7e753fa601..5f682789ef 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -2240,10 +2240,15 @@ AudioDiskstream::use_pending_capture_data (XMLNode& node) int AudioDiskstream::set_destructive (bool yn) { + bool bounce_ignored; + if (yn != destructive()) { if (yn) { - if (!can_become_destructive ()) { + /* requestor should already have checked this and + bounced if necessary and desired + */ + if (!can_become_destructive (bounce_ignored)) { return -1; } _flags |= Destructive; @@ -2258,15 +2263,17 @@ AudioDiskstream::set_destructive (bool yn) } bool -AudioDiskstream::can_become_destructive () const +AudioDiskstream::can_become_destructive (bool& requires_bounce) const { if (!_playlist) { + requires_bounce = false; return false; } /* is there only one region ? */ if (_playlist->n_regions() != 1) { + requires_bounce = true; return false; } @@ -2277,6 +2284,7 @@ AudioDiskstream::can_become_destructive () const if (first->position() != _session.current_start_frame()) { if (first->start() > _session.current_start_frame()) { + requires_bounce = true; return false; } } @@ -2288,8 +2296,10 @@ AudioDiskstream::can_become_destructive () const assert (afirst); if (afirst->source()->used() > 1) { + requires_bounce = true; return false; } + requires_bounce = false; return true; } |