On 04/18/2013 11:41 AM, Holger Marzen wrote:
> trying to understand the data structures, failing. But I noticed an
> excessive use of ++j in for-loops instead the C-style j++.
Probably because there are tons and tons of situations in STL and Qt
where standard idiom is to iterate through container classes with
iterators, and the standard language is
for (some_class_iterator i = some_class.begin();
i < some_class.end(); ++i) { ...
> So loops
> don't start with a zero offset. Bug 1358 is an off-by-one bug, so I
> tried
>
> pluginLatency +=
> m_instrumentMixer->getPluginLatency((unsigned int) * connections.begin()
> - 1);
>
> and it looks like the bug has been gone.
Nah, trying to start iterating from before begin() can't be right, and
is likely to end badly.
I looked around in the code and thought about where an "off by one"
problem could be coming from, and I don't see it.
I know you care, and it's very important to you, but that's open source
for you. That code has effectively been abandoned for many years.
> P.S.
> I found another WTF in JackDriver.cpp:
>
> 2102 m_maxInstrumentLatency = maxLatency;
> 2103 m_directMasterAudioInstruments = directMasterAudioInstruments;
> 2104 m_directMasterSynthInstruments = directMasterSynthInstruments;
> 2105 m_maxInstrumentLatency = maxLatency;
Intriguing. I'd have to do some research into what all of this is to be
completely comfortable knowing which one of those assignments to delete,
although it likely doesn't matter at all. The code is has been around
for over 11,000 revisions. Meh. I'll just leave it.
--
D. Michael McIntyre
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel