Closed jpcima closed 6 years ago
PS: about this unit test framework, holy crap Compiling the test case puts some crazy strain on my computer RAM. (up to 1GB RAM) It will swap the computer to death. I just have 4GB and it's already full because of Web browser + Clang code assistance tools. I need to find more RAM sticks to put in this old thing.
VLC no more crashing, Yeah! :smile: Gotta to build this to my phone...
Damn, seems another crash happen on the phone:
Happen on applySetup()
after bank loading.
Yeah, applySetup()
is calling multiple times: first time on initialization, second time on setup change, on bank reload, and on MIDI file load.
Does anything happen if you change:
ch.resize(opn.NumChannels, OpnChannel());
to
ch.resize(opn.NumChannels);
@Wohlstand
Yeah it triggers the assertion because a null list is assigned to another. In fact change this:
// if(users == users_first) {
if(users == users_first && users) {
1.
I reject the activenotes unit test as invalid. :smile:
In that test the members {note, active} of
NoteInfo
are not initialized. Before, I made these initialized at the level ofChooseDevice
. To arrange things better and make the unit test pass, I set them up in the constructor of the channel. Please note aboutCh.resize(n +16)
: it's not necessary to pass a second argument. It's probably better not to, for the sake of C++ version 11 and up.2.
I modified the user map. First, for the sake of code organization, implementations go in .cpp. I did not modify any of the existing implementation. However I added the copy methods. These are required because copying a
LocationData
into another will have an ill effect of copying the list's head pointers into the other. The pointers from different cell storages will mix, with the effects you can probably guess. The copy method will reproduce the list of the other into its own storage. I add the asserts here and there to fortify code checks against potential errors.