On Sunday 27 Jul 2003 5:41 am, Silvan wrote: > What exactly is all this mmap blather all about anyway?
I see Guillaume's answered this briefly, but I'll answer ramblingly as well. The point of all this work is to change the way the GUI communicates to the sequencer what events need to be played from a "pull" mode to a "push" mode. Before, the sequencer would send a request to the GUI saying it was about to play the timeslice from time N to time N+M, and the GUI would return M's worth of events for it to play. The timeslice duration M had to be fairly short so as to ensure the sequencer responded quickly to changes in the composition, but unfortunately this made it highly likely that the GUI would be too busy to respond to the request in time. This is a "pull" mode: the sequencer knows when it needs some new events, and pulls them from the GUI, which therefore has a real-time dependency. Now, the GUI stores a playable (MappedEvent-based) representation of each segment in a mmapped area, updating it when something in the composition changes, and the sequencer reads from that (without the need for any cooperation from the GUI) as and when it requires. This removes the real-time dependency on the GUI by ensuring that the sequencer never needs to make any request to the GUI that needs a strictly time-limited response. This is a "push" mode: the GUI pushes new data when available, and it's all always there for the sequencer whenever it needs it. The mmap technology itself is simply an area of memory that's backed by a file, somewhat like the way a swap file provides backing for memory that's swapped in. The GUI creates this file of a given size and maps it into a locked area of memory in a read/write mode; the sequencer simultaneously opens and maps it read-only. Any changes made by the GUI are therefore immediately available in the sequencer without the requirement for any explicit file read/write operations in between. (I'm sure Guillaume will correct any details I have wrong here, but that's certainly how I expect mmap to be used.) Chris ------------------------------------------------------- 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
