On 18 April 2013 23:30, D. Michael McIntyre
<[email protected]> wrote:
> Yeahbut it's an ID to a member of a container.  I read it as "take the
> ID of the first thing in the container, then use an ID one lower than
> that."  It seems random at best, destructive at worst.

This code makes my brain hurt now as well (how on earth did we ever
decide that using plain ints in different ranges to represent
different kinds of ID was a good idea?) but I agree with you on this,
the thing returned by *connections.begin() is an instrument ID not a
counter or index.

So it could be, for example, 10000 which represents the first synth
instrument (synth instruments have IDs starting from 10000).
Subtracting one would give you 9999, which would theoretically mean
the 8000th MIDI instrument (because MIDI instruments occupy the
2000-10000 range) which is not at all a meaningful thing here.

There's obviously some interesting mystery being hinted at here, but I
don't quite see what it is either.


Chris


_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to