an assert in apply_interp that both points are the same size would catch an out-of-bounds read (or null pointer dereference) in some cases
it might be nice to do a more thorough check by passing in the expected size to GainInterpolator then checking them in process as they are used, but that's a bit more complex and an API change