There's a number of factors in the decling sales:
1) Quality of modern music is subpar
2) People are rebuying their cd collections in digital format. They can just pop the the disc in the drive and make mp3's for free. The music industry has thrived on getting people to repurchased their albums. Vinyl, 8-Tracks, Tapes, CD's. Without people repurchasing back catalogs, they're rely on new album sales.
3) Digital Downloads. As a result of point #1, and modern music being crap. Most albums are fillter. People no longer have to pay for filler. So now they're making 2 or 3 dollars on release albums instead of 12-15.
4) Piracy. I still don't think Piracy is the biggest factor. I understand alot of music is downloaded, but I still don't believe, had there been no alternative, that people would of paid for it. Piracy also has the downside of letting people test the music before they pay for it. It really prevents people from buying crappy albums. You don't have to buy albums blind anymore. If piracy has done anything, its done that.