On Tuesday 31 January 2006 13:04, Chris Cannam wrote:
> OK, I've committed what I think is a fix. The superficial problem (no data
> block ID set for mapped events created at the sequencer side) turned out to
> also mask a deeper problem (separate data block ID counts at GUI and
> sequencer meant that outgoing events from the GUI overwrote the incoming
> event data blocks -- this may not have caused any actual problems because
> the incoming events were probably no longer used by then, but it's hard to
> be certain).
>
> Anyway, I've adjusted setDataBlockForEvent so as to call
> registerDataBlockForEvent if there is no ID set (ID 0 is officially not
> used) and I've made it use random IDs instead of incrementing ones, so as
> to hopefully avoid using the same range in both processes. We also check
> whether a datablock file already exists and avoid overwriting it (not
> enough on its own because of potential race conditions). Together those
> should make things pretty safe.
>
> So, please test!
OK. Tested. It works. I don't see any other problem now with sysex events.
> One last problem: the datablock files created on the sequencer side are not
> deleted when Rosegarden exits.
What about calling to DataBlockRepository::clear() at ~AlsaDriver()
destructor? I've tested the attached patch and it deletes the datablock files
generated by the sequencer. I can commit that, if you agree.
Regards,
Pedro
--- sound/AlsaDriver.cpp.orig 2006-01-31 21:19:31.000000000 +0100
+++ sound/AlsaDriver.cpp 2006-01-31 22:07:31.000000000 +0100
@@ -113,6 +113,7 @@
std::cerr << "WARNING: AlsaDriver::shutdown() was not called before destructor, calling now" << std::endl;
shutdown();
}
+ DataBlockRepository::clear();
}
int