The headphone mix gain is transparently solved by this since it's factored into the gain calculator. I added ramping to the headphone-master mixing and the headphone volume calculation just now.