On Saturday 26 July 2003 17:11, Chris Cannam wrote:
> On Saturday 26 July 2003 15:01, Guillaume Laurent wrote:
> > segment's mmapping to be refreshed. Are there any operations from the
> > track editor which require this ?
>
> Many.
I just found one : toggling a segment's repeat status. This is an interesting
one, because from any editview's point, it doesn't require a segment refresh
(and the Segment::setRepeating() updates de composition's refresh statuses.
But for the sequence manager, it requires a remap.
Several solutions out of this :
1. make SequenceManager::checkRefreshStatus() more clever so it can check if a
segment's repeat status has changed.
2. improve the change notification framework, as we discussed (make it more
descriptive). We still could use Observers even if in some cases, the
Observer's callback is just used to schedule an update rather than taking
immediate action. For instance, we could have
CompositionObserver::segmentRepeatStatusChanged(Segment*), and the
SequenceManager would implement that as "refresh this segment next time".
3. the root of this problem is that switching a segment's repeat flag requires
a remap, but that's only due to how we implement the repeat in the
SequenceManager. Moving it at the sequencer's level (MmappedSegmentIterator)
would solve that. Then, the repeat status would simply be part of the global
mmapped composition control block we're about to do.
I hesitate between #2 and #3. May be implement both, actually, in that #3
would perhaps be the cleanest solution, but there are probably other equally
tricky segment operations which will require #2. #1 is an ugly dead-end.
--
Guillaume.
http://www.telegraph-road.org
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Rosegarden-devel mailing list
[EMAIL PROTECTED] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel