Here's an interesting piece by Music Think Tank over what's behind the decline in CD sales. It's not necessarily the music: it's the medium itself.
While it may seem that the audio CD thrived for more than 20 years because of high fidelity, what it really offered over its fraternal twin on vinyl was convenience — better robustness, more portability, multi-disc changers, in-vehicle players, random/repeat play, and remote control.
In the last decade theiPod arrived to match all the conveniences of the CD, adding small (and ever smaller) player size, ubiquitous portability, invisible storage, and greater (and ever greater) capacity. Nothing can match the convenience of dematerialized digital audio, now available in a variety of formats at both lower and higher resolution than CD quality (choice is convenient, too).