2/4 is moving the code around at the same time as making a functional change, and I can't tell why it's moving the code around.
We split get_output_samples() from process_output() in 2/4. The reason of the splitting is that, according to our tests, ProcessInput() is called between get_output_samples() and process_output(). The correct implementation should be: get_output_samples() -> ProcessInput() -> process_output(). So can't make get_output_samples() inside process_output().
Why does dmo_wrapper_sink_Receive() now call get_output_samples() an extra time?
We have 2 process_output() calls in dmo_wrapper_sink_Receive(), so we call it 2 times, which is the same as what we do before. (The second process_output() doesn't show in the commit diff.)