Laggy sound over RDP

Here and elsewhere says that in order to make audio through RDP not laggy you have a) to change the group policy and b) to add a audioqualitymode:i:2 to the RDP file.

  1. I don’t understand why compressing the audio would make the connection more laggy over LAN, for since lots of years audio compression algorithms are way faster than realtime.

  2. Okay I will use PCM, is there a way to change this group policy programmatically via some registry key? Because I would still want compressed sound if I ‘m accessing the PC through a remote network and not LAN.