The destructor of Resampler needs to be virtual, as it is subclassed
and pointers to objects subclassed from it are being deleted.
The issue in controls.cpp is that the loop ends up reading past the
end of an array. The small rewrite of the loop also makes it more
readable.
In memmap.cpp, there is an assignment statement of the following form:
a[i++] = b[i];
It is undefined what i's value should be in b[i], so this was made
explicit.