I just found this feature is already in EmulatorStation (after working out the complicated command line too :P) if you’ve mapped a menu button when you set up your controller (mine is the select button on a RetroUSB SNES adapter), then it will bring up a simple menu with a volume control that is system wide.
I added the following to /opt/retropie/configs/all/retroarch.cfg, and now when I hold SELECT (button 8) and press up or down, it adjusts the volume in game for me.