I want to add a bit more info to what Mike (MLA) wrote about Class AB. Yes, Class AB and Class A was the sound quality benchmark up until this century. Class AB is a solution to the awful distortion in Class B. That is where the positive and negative transistors are not linear from zero voltage to a given voltage but are very fast from a given voltage to any change in voltage. It's like a relay race where the runners can't run at the same speed in order to hand off. So there is immense distortion through the transition (or hand-off so to speak). Class AB solves this by using a bias voltage to both the + & - transistors so they are alrady operating within their linear range. This opposing bias voltage cancels each other but eats up and wastes a ton of energy lost as heat. So the band aid for the artifacts of Class B is precisely what creates the excessive heat and inefficiency in Class AB.
The analog switching artifacts of Class D may be present in a poorly designed or cheaper product. Like anything there are various quality levels. But now the better Class D amplifiers are the sound quality equal of the better Class AB amplifiers BUT with a 60 percent efficiency increase. Class D has been adopted by several of the most esoteric home Hi Fi companies. And those cork sniffers do not settle for anything less than perfection.

David