Where Does Volume correction Occur

I had the same questions some time ago. Take a look at this thread: Device volume control