RetroPie is not a standalone OS, the image for the Raspberry Pi it's based on Raspbian Lite, so if your sound works in Raspbian, then it should work in RetroPie.
For the error message you posted (lvl10: VolumeControl::init() - Failed to attach to default card!), try changing the sound settings in Emulationstation - change the Audio device to PCM and restart Emulationstation - see if you get the same error.